[gnome-boxes] properties-window: Go back on Alt+Left key combo
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] properties-window: Go back on Alt+Left key combo
- Date: Fri, 5 Dec 2014 13:30:56 +0000 (UTC)
commit aa91ab3da66813b1c54d43a85e30ed31517e84a1
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Thu Dec 4 17:05:38 2014 +0000
properties-window: Go back on Alt+Left key combo
Go back to main page on Alt+Left key combo.
https://bugzilla.gnome.org/show_bug.cgi?id=741047
src/properties-window.vala | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/properties-window.vala b/src/properties-window.vala
index 2cb9ab5..898f52e 100644
--- a/src/properties-window.vala
+++ b/src/properties-window.vala
@@ -78,9 +78,19 @@ private class Boxes.PropertiesWindow: Gtk.Window, Boxes.UI {
[GtkCallback]
private bool on_key_pressed (Widget widget, Gdk.EventKey event) {
- if (event.keyval == Gdk.Key.Escape) // ESC -> back
+ var default_modifiers = Gtk.accelerator_get_default_mod_mask ();
+
+ if (event.keyval == Gdk.Key.Left && // ALT + Left -> back
+ (event.state & default_modifiers) == Gdk.ModifierType.MOD1_MASK) {
+ topbar.click_back_button ();
+
+ return true;
+ } else if (event.keyval == Gdk.Key.Escape) { // ESC -> back
revert_state ();
+ return true;
+ }
+
return false;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]