[gnome-games] collection-view: Don't allow ctrl+f for empty state



commit 452051549ef26aad65d8f395b4453ce1ea36f6bd
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon Jan 27 20:51:26 2020 +0500

    collection-view: Don't allow ctrl+f for empty state

 src/ui/collection-view.vala | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/ui/collection-view.vala b/src/ui/collection-view.vala
index 2e89d7fe..23fe5643 100644
--- a/src/ui/collection-view.vala
+++ b/src/ui/collection-view.vala
@@ -128,7 +128,8 @@ private class Games.CollectionView : Object, UiView {
                }
 
                if ((keyval == Gdk.Key.f || keyval == Gdk.Key.F) &&
-                   (event.state & default_modifiers) == Gdk.ModifierType.CONTROL_MASK) {
+                   (event.state & default_modifiers) == Gdk.ModifierType.CONTROL_MASK &&
+                   !is_collection_empty) {
                        if (!search_mode)
                                search_mode = true;
 


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