From dc4148c4e2d17e43f9c06dd41334de642755ce0d Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 19 Dec 2015 08:03:41 +0100 Subject: [PATCH] notebook: Simplify gtk_notebook_map() We set visibility on our children properly, so we can simply chain up and let the GtkContainer implementation do the mapping of children. --- gtk/gtknotebook.c | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 15276063c6..c71b43bf44 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -1972,43 +1972,8 @@ gtk_notebook_map (GtkWidget *widget) { GtkNotebook *notebook = GTK_NOTEBOOK (widget); GtkNotebookPrivate *priv = notebook->priv; - GtkNotebookPage *page; - GList *children; - gint i; - gtk_widget_set_mapped (widget, TRUE); - - if (priv->cur_page && - gtk_widget_get_visible (priv->cur_page->child) && - !gtk_widget_get_mapped (priv->cur_page->child)) - gtk_widget_map (priv->cur_page->child); - - for (i = 0; i < N_ACTION_WIDGETS; i++) - { - if (priv->action_widget[i] && - gtk_widget_get_visible (priv->action_widget[i]) && - gtk_widget_get_child_visible (priv->action_widget[i]) && - !gtk_widget_get_mapped (priv->action_widget[i])) - gtk_widget_map (priv->action_widget[i]); - } - - if (priv->scrollable) - gtk_notebook_pages_allocate (notebook); - else - { - children = priv->children; - - while (children) - { - page = children->data; - children = children->next; - - if (page->tab_label && - gtk_widget_get_visible (page->tab_label) && - !gtk_widget_get_mapped (page->tab_label)) - gtk_widget_map (page->tab_label); - } - } + GTK_WIDGET_CLASS (gtk_notebook_parent_class)->map (widget); if (gtk_notebook_get_event_window_position (notebook, NULL)) gdk_window_show_unraised (priv->event_window);