From d20553a111af4fb69e19ba8caeb0044035086c43 Mon Sep 17 00:00:00 2001 From: eerielili Date: Sun, 22 Sep 2024 11:27:55 +0000 Subject: Add keyboard shortcut to show preferences (Ctrl+,) (#1435) --- main/data/gtk/help-overlay.ui | 6 ++++++ main/src/ui/application.vala | 2 ++ 2 files changed, 8 insertions(+) (limited to 'main') diff --git a/main/data/gtk/help-overlay.ui b/main/data/gtk/help-overlay.ui index 17b0555c..92c3d74b 100644 --- a/main/data/gtk/help-overlay.ui +++ b/main/data/gtk/help-overlay.ui @@ -20,6 +20,12 @@ Join Channel + + + <ctrl>comma + Show preferences + + <ctrl>question diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala index 706a61e6..918fb26c 100644 --- a/main/src/ui/application.vala +++ b/main/src/ui/application.vala @@ -10,6 +10,7 @@ public class Dino.Ui.Application : Adw.Application, Dino.Application { private const string[] KEY_COMBINATION_ADD_CONFERENCE = {"G", null}; private const string[] KEY_COMBINATION_LOOP_CONVERSATIONS = {"Tab", null}; private const string[] KEY_COMBINATION_LOOP_CONVERSATIONS_REV = {"Tab", null}; + private const string[] KEY_COMBINATION_SHOW_SETTINGS = {"comma", null}; private MainWindow window; public MainWindowController controller; @@ -116,6 +117,7 @@ public class Dino.Ui.Application : Adw.Application, Dino.Application { SimpleAction preferences_action = new SimpleAction("preferences", null); preferences_action.activate.connect(show_preferences_window); add_action(preferences_action); + set_accels_for_action("app.preferences", KEY_COMBINATION_SHOW_SETTINGS); SimpleAction preferences_account_action = new SimpleAction("preferences-account", VariantType.INT32); preferences_account_action.activate.connect((variant) => { -- cgit v1.2.3-70-g09d2