[gnome-games/wip/exalm/libhandy: 30/32] preferences-window: Don't call leaflets boxes



commit 8ea25faeeebf565af80aa1455fb83ffc591965c8
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Tue Feb 25 23:16:44 2020 +0500

    preferences-window: Don't call leaflets boxes
    
    This was a very old leftover, time to finally get rid of it.

 data/ui/preferences-window.ui  |  8 ++++----
 src/ui/preferences-window.vala | 20 ++++++++++----------
 2 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/data/ui/preferences-window.ui b/data/ui/preferences-window.ui
index 29068bca..92f4ec42 100644
--- a/data/ui/preferences-window.ui
+++ b/data/ui/preferences-window.ui
@@ -15,7 +15,7 @@
             <property name="transition-type">slide-left-right</property>
             <property name="transition-duration">250</property>
             <child>
-              <object class="HdyLeaflet" id="titlebar_box">
+              <object class="HdyLeaflet" id="titlebar_leaflet">
                 <property name="visible">True</property>
                 <signal name="notify::visible-child" handler="update_header_group"/>
                 <child>
@@ -112,7 +112,7 @@
         <property name="transition-duration">250</property>
         <signal name="notify::transition-running" handler="subpage_transition_finished"/>
         <child>
-          <object class="HdyLeaflet" id="content_box">
+          <object class="HdyLeaflet" id="content_leaflet">
             <property name="visible">True</property>
             <property name="can-swipe-back">True</property>
             <signal name="notify::folded" handler="on_folded_changed" after="yes"/>
@@ -199,8 +199,8 @@
   </object>
   <object class="HdySwipeGroup">
     <swipeables>
-      <swipeable name="titlebar_box"/>
-      <swipeable name="content_box"/>
+      <swipeable name="titlebar_leaflet"/>
+      <swipeable name="content_leaflet"/>
     </swipeables>
   </object>
 </interface>
diff --git a/src/ui/preferences-window.vala b/src/ui/preferences-window.vala
index 26b5b926..5b0bb998 100644
--- a/src/ui/preferences-window.vala
+++ b/src/ui/preferences-window.vala
@@ -7,7 +7,7 @@ private class Games.PreferencesWindow : Gtk.Window {
        [GtkChild]
        private Gtk.Stack titlebar_stack;
        [GtkChild]
-       private Hdy.Leaflet titlebar_box;
+       private Hdy.Leaflet titlebar_leaflet;
        [GtkChild]
        private Gtk.Box titlebar_subpage_box;
        [GtkChild]
@@ -15,7 +15,7 @@ private class Games.PreferencesWindow : Gtk.Window {
        [GtkChild]
        private Gtk.Stack main_stack;
        [GtkChild]
-       private Hdy.Leaflet content_box;
+       private Hdy.Leaflet content_leaflet;
        [GtkChild]
        private Gtk.Box content_subpage_box;
        [GtkChild]
@@ -38,8 +38,8 @@ private class Games.PreferencesWindow : Gtk.Window {
 
                        if (subpage != null) {
                                previous_subpage = subpage;
-                               main_stack.visible_child = content_box;
-                               titlebar_stack.visible_child = titlebar_box;
+                               main_stack.visible_child = content_leaflet;
+                               titlebar_stack.visible_child = titlebar_leaflet;
                                selection_mode_binding.unbind ();
                        }
 
@@ -56,7 +56,7 @@ private class Games.PreferencesWindow : Gtk.Window {
                                titlebar_subpage_box.add (header_bar);
                                titlebar_stack.visible_child = titlebar_subpage_box;
 
-                               content_box.navigate (Hdy.NavigationDirection.FORWARD);
+                               content_leaflet.navigate (Hdy.NavigationDirection.FORWARD);
                        }
 
                        _subpage = value;
@@ -75,7 +75,7 @@ private class Games.PreferencesWindow : Gtk.Window {
 
        [GtkCallback]
        private void sidebar_row_selected () {
-               content_box.navigate (Hdy.NavigationDirection.FORWARD);
+               content_leaflet.navigate (Hdy.NavigationDirection.FORWARD);
 
                update_ui ();
        }
@@ -107,13 +107,13 @@ private class Games.PreferencesWindow : Gtk.Window {
 
        [GtkCallback]
        private void on_back_clicked () {
-               if (!content_box.navigate (Hdy.NavigationDirection.BACK))
+               if (!content_leaflet.navigate (Hdy.NavigationDirection.BACK))
                        close ();
        }
 
        [GtkCallback]
        private void on_folded_changed () {
-               var folded = content_box.folded;
+               var folded = content_leaflet.folded;
 
                update_header_group ();
                page_back_button.visible = folded;
@@ -127,8 +127,8 @@ private class Games.PreferencesWindow : Gtk.Window {
        }
 
        private void update_header_group () {
-               var folded = content_box.folded;
-               var visible_header_bar = titlebar_box.visible_child as Gtk.HeaderBar;
+               var folded = content_leaflet.folded;
+               var visible_header_bar = titlebar_leaflet.visible_child as Gtk.HeaderBar;
 
                if (folded)
                        header_group.focus = visible_header_bar;


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