[connections/kbd-shortcuts: 3/3] window: Add Ctrl+n shortcut to open the new connection dialog




commit 8bdaa03d12ee9edc568594d5fff78c467996b731
Author: Felipe Borges <felipeborges gnome org>
Date:   Tue Mar 16 13:45:55 2021 +0100

    window: Add Ctrl+n shortcut to open the new connection dialog

 src/window.vala | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/window.vala b/src/window.vala
index 526d2e7..00b4435 100644
--- a/src/window.vala
+++ b/src/window.vala
@@ -108,6 +108,10 @@ namespace Connections {
             } else if (event.keyval == Gdk.Key.F1) {
                 Application.application.activate_action ("help", null);
 
+                return true;
+            } else if (event.keyval == Gdk.Key.n &&
+                       (event.state & default_modifiers) == Gdk.ModifierType.CONTROL_MASK) {
+                (new Connections.Assistant (this).run ());
                 return true;
             }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]