GNOME Bugzilla – Bug 683963
Doesn't quit with Ctrl+Q
Last modified: 2016-03-31 13:54:09 UTC
Boxes doesn't seem to quit on Ctrl+Q. I think it should, for consistency with other GNOME applications.
Created attachment 225323 [details] [review] Don't pass Ctrl/Alt keys to search entry These mean nothing to the entry in general, but do override any possibility of handling such events as keyboard accelerators up the widget hierarchy.
Created attachment 225324 [details] [review] Add Ctrl-Q keyboard shortcut We can't use accelerators for this as they would override the VM keyboard input, so we handle this in the GtkWindow key-pressed handler.
Review of attachment 225323 [details] [review]: At first I was a bit worried about ctrl+a/ctrl+c/ctrl+v not working in the entry, but this filtering is only done on the unfocused search entry, once it is focused it gets all the filtered keys as usual.
Review of attachment 225324 [details] [review]: ::: src/app.vala @@ +673,3 @@ selection_mode = false; + } else if (event.keyval == Gdk.Key.q && + (event.state & Gdk.ModifierType.CONTROL_MASK) != 0) { This will also match ctrl+alt+q or any such combination. GNOME Documents also exits in these situations, but gedit does not. I'd go with ((event.state & Gdk.ModifierType.MODIFIER_MASK) == Gdk.ModifierType.CONTROL_MASK) instead
pushed with fix for comment #4.
Attachment 225323 [details] pushed as 62747ca - Don't pass Ctrl/Alt keys to search entry Attachment 225324 [details] pushed as 4c51d6e - Add Ctrl-Q keyboard shortcut