[gnome-games/wip/exalm/gtk4: 29/29] ui: Stop using stack child properties and migrate to GtkStackPage



commit a63eca3329a5a85651416debf25deb586160d132
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Sun Feb 17 15:34:50 2019 +0500

    ui: Stop using stack child properties and migrate to GtkStackPage

 data/ui/application-window.ui | 12 ------------
 data/ui/collection-box.ui     | 44 +++++++++++++++++++++++++------------------
 data/ui/display-box.ui        |  6 ------
 3 files changed, 26 insertions(+), 36 deletions(-)
---
diff --git a/data/ui/application-window.ui b/data/ui/application-window.ui
index 2a5846dc..2723755a 100644
--- a/data/ui/application-window.ui
+++ b/data/ui/application-window.ui
@@ -26,17 +26,11 @@
           <object class="GamesCollectionBox" id="collection_box">
             <signal name="game-activated" handler="on_game_activated"/>
           </object>
-          <packing>
-            <property name="name">collection</property>
-          </packing>
         </child>
         <child>
           <object class="GamesDisplayBox" id="display_box">
             <signal name="back" handler="on_display_back"/>
           </object>
-          <packing>
-            <property name="name">display</property>
-          </packing>
         </child>
       </object>
     </child>
@@ -46,18 +40,12 @@
               <object class="GamesCollectionHeaderBar" id="collection_header_bar">
                 <property name="show-title-buttons">True</property>
               </object>
-              <packing>
-                <property name="name">collection</property>
-              </packing>
             </child>
             <child>
               <object class="GamesDisplayHeaderBar" id="display_header_bar">
                 <property name="show-title-buttons">True</property>
                 <signal name="back" handler="on_display_back"/>
               </object>
-              <packing>
-                <property name="name">display</property>
-              </packing>
             </child>
           </object>
     </child>
diff --git a/data/ui/collection-box.ui b/data/ui/collection-box.ui
index 19513a7f..7a2da83e 100644
--- a/data/ui/collection-box.ui
+++ b/data/ui/collection-box.ui
@@ -19,37 +19,45 @@
             <property name="transition-type">crossfade</property>
             <signal name="notify::visible-child" handler="on_visible_child_changed"/>
             <child>
-              <object class="GamesEmptyCollection" id="empty_collection" />
-              <packing>
+              <object class="GtkStackPage">
                 <property name="name">empty</property>
-              </packing>
+                <property name="child">
+                  <object class="GamesEmptyCollection" id="empty_collection" />
+                </property>
+              </object>
             </child>
             <child>
-              <object class="GamesCollectionIconView" id="collection_view">
-                <signal name="game-activated" handler="on_game_activated"/>
-              </object>
-              <packing>
+              <object class="GtkStackPage">
                 <property name="name">games</property>
                 <property name="title" translatable="yes">Games</property>
-              </packing>
+                <property name="child">
+                  <object class="GamesCollectionIconView" id="collection_view">
+                    <signal name="game-activated" handler="on_game_activated"/>
+                  </object>
+                </property>
+              </object>
             </child>
             <child>
-              <object class="GamesDevelopersView" id="developer_view">
-                <signal name="game-activated" handler="on_game_activated"/>
-              </object>
-              <packing>
+              <object class="GtkStackPage">
                 <property name="name">developer</property>
                 <property name="title" translatable="yes">Developers</property>
-              </packing>
+                <property name="child">
+                  <object class="GamesDevelopersView" id="developer_view">
+                    <signal name="game-activated" handler="on_game_activated"/>
+                  </object>
+                </property>
+              </object>
             </child>
             <child>
-              <object class="GamesPlatformsView" id="platform_view">
-                <signal name="game-activated" handler="on_game_activated"/>
-              </object>
-              <packing>
+              <object class="GtkStackPage">
                 <property name="name">platform</property>
                 <property name="title" translatable="yes">Platforms</property>
-              </packing>
+                <property name="child">
+                  <object class="GamesPlatformsView" id="platform_view">
+                    <signal name="game-activated" handler="on_game_activated"/>
+                  </object>
+                </property>
+              </object>
             </child>
           </object>
         </child>
diff --git a/data/ui/display-box.ui b/data/ui/display-box.ui
index 47827150..6e33a5e3 100644
--- a/data/ui/display-box.ui
+++ b/data/ui/display-box.ui
@@ -14,17 +14,11 @@
           <object class="GtkStack" id="stack">
             <child>
               <object class="GamesErrorDisplay" id="error_display"/>
-              <packing>
-                <property name="name">error</property>
-              </packing>
             </child>
             <child>
               <object class="GtkFrame" id="display_bin">
                 <property name="shadow-type">none</property>
               </object>
-              <packing>
-                <property name="name">display</property>
-              </packing>
             </child>
           </object>
         </child>


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