[gnome-games/wip/exalm/spinner-performance] ui: Remove loading notification



commit 871d141ae1c1a4dc99253830da0470a0e83132cf
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Wed Sep 5 20:23:03 2018 +0500

    ui: Remove loading notification
    
    Since it's not used anymore, it can be removed.

 data/ui/collection-box.ui      | 122 +++++++++++++----------------------------
 src/ui/application-window.vala |   5 --
 src/ui/collection-box.vala     |  11 ----
 3 files changed, 38 insertions(+), 100 deletions(-)
---
diff --git a/data/ui/collection-box.ui b/data/ui/collection-box.ui
index 25af85bc..cdf859c9 100644
--- a/data/ui/collection-box.ui
+++ b/data/ui/collection-box.ui
@@ -13,109 +13,63 @@
       </object>
     </child>
     <child>
-      <object class="GtkOverlay">
+      <object class="GtkStack" id="empty_stack">
         <property name="visible">True</property>
-        <property name="vexpand">True</property>
+        <property name="visible-child">sidebar_box</property>
+        <property name="transition-type">GTK_STACK_TRANSITION_TYPE_CROSSFADE</property>
         <child>
-          <object class="GtkStack" id="empty_stack">
+          <object class="GamesEmptyCollection" id="empty_collection">
             <property name="visible">True</property>
-            <property name="visible-child">sidebar_box</property>
-            <property name="transition-type">GTK_STACK_TRANSITION_TYPE_CROSSFADE</property>
-            <child>
-              <object class="GamesEmptyCollection" id="empty_collection">
-                <property name="visible">True</property>
-              </object>
-              <packing>
-                <property name="name">empty</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkBox" id="sidebar_box">
-                <property name="visible">True</property>
-                <child>
-                  <object class="GtkStack" id="viewstack">
-                    <property name="visible">False</property>
-                    <property name="visible-child">games_view</property>
-                    <property name="transition-type">none</property>
-                    <signal name="notify::visible-child" handler="on_visible_child_changed"/>
-                    <child>
-                      <object class="GamesGamesView" id="games_view">
-                        <property name="visible">True</property>
-                      </object>
-                      <packing>
-                        <property name="name">games</property>
-                        <property name="title" translatable="yes">Games</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GamesDevelopersView" id="developer_view">
-                        <property name="visible">True</property>
-                        <property name="collection-view">collection_view</property>
-                      </object>
-                      <packing>
-                        <property name="name">developer</property>
-                        <property name="title" translatable="yes">Developers</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GamesPlatformsView" id="platform_view">
-                        <property name="visible">True</property>
-                        <property name="collection-view">collection_view</property>
-                      </object>
-                      <packing>
-                        <property name="name">platform</property>
-                        <property name="title" translatable="yes">Platforms</property>
-                      </packing>
-                    </child>
-                  </object>
-                </child>
-                <child>
-                  <object class="GamesCollectionIconView" id="collection_view">
-                    <property name="visible">True</property>
-                    <property name="expand">True</property>
-                    <signal name="game-activated" handler="on_game_activated"/>
-                  </object>
-                </child>
-              </object>
-            </child>
           </object>
+          <packing>
+            <property name="name">empty</property>
+          </packing>
         </child>
-        <child type="overlay">
-          <object class="GtkRevealer" id="loading_notification_revealer">
+        <child>
+          <object class="GtkBox" id="sidebar_box">
             <property name="visible">True</property>
-            <property name="halign">center</property>
-            <property name="valign">start</property>
             <child>
-              <object class="GtkBox">
-                <property name="visible">True</property>
-                <property name="spacing">18</property>
+              <object class="GtkStack" id="viewstack">
+                <property name="visible">False</property>
+                <property name="visible-child">games_view</property>
+                <property name="transition-type">none</property>
+                <signal name="notify::visible-child" handler="on_visible_child_changed"/>
                 <child>
-                  <object class="GtkSpinner">
+                  <object class="GamesGamesView" id="games_view">
                     <property name="visible">True</property>
-                    <property name="active">True</property>
                   </object>
+                  <packing>
+                    <property name="name">games</property>
+                    <property name="title" translatable="yes">Games</property>
+                  </packing>
                 </child>
                 <child>
-                  <object class="GtkLabel">
+                  <object class="GamesDevelopersView" id="developer_view">
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes">Loading</property>
+                    <property name="collection-view">collection_view</property>
                   </object>
