[libadwaita/wip/exalm/demo-cleanups: 19/20] demo-window: Rename content_box to main_leaflet




commit 1304282aed0f656c8aca91d4095045dc304619fb
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Thu Dec 9 19:19:14 2021 +0500

    demo-window: Rename content_box to main_leaflet

 demo/adw-demo-window.c  | 10 +++++-----
 demo/adw-demo-window.ui |  8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/demo/adw-demo-window.c b/demo/adw-demo-window.c
index 6ed256d2..7b48a2ac 100644
--- a/demo/adw-demo-window.c
+++ b/demo/adw-demo-window.c
@@ -21,7 +21,7 @@ struct _AdwDemoWindow
   AdwApplicationWindow parent_instance;
 
   GtkWidget *color_scheme_button;
-  AdwLeaflet *content_box;
+  AdwLeaflet *main_leaflet;
   AdwLeaflet *subpage_leaflet;
   AdwDemoPageToasts *toasts_page;
 };
@@ -63,14 +63,14 @@ notify_visible_child_cb (GObject       *sender,
                          GParamSpec    *pspec,
                          AdwDemoWindow *self)
 {
-  adw_leaflet_navigate (self->content_box, ADW_NAVIGATION_DIRECTION_FORWARD);
+  adw_leaflet_navigate (self->main_leaflet, ADW_NAVIGATION_DIRECTION_FORWARD);
 }
 
 static void
 back_clicked_cb (GtkWidget     *sender,
                  AdwDemoWindow *self)
 {
-  adw_leaflet_navigate (self->content_box, ADW_NAVIGATION_DIRECTION_BACK);
+  adw_leaflet_navigate (self->main_leaflet, ADW_NAVIGATION_DIRECTION_BACK);
 }
 
 static void
@@ -101,7 +101,7 @@ adw_demo_window_class_init (AdwDemoWindowClass *klass)
 
   gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/Adwaita1/Demo/ui/adw-demo-window.ui");
   gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, color_scheme_button);
-  gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, content_box);
+  gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, main_leaflet);
   gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, subpage_leaflet);
   gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, toasts_page);
   gtk_widget_class_bind_template_callback (widget_class, get_color_scheme_icon_name);
@@ -143,7 +143,7 @@ adw_demo_window_init (AdwDemoWindow *self)
 
   notify_system_supports_color_schemes_cb (self);
 
-  adw_leaflet_navigate (self->content_box, ADW_NAVIGATION_DIRECTION_FORWARD);
+  adw_leaflet_navigate (self->main_leaflet, ADW_NAVIGATION_DIRECTION_FORWARD);
 }
 
 AdwDemoWindow *
diff --git a/demo/adw-demo-window.ui b/demo/adw-demo-window.ui
index 8f768c85..39f50f2c 100644
--- a/demo/adw-demo-window.ui
+++ b/demo/adw-demo-window.ui
@@ -34,7 +34,7 @@
             <property name="can-unfold">False</property>
             <property name="transition-type" bind-source="leaflet_page" bind-property="transition-type" 
bind-flags="sync-create|bidirectional"/>
             <child>
-              <object class="AdwLeaflet" id="content_box">
+              <object class="AdwLeaflet" id="main_leaflet">
                 <property name="can-navigate-back">True</property>
                 <property name="transition-type" bind-source="leaflet_page" bind-property="transition-type" 
bind-flags="sync-create|bidirectional"/>
                 <child>
@@ -42,7 +42,7 @@
                     <property name="orientation">vertical</property>
                     <child>
                       <object class="AdwHeaderBar">
-                        <property name="show-end-title-buttons" bind-source="content_box" 
bind-property="folded" bind-flags="sync-create"/>
+                        <property name="show-end-title-buttons" bind-source="main_leaflet" 
bind-property="folded" bind-flags="sync-create"/>
                         <child type="start">
                           <object class="GtkButton" id="color_scheme_button">
                             <binding name="icon-name">
@@ -88,7 +88,7 @@
                     <property name="hexpand">True</property>
                     <child>
                       <object class="AdwHeaderBar">
-                        <property name="show-start-title-buttons" bind-source="content_box" 
bind-property="folded" bind-flags="sync-create"/>
+                        <property name="show-start-title-buttons" bind-source="main_leaflet" 
bind-property="folded" bind-flags="sync-create"/>
                         <property name="title-widget">
                           <object class="GtkBox"/>
                         </property>
@@ -97,7 +97,7 @@
                             <property name="valign">center</property>
                             <property name="tooltip-text" translatable="yes">Back</property>
                             <property name="icon-name">go-previous-symbolic</property>
-                            <property name="visible" bind-source="content_box" bind-property="folded" 
bind-flags="sync-create"/>
+                            <property name="visible" bind-source="main_leaflet" bind-property="folded" 
bind-flags="sync-create"/>
                             <signal name="clicked" handler="back_clicked_cb"/>
                           </object>
                         </child>


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