[gnome-games/wip/exalm/spinner-performance] collection-box: Use GamesView



commit 76b246180be650b23580e6cbc888fd9757ea6408
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Fri Sep 21 18:58:10 2018 +0500

    collection-box: Use GamesView

 data/ui/collection-box.ui  |  4 ++--
 src/ui/collection-box.vala | 14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/data/ui/collection-box.ui b/data/ui/collection-box.ui
index 74e8957a..fd620dda 100644
--- a/data/ui/collection-box.ui
+++ b/data/ui/collection-box.ui
@@ -32,11 +32,11 @@
             <child>
               <object class="GtkStack" id="viewstack">
                 <property name="visible">True</property>
-                <property name="visible-child">collection_view</property>
+                <property name="visible-child">games_view</property>
                 <property name="transition-type">GTK_STACK_TRANSITION_TYPE_CROSSFADE</property>
                 <signal name="notify::visible-child" handler="on_visible_child_changed"/>
                 <child>
-                  <object class="GamesCollectionIconView" id="collection_view">
+                  <object class="GamesGamesView" id="games_view">
                     <property name="visible">True</property>
                     <signal name="game-activated" handler="on_game_activated"/>
                   </object>
diff --git a/src/ui/collection-box.vala b/src/ui/collection-box.vala
index acc7a443..30a96454 100644
--- a/src/ui/collection-box.vala
+++ b/src/ui/collection-box.vala
@@ -15,7 +15,7 @@ private class Games.CollectionBox : Gtk.Box {
        [GtkChild]
        private EmptyCollection empty_collection;
        [GtkChild]
-       private CollectionIconView collection_view;
+       private GamesView games_view;
        [GtkChild]
        private DevelopersView developer_view;
        [GtkChild]
@@ -51,7 +51,7 @@ private class Games.CollectionBox : Gtk.Box {
        }
 
        construct {
-               collection_binding = bind_property ("collection", collection_view, "model",
+               collection_binding = bind_property ("collection", games_view, "model",
                                                    BindingFlags.BIDIRECTIONAL);
 
                developer_collection_binding = bind_property ("collection", developer_view,
@@ -104,7 +104,7 @@ private class Games.CollectionBox : Gtk.Box {
                        else if (viewstack.visible_child == developer_view)
                                return developer_view.gamepad_button_press_event (event);
                        else
-                               return collection_view.gamepad_button_press_event (event);
+                               return games_view.gamepad_button_press_event (event);
                }
        }
 
@@ -117,7 +117,7 @@ private class Games.CollectionBox : Gtk.Box {
                else if (viewstack.visible_child == developer_view)
                        return developer_view.gamepad_button_release_event (event);
                else
-                       return collection_view.gamepad_button_release_event (event);
+                       return games_view.gamepad_button_release_event (event);
        }
 
        public bool gamepad_absolute_axis_event (Manette.Event event) {
@@ -129,7 +129,7 @@ private class Games.CollectionBox : Gtk.Box {
                else if (viewstack.visible_child == developer_view)
                        return developer_view.gamepad_absolute_axis_event (event);
                else
-                       return collection_view.gamepad_absolute_axis_event (event);
+                       return games_view.gamepad_absolute_axis_event (event);
        }
 
        [GtkCallback]
@@ -151,7 +151,7 @@ private class Games.CollectionBox : Gtk.Box {
                        developer_view.select_default_row ();
                }
                else {
-                       collection_view.reset_scroll_position ();
+                       games_view.select_default_row ();
                }
        }
 
@@ -164,7 +164,7 @@ private class Games.CollectionBox : Gtk.Box {
                        developer_view.filtering_text = search_bar.text;
                }
                else
-                       collection_view.filtering_text = search_bar.text;
+                       games_view.filtering_text = search_bar.text;
        }
 
        public bool search_bar_handle_event (Gdk.Event event) {


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