[gnome-boxes] Add Ctrl-Q keyboard shortcut
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Add Ctrl-Q keyboard shortcut
- Date: Mon, 1 Oct 2012 08:12:38 +0000 (UTC)
commit 4c51d6e390127ddb3b2ac357305722c4dcbc57f7
Author: Alexander Larsson <alexl redhat com>
Date: Fri Sep 28 11:02:25 2012 +0200
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.
https://bugzilla.gnome.org/show_bug.cgi?id=683963
src/app.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/app.vala b/src/app.vala
index 6324f39..961deaf 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -671,6 +671,10 @@ private class Boxes.App: Boxes.UI {
} else if (event.keyval == Gdk.Key.Escape) {
if (selection_mode && ui_state == UIState.COLLECTION)
selection_mode = false;
+ } else if (event.keyval == Gdk.Key.q &&
+ (event.state & Gdk.ModifierType.MODIFIER_MASK) == Gdk.ModifierType.CONTROL_MASK) {
+ quit ();
+ return true;
}
return false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]