[gtk/child-properties-be-gone: 7/12] notebook: Stop using child properties



commit ae05795a62f6734a56b9644c40622758634aa5b2
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Apr 5 04:01:30 2019 +0000

    notebook: Stop using child properties

 gtk/gtknotebook.c | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 868bbfa956..94c2b04ed0 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -3378,6 +3378,7 @@ do_detach_tab (GtkNotebook *from,
   gboolean tab_expand, tab_fill, reorderable, detachable;
   GList *element;
   gint page_num;
+  GtkNotebookPage *page;
 
   menu_label = gtk_notebook_get_menu_label (from, child);
 
@@ -3391,13 +3392,13 @@ do_detach_tab (GtkNotebook *from,
 
   g_object_ref (child);
 
-  gtk_container_child_get (GTK_CONTAINER (from),
-                           child,
-                           "tab-expand", &tab_expand,
-                           "tab-fill", &tab_fill,
-                           "reorderable", &reorderable,
-                           "detachable", &detachable,
-                           NULL);
+  page = gtk_notebook_get_page (from, child);
+  g_object_get (page,
+                "tab-expand", &tab_expand,
+                "tab-fill", &tab_fill,
+                "reorderable", &reorderable,
+                "detachable", &detachable,
+                NULL);
 
   gtk_notebook_detach_tab (from, child);
 
@@ -3405,12 +3406,14 @@ do_detach_tab (GtkNotebook *from,
   page_num = g_list_position (to_priv->children, element);
   gtk_notebook_insert_page_menu (to, child, tab_label, menu_label, page_num);
 
-  gtk_container_child_set (GTK_CONTAINER (to), child,
-                           "tab-expand", tab_expand,
-                           "tab-fill", tab_fill,
-                           "reorderable", reorderable,
-                           "detachable", detachable,
-                           NULL);
+  page = gtk_notebook_get_page (to, child);
+  g_object_set (page,
+                "tab-expand", tab_expand,
+                "tab-fill", tab_fill,
+                "reorderable", reorderable,
+                "detachable", detachable,
+                NULL);
+
   if (child)
     g_object_unref (child);
 


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