diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2012-12-05 13:49:53 +0100 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2012-12-20 11:59:30 +0100 |
commit | cae0a491c6944c0287a9fa38580fd9cc48b180f5 (patch) | |
tree | f1af6cf26044e8399b5b627ff1b816056817a844 | |
parent | 346f35c87b2631817a2f16be9618f18a98c87567 (diff) |
Improve hotkeys controller behaviour
Disable default accelerators when setting bindings from the controller
in case the controller does not override them all. This ensures we don't
inherit from the bindings set in VirtViewerApp::constructor if the controller
doesn't set any bindings for a given action.
-rw-r--r-- | src/remote-viewer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/remote-viewer.c b/src/remote-viewer.c index 31812d6..559f29a 100644 --- a/src/remote-viewer.c +++ b/src/remote-viewer.c @@ -514,6 +514,11 @@ spice_ctrl_notified(SpiceCtrlController *ctrl, g_object_set(app, "enable-accel", FALSE, NULL); goto end; } + /* Disable default bindings and replace them with our own */ + gtk_accel_map_change_entry("<virt-viewer>/view/fullscreen", 0, 0, TRUE); + gtk_accel_map_change_entry("<virt-viewer>/view/release-cursor", 0, 0, TRUE); + gtk_accel_map_change_entry("<virt-viewer>/file/smartcard-insert", 0, 0, TRUE); + gtk_accel_map_change_entry("<virt-viewer>/file/smartcard-remove", 0, 0, TRUE); for (hotkey = hotkeys; *hotkey != NULL; hotkey++) { gchar *key = strstr(*hotkey, "="); |