[gnome-games] collection-view: Toggle selection mode on Shift+10 or Menu key



commit a68dac5b1e5ab22503cbdf25ca23a94ffff9992e
Author: Neville <nevilleantony98 gmail com>
Date:   Tue Aug 25 20:40:29 2020 +0530

    collection-view: Toggle selection mode on Shift+10 or Menu key

 src/ui/collection-view.vala | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/src/ui/collection-view.vala b/src/ui/collection-view.vala
index 39d8a9e7..7a7a4ed6 100644
--- a/src/ui/collection-view.vala
+++ b/src/ui/collection-view.vala
@@ -226,6 +226,14 @@ private class Games.CollectionView : Gtk.Box, UiView {
                        return true;
                }
 
+               if (((keyval == Gdk.Key.Menu) || ((keyval == Gdk.Key.F10) &&
+                   (event.state & default_modifiers) == Gdk.ModifierType.SHIFT_MASK)) &&
+                   !collections_page.is_collection_empty && !is_empty_collection) {
+                       toggle_select ();
+
+                       return true;
+               }
+
                if (is_empty_collection)
                        return false;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]