aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorMiquel Lionel <lionel@les-miquelots.net>2023-10-08 18:27:12 +0200
committerMiquel Lionel <lionel@les-miquelots.net>2023-10-08 18:27:12 +0200
commitf23874e6fb179f6909c06f4b1f7f73d35c279470 (patch)
treea8deca21f94c89fceb78c7207f18661dcc6007a9 /main
parent86b101900c28a09ebc6bcbf212f9969f70ce51b7 (diff)
downloaddino-add-kbd-shortcut-to-show-settings.tar.gz
dino-add-kbd-shortcut-to-show-settings.zip
Add keyboard shortcut to show preferences (Ctrl+,)add-kbd-shortcut-to-show-settings
Diffstat (limited to 'main')
-rw-r--r--main/data/gtk/help-overlay.ui6
-rw-r--r--main/src/ui/application.vala2
2 files changed, 8 insertions, 0 deletions
diff --git a/main/data/gtk/help-overlay.ui b/main/data/gtk/help-overlay.ui
index 17b0555c..7d2aece9 100644
--- a/main/data/gtk/help-overlay.ui
+++ b/main/data/gtk/help-overlay.ui
@@ -10,6 +10,12 @@
<property name="title" translatable="yes">General</property>
<child>
<object class="GtkShortcutsShortcut">
+ <property name="accelerator">&lt;ctrl&gt;comma</property>
+ <property name="title" translatable="yes">Show preferences</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkShortcutsShortcut">
<property name="accelerator">&lt;ctrl&gt;T</property>
<property name="title" translatable="yes">Start Conversation</property>
</object>
diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala
index 2e785224..34a0797e 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 = {"<Ctrl>G", null};
private const string[] KEY_COMBINATION_LOOP_CONVERSATIONS = {"<Ctrl>Tab", null};
private const string[] KEY_COMBINATION_LOOP_CONVERSATIONS_REV = {"<Ctrl><Shift>Tab", null};
+ private const string[] KEY_COMBINATION_SHOW_SETTINGS = {"<Ctrl>comma", null};
private MainWindow window;
public MainWindowController controller;
@@ -120,6 +121,7 @@ public class Dino.Ui.Application : Adw.Application, Dino.Application {
SimpleAction settings_action = new SimpleAction("settings", null);
settings_action.activate.connect(show_settings_window);
add_action(settings_action);
+ set_accels_for_action("app.settings", KEY_COMBINATION_SHOW_SETTINGS);
SimpleAction about_action = new SimpleAction("about", null);
about_action.activate.connect(show_about_window);