Improve shortcuts UX

This commit is contained in:
heliguy4599
2024-10-13 21:38:52 -04:00
parent 0be2b545bf
commit 21e90957ca
2 changed files with 14 additions and 26 deletions

View File

@@ -53,28 +53,24 @@ ShortcutsWindow help_overlay {
}
ShortcutsGroup {
title: _("Packages Page");
ShortcutsShortcut {
title: _("Selection Mode");
action-name: "app.toggle-select-mode";
}
ShortcutsShortcut {
title: _("Search Mode");
action-name: "app.toggle-search-mode";
action-name: "app.search-mode";
}
ShortcutsShortcut {
title: _("Edit Filters");
action-name: "app.filter";
}
ShortcutsShortcut {
title: _("Uninstall Selected Packages");
action-name: "app.delete";
title: _("Selection Mode");
action-name: "app.toggle-select-mode";
}
}
ShortcutsGroup {
title: _("Remotes Page");
ShortcutsShortcut {
title: _("Search Mode");
action-name: "app.toggle-search-mode";
action-name: "app.search-mode";
}
ShortcutsShortcut {
title: _("Show or Hide Disabled Remotes");
@@ -87,21 +83,17 @@ ShortcutsWindow help_overlay {
}
ShortcutsGroup {
title: _("User Data Page");
ShortcutsShortcut {
title: _("Selection Mode");
action-name: "app.toggle-select-mode";
}
ShortcutsShortcut {
title: _("Search Mode");
action-name: "app.toggle-search-mode";
action-name: "app.search-mode";
}
ShortcutsShortcut {
title: _("Edit Sorting Modes");
action-name: "app.filter";
}
ShortcutsShortcut {
title: _("Trash Selected Data");
action-name: "app.delete";
title: _("Selection Mode");
action-name: "app.toggle-select-mode";
}
ShortcutsShortcut {
title: _("Show Active Data");
@@ -114,18 +106,14 @@ ShortcutsWindow help_overlay {
}
ShortcutsGroup {
title: _("Snapshots Page");
ShortcutsShortcut {
title: _("Search Mode");
action-name: "app.search-mode";
}
ShortcutsShortcut {
title: _("Selection Mode");
action-name: "app.toggle-select-mode";
}
ShortcutsShortcut {
title: _("Search Mode");
action-name: "app.toggle-search-mode";
}
ShortcutsShortcut {
title: _("Trash Selected Snapshots");
action-name: "app.delete";
}
ShortcutsShortcut {
title: _("New Snapshots");
action-name: "app.new";

View File

@@ -57,7 +57,7 @@ class WarehouseApplication(Adw.Application):
self.create_action("toggle-select-mode", self.on_toggle_select_mode_shortcut, ["<primary>b", "<primary>Return"])
self.create_action("toggle-selection-kp-enter", self.on_toggle_select_mode_shortcut, ["<primary>KP_Enter"]) # Doesn't show in the shortcuts window
self.create_action("toggle-search-mode", self.on_toggle_search_mode_shortcut, ["<primary>f"])
self.create_action("search-mode", self.on_search_mode_shortcut, ["<primary>f"])
self.create_action("filter", self.on_filter_shortcut, ["<primary>t"])
self.create_action("new", self.on_new_shortcut, ["<primary>n"])
self.create_action("active-data-view", lambda *_: self.on_data_view_shortcut(True), ["<Alt>1"])
@@ -125,10 +125,10 @@ class WarehouseApplication(Adw.Application):
except AttributeError:
pass
def on_toggle_search_mode_shortcut(self, *args):
def on_search_mode_shortcut(self, *args):
try:
button = self.props.active_window.stack.get_visible_child().search_button
button.set_active(not button.get_active())
button.set_active(True)
except AttributeError:
pass