notebook: Stop using child properties

This commit is contained in:
Matthias Clasen 2019-04-05 04:01:30 +00:00
parent 7f6213291d
commit a97845c380

View File

@ -3378,6 +3378,7 @@ do_detach_tab (GtkNotebook *from,
gboolean tab_expand, tab_fill, reorderable, detachable; gboolean tab_expand, tab_fill, reorderable, detachable;
GList *element; GList *element;
gint page_num; gint page_num;
GtkNotebookPage *page;
menu_label = gtk_notebook_get_menu_label (from, child); menu_label = gtk_notebook_get_menu_label (from, child);
@ -3391,13 +3392,13 @@ do_detach_tab (GtkNotebook *from,
g_object_ref (child); g_object_ref (child);
gtk_container_child_get (GTK_CONTAINER (from), page = gtk_notebook_get_page (from, child);
child, g_object_get (page,
"tab-expand", &tab_expand, "tab-expand", &tab_expand,
"tab-fill", &tab_fill, "tab-fill", &tab_fill,
"reorderable", &reorderable, "reorderable", &reorderable,
"detachable", &detachable, "detachable", &detachable,
NULL); NULL);
gtk_notebook_detach_tab (from, child); gtk_notebook_detach_tab (from, child);
@ -3405,12 +3406,14 @@ do_detach_tab (GtkNotebook *from,
page_num = g_list_position (to_priv->children, element); page_num = g_list_position (to_priv->children, element);
gtk_notebook_insert_page_menu (to, child, tab_label, menu_label, page_num); gtk_notebook_insert_page_menu (to, child, tab_label, menu_label, page_num);
gtk_container_child_set (GTK_CONTAINER (to), child, page = gtk_notebook_get_page (to, child);
"tab-expand", tab_expand, g_object_set (page,
"tab-fill", tab_fill, "tab-expand", tab_expand,
"reorderable", reorderable, "tab-fill", tab_fill,
"detachable", detachable, "reorderable", reorderable,
NULL); "detachable", detachable,
NULL);
if (child) if (child)
g_object_unref (child); g_object_unref (child);