+                  <packing>
+                    <property name="name">developer</property>
+                    <property name="title" translatable="yes">Developers</property>
+                  </packing>
                 </child>
                 <child>
-                  <object class="GtkButton">
+                  <object class="GamesPlatformsView" id="platform_view">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="image">close_icon</property>
-                    <property name="always_show_image">True</property>
-                    <signal name="clicked" handler="on_loading_notification_closed"/>
-                    <style>
-                      <class name="flat"/>
-                    </style>
+                    <property name="collection-view">collection_view</property>
                   </object>
+                  <packing>
+                    <property name="name">platform</property>
+                    <property name="title" translatable="yes">Platforms</property>
+                  </packing>
                 </child>
-                <style>
-                  <class name="app-notification"/>
-                </style>
+              </object>
+            </child>
+            <child>
+              <object class="GamesCollectionIconView" id="collection_view">
+                <property name="visible">True</property>
+                <property name="expand">True</property>
+                <signal name="game-activated" handler="on_game_activated"/>
               </object>
             </child>
           </object>
diff --git a/src/ui/application-window.vala b/src/ui/application-window.vala
index 238a2d49..e81dc5af 100644
--- a/src/ui/application-window.vala
+++ b/src/ui/application-window.vala
@@ -71,8 +71,6 @@ private class Games.ApplicationWindow : Gtk.ApplicationWindow {
 
        public bool is_collection_empty { get; set; }
 
-       public bool loading_notification { get; set; }
-
        [GtkChild]
        private Gtk.Stack content_box;
        [GtkChild]
@@ -99,7 +97,6 @@ private class Games.ApplicationWindow : Gtk.ApplicationWindow {
        private Binding header_bar_search_binding;
        private Binding header_bar_fullscreen_binding;
        private Binding header_bar_empty_collection_binding;
-       private Binding loading_notification_binding;
 
        private Cancellable run_game_cancellable;
        private Cancellable quit_game_cancellable;
@@ -141,8 +138,6 @@ private class Games.ApplicationWindow : Gtk.ApplicationWindow {
 
                box_search_binding = bind_property ("search-mode", collection_box, "search-mode",
                                                    BindingFlags.BIDIRECTIONAL);
-               loading_notification_binding = bind_property ("loading-notification", collection_box, 
"loading-notification",
-                                                             BindingFlags.DEFAULT);
                header_bar_search_binding = bind_property ("search-mode", collection_header_bar, 
"search-mode",
                                                           BindingFlags.BIDIRECTIONAL);
 
diff --git a/src/ui/collection-box.vala b/src/ui/collection-box.vala
index 47ae0f0b..5ff5355a 100644
--- a/src/ui/collection-box.vala
+++ b/src/ui/collection-box.vala
@@ -6,13 +6,10 @@ private class Games.CollectionBox : Gtk.Box {
 
        public ListModel collection { get; construct set; }
        public bool search_mode { get; set; }
-       public bool loading_notification { get; set; }
 
        [GtkChild]
        private SearchBar search_bar;
        [GtkChild]
-       private Gtk.Revealer loading_notification_revealer;
-       [GtkChild]
        private Gtk.Box sidebar_box;
        [GtkChild]
        private EmptyCollection empty_collection;
@@ -46,7 +43,6 @@ private class Games.CollectionBox : Gtk.Box {
 
        private Binding collection_binding;
        private Binding search_binding;
-       private Binding loading_notification_binding;
 
        public CollectionBox (ListStore collection) {
                Object (collection: collection);
@@ -57,8 +53,6 @@ private class Games.CollectionBox : Gtk.Box {
                                                    BindingFlags.BIDIRECTIONAL);
                search_binding = bind_property ("search-mode", search_bar, "search-mode-enabled",
                                                BindingFlags.BIDIRECTIONAL);
-               loading_notification_binding = bind_property ("loading-notification", 
loading_notification_revealer, "reveal-child",
-                                                             BindingFlags.DEFAULT);
        }
 
        public bool gamepad_button_press_event (Manette.Event event) {
@@ -118,11 +112,6 @@ private class Games.CollectionBox : Gtk.Box {
                return view.gamepad_absolute_axis_event (event);
        }
 
-       [GtkCallback]
-       private void on_loading_notification_closed () {
-               loading_notification_revealer.set_reveal_child (false);
-       }
-
        [GtkCallback]
        private void on_game_activated (Game game) {
                game_activated (game);


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