[gnome-games] ui: Bind on_display_back() to Alt+Left/Right
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] ui: Bind on_display_back() to Alt+Left/Right
- Date: Fri, 1 Dec 2017 14:11:19 +0000 (UTC)
commit a0e49546332339b444c20d356ce4c6ec4a7d0869
Author: Adrien Plazas <kekun plazas laposte net>
Date: Fri Dec 1 15:07:56 2017 +0100
ui: Bind on_display_back() to Alt+Left/Right
Go back from the game display to the collection by pressing Alt+Left on
left-to-right text direction or Alt+Right on right-to-left text
direction.
src/ui/application-window.vala | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/ui/application-window.vala b/src/ui/application-window.vala
index 4c157ef..4ea906d 100644
--- a/src/ui/application-window.vala
+++ b/src/ui/application-window.vala
@@ -513,6 +513,14 @@ private class Games.ApplicationWindow : Gtk.ApplicationWindow {
return true;
}
+ if (((event.state & default_modifiers) == Gdk.ModifierType.MOD1_MASK) &&
+ (((get_direction () == Gtk.TextDirection.LTR) && event.keyval == Gdk.Key.Left) ||
+ ((get_direction () == Gtk.TextDirection.RTL) && event.keyval == Gdk.Key.Right))) {
+ on_display_back ();
+
+ return true;
+ }
+
return false;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]