[gtk] gtk-demo: Fix fallout from the notebook page merge



commit b1fe5d8f1f9d895443ee6c0fd4850b3d3b5621b3
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Feb 21 11:13:53 2019 -0500

    gtk-demo: Fix fallout from the notebook page merge
    
    I have overlooked a few places where the child properties
    were used. Sorry.

 demos/gtk-demo/main.c  |  7 ++--
 demos/gtk-demo/main.ui | 98 ++++++++++++++++++++++++--------------------------
 2 files changed, 50 insertions(+), 55 deletions(-)
---
diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c
index bf5f32e0b8..81a01e06fc 100644
--- a/demos/gtk-demo/main.c
+++ b/demos/gtk-demo/main.c
@@ -667,10 +667,9 @@ add_data_tab (const gchar *demoname)
       label = gtk_label_new (resources[i]);
       gtk_widget_show (label);
       gtk_notebook_append_page (GTK_NOTEBOOK (notebook), widget, label);
-      gtk_container_child_set (GTK_CONTAINER (notebook),
-                               widget,
-                               "tab-expand", TRUE,
-                               NULL);
+      g_object_set (gtk_notebook_get_page (GTK_NOTEBOOK (notebook), widget),
+                    "tab-expand", TRUE,
+                    NULL);
 
       g_free (resource_name);
     }
diff --git a/demos/gtk-demo/main.ui b/demos/gtk-demo/main.ui
index e86c3af13a..8ed41e3666 100644
--- a/demos/gtk-demo/main.ui
+++ b/demos/gtk-demo/main.ui
@@ -86,65 +86,61 @@
             <property name="show-border">0</property>
             <property name="expand">1</property>
             <child>
-              <object class="GtkScrolledWindow">
-                <property name="can-focus">1</property>
-                <child>
-                  <object class="GtkTextView" id="info-textview">
+              <object class="GtkNotebookPage">
+                <property name="tab-expand">1</property>
+                <property name="child">
+                  <object class="GtkScrolledWindow">
                     <property name="can-focus">1</property>
-                    <property name="left-margin">20</property>
-                    <property name="right-margin">20</property>
-                    <property name="top-margin">20</property>
-                    <property name="bottom-margin">20</property>
-                    <property name="pixels-above-lines">2</property>
-                    <property name="pixels-below-lines">2</property>
-                    <property name="editable">0</property>
-                    <property name="wrap-mode">word</property>
-                    <property name="cursor-visible">0</property>
+                    <child>
+                      <object class="GtkTextView" id="info-textview">
+                        <property name="can-focus">1</property>
+                        <property name="left-margin">20</property>
+                        <property name="right-margin">20</property>
+                        <property name="top-margin">20</property>
+                        <property name="bottom-margin">20</property>
+                        <property name="pixels-above-lines">2</property>
+                        <property name="pixels-below-lines">2</property>
+                        <property name="editable">0</property>
+                        <property name="wrap-mode">word</property>
+                        <property name="cursor-visible">0</property>
+                      </object>
+                    </child>
                   </object>
-                </child>
-              </object>
-              <packing>
-                <property name="tab-expand">1</property>
-              </packing>
-            </child>
-            <child type="tab">
-              <object class="GtkLabel">
-                <property name="label" translatable="yes">_Info</property>
-                <property name="use-underline">1</property>
+                </property>
+                <property name="tab">
+                  <object class="GtkLabel">
+                    <property name="label" translatable="yes">_Info</property>
+                    <property name="use-underline">1</property>
+                  </object>
+                </property>
               </object>
-              <packing>
-                <property name="tab-expand">1</property>
-                <property name="tab-fill">0</property>
-              </packing>
             </child>
             <child>
-              <object class="GtkScrolledWindow" id="source-scrolledwindow">
-                <property name="can-focus">1</property>
-                <child>
-                  <object class="GtkTextView" id="source-textview">
-                    <property name="can-focus">1</property>
-                    <property name="left-margin">20</property>
-                    <property name="right-margin">20</property>
-                    <property name="top-margin">20</property>
-                    <property name="bottom-margin">20</property>
-                    <property name="editable">0</property>
-                    <property name="cursor-visible">0</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
+              <object class="GtkNotebookPage">
                 <property name="position">1</property>
                 <property name="tab-expand">1</property>
-              </packing>
-            </child>
-            <child type="tab">
-              <object class="GtkLabel">
-                <property name="label" translatable="yes">Source</property>
+                <property name="child">
+                  <object class="GtkScrolledWindow" id="source-scrolledwindow">
+                    <property name="can-focus">1</property>
+                    <child>
+                      <object class="GtkTextView" id="source-textview">
+                        <property name="can-focus">1</property>
+                        <property name="left-margin">20</property>
+                        <property name="right-margin">20</property>
+                        <property name="top-margin">20</property>
+                        <property name="bottom-margin">20</property>
+                        <property name="editable">0</property>
+                        <property name="cursor-visible">0</property>
+                      </object>
+                    </child>
+                  </object>
+                </property>
+                <property name="tab">
+                  <object class="GtkLabel">
+                    <property name="label" translatable="yes">Source</property>
+                  </object>
+                </property>
               </object>
-              <packing>
-                <property name="position">1</property>
-                <property name="tab-fill">0</property>
-              </packing>
             </child>
           </object>
         </child>


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