summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-04-05 04:01:30 +0000
committerMatthias Clasen <mclasen@redhat.com>2019-04-05 12:01:43 +0000
commita97845c3800baf5cc2275028c584caea14df6572 (patch)
treeefb9dcb90831ab5952f10cd9dfb70f750b84401b
parent7f6213291d8178b7e7fad8dd76e08854d4138686 (diff)
downloadgtk+-a97845c3800baf5cc2275028c584caea14df6572.tar.gz
notebook: Stop using child properties
-rw-r--r--gtk/gtknotebook.c29
1 files 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);