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



commit ab217e5b4f3d00922a80f1de67d160249a671ae6
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      | 116 +++++++++++++----------------------------
 src/ui/application-window.vala |   5 --
 src/ui/collection-box.vala     |  11 ----
 3 files changed, 35 insertions(+), 97 deletions(-)
---
diff --git a/data/ui/collection-box.ui b/data/ui/collection-box.ui
index 12c4c1c4..a9ed214b 100644
--- a/data/ui/collection-box.ui
+++ b/data/ui/collection-box.ui
@@ -13,94 +13,48 @@
       </object>
     </child>
     <child>
-      <object class="GtkOverlay">
+      <object class="GtkStack" id="viewstack">
         <property name="visible">True</property>
-        <property name="vexpand">True</property>
+        <property name="visible-child">collection_view</property>
+        <property name="transition-type">crossfade</property>
+        <signal name="notify::visible-child" handler="on_visible_child_changed"/>
         <child>
-          <object class="GtkStack" id="viewstack">
+          <object class="GamesEmptyCollection" id="empty_collection">
             <property name="visible">True</property>
-            <property name="visible-child">collection_view</property>
-            <property name="transition-type">crossfade</property>
-            <signal name="notify::visible-child" handler="on_visible_child_changed"/>
-            <child>
-              <object class="GamesEmptyCollection" id="empty_collection">
-                <property name="visible">True</property>
-              </object>
-              <packing>
-                <property name="name">empty</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GamesCollectionIconView" id="collection_view">
-                <property name="visible">True</property>
-                <signal name="game-activated" handler="on_game_activated"/>
-              </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>
-                <signal name="game-activated" handler="on_game_activated"/>
-              </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>
-                <signal name="game-activated" handler="on_game_activated"/>
-              </object>
-              <packing>
-                <property name="name">platform</property>
-                <property name="title" translatable="yes">Platforms</property>
-              </packing>
-            </child>
           </object>
+          <packing>
+            <property name="name">empty</property>
+          </packing>
         </child>
-        <child type="overlay">
-          <object class="GtkRevealer" id="loading_notification_revealer">
+        <child>
+          <object class="GamesCollectionIconView" id="collection_view">
+            <property name="visible">True</property>
+            <signal name="game-activated" handler="on_game_activated"/>
+          </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>
+            <signal name="game-activated" handler="on_game_activated"/>
+          </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="halign">center</property>
-            <property name="valign">start</property>
-            <child>
-              <object class="GtkBox">
-                <property name="visible">True</property>
-                <property name="spacing">18</property>
-                <child>
-                  <object class="GtkSpinner">
-                    <property name="visible">True</property>
-                    <property name="active">True</property>
-                  </object>
-                </child>
-                <child>
-                  <object class="GtkLabel">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Loading</property>
-                  </object>
-                </child>
-                <child>
-                  <object class="GtkButton">
-                    <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>
-                  </object>
-                </child>
-                <style>
-                  <class name="app-notification"/>
-                </style>
-              </object>
-            </child>
+            <signal name="game-activated" handler="on_game_activated"/>
           </object>
+          <packing>
+            <property name="name">platform</property>
+            <property name="title" translatable="yes">Platforms</property>
+          </packing>
         </child>
       </object>
     </child>
diff --git a/src/ui/application-window.vala b/src/ui/application-window.vala
index 3d06fad0..f5dbbcd5 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;
@@ -143,8 +140,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 e54e7ebb..5034687f 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 EmptyCollection empty_collection;
        [GtkChild]
        private CollectionIconView collection_view;
@@ -42,7 +39,6 @@ private class Games.CollectionBox : Gtk.Box {
        private Binding developer_collection_binding;
        private Binding platform_collection_binding;
        private Binding search_binding;
-       private Binding loading_notification_binding;
 
        public CollectionBox (ListStore collection) {
                Object (collection: collection);
@@ -60,8 +56,6 @@ private class Games.CollectionBox : Gtk.Box {
 
                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) {
@@ -130,11 +124,6 @@ private class Games.CollectionBox : Gtk.Box {
                        return collection_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]