mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 14:20:21 +00:00
notebook: Stop using child properties
This commit is contained in:
parent
7f6213291d
commit
a97845c380
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user