[gnome-boxes/behavior-of-ctrl-plus-n: 4/4] kbd-shortcuts-window: Add Ctrl+Shift+N shortcut for Remote Machines
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/behavior-of-ctrl-plus-n: 4/4] kbd-shortcuts-window: Add Ctrl+Shift+N shortcut for Remote Machines
- Date: Mon, 20 Jan 2020 15:51:27 +0000 (UTC)
commit fa6e8a61a547a844084514a79cbbac6717e19a6c
Author: Felipe Borges <felipeborges gnome org>
Date: Mon Jan 20 16:49:28 2020 +0100
kbd-shortcuts-window: Add Ctrl+Shift+N shortcut for Remote Machines
Fixes #459
data/ui/kbd-shortcuts-window.ui | 8 ++++++++
src/app-window.vala | 5 +++++
2 files changed, 13 insertions(+)
---
diff --git a/data/ui/kbd-shortcuts-window.ui b/data/ui/kbd-shortcuts-window.ui
index 4288fabd..d4a2687a 100644
--- a/data/ui/kbd-shortcuts-window.ui
+++ b/data/ui/kbd-shortcuts-window.ui
@@ -34,6 +34,14 @@
</object>
</child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">1</property>
+ <property name="accelerator"><Ctrl><Shift>N</property>
+ <property name="title" translatable="yes" context="shortcut window">Connect to a remote
machine</property>
+ </object>
+ </child>
+
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
diff --git a/src/app-window.vala b/src/app-window.vala
index f1000cd0..baae669c 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -418,6 +418,11 @@ public bool on_key_pressed (Widget widget, Gdk.EventKey event) {
(event.state & default_modifiers) == Gdk.ModifierType.CONTROL_MASK) {
show_vm_assistant ();
+ return true;
+ } else if (event.keyval == Gdk.Key.N &&
+ (event.state & default_modifiers) == (Gdk.ModifierType.CONTROL_MASK |
Gdk.ModifierType.SHIFT_MASK)) {
+ show_remote_connection_assistant ();
+
return true;
} else if (event.keyval == Gdk.Key.f &&
(event.state & default_modifiers) == Gdk.ModifierType.CONTROL_MASK) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]