diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-05-08 10:57:21 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-05-11 22:38:21 -0400 |
commit | 0daa1f3daa81682c1d5b3318ae579c193fffd7b1 (patch) | |
tree | 9d6b105251b09a180729dc8af408e373536f355d /gtk/gtknotebook.c | |
parent | c7b7d78ae190b9b2728fbacb4b8869f36d6c1710 (diff) | |
download | gtk+-0daa1f3daa81682c1d5b3318ae579c193fffd7b1.tar.gz |
Stop using container api on GtkNotebook
Diffstat (limited to 'gtk/gtknotebook.c')
-rw-r--r-- | gtk/gtknotebook.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index d09f05aac6..62ff10a72e 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -3337,7 +3337,7 @@ gtk_notebook_detach_tab (GtkNotebook *notebook, GtkWidget *child) { notebook->remove_in_detach = TRUE; - gtk_container_remove (GTK_CONTAINER (notebook), child); + gtk_notebook_remove (notebook, child); notebook->remove_in_detach = FALSE; } @@ -5555,7 +5555,7 @@ gtk_notebook_menu_item_recreate (GtkNotebook *notebook, GtkWidget *menu_item = gtk_widget_get_parent (page->menu_label); gtk_container_remove (GTK_CONTAINER (menu_item), page->menu_label); - gtk_container_remove (GTK_CONTAINER (notebook->menu), menu_item); + gtk_widget_unparent (menu_item); gtk_notebook_menu_item_create (notebook, page); } @@ -5810,8 +5810,7 @@ gtk_notebook_remove_page (GtkNotebook *notebook, list = g_list_last (notebook->children); if (list) - gtk_container_remove (GTK_CONTAINER (notebook), - ((GtkNotebookPage *) list->data)->child); + gtk_notebook_remove (notebook, ((GtkNotebookPage *) list->data)->child); } /* Public GtkNotebook Page Switch Methods : @@ -6627,8 +6626,7 @@ gtk_notebook_set_menu_label (GtkNotebook *notebook, if (page->menu_label) { if (notebook->menu) - gtk_container_remove (GTK_CONTAINER (notebook->menu), - gtk_widget_get_parent (page->menu_label)); + gtk_widget_destroy (gtk_widget_get_parent (page->menu_label)); g_clear_object (&page->menu_label); } |