diff options
-rw-r--r-- | gtk/gtkshortcutssection.c | 13 | ||||
-rw-r--r-- | gtk/gtkshortcutswindow.c | 41 |
2 files changed, 26 insertions, 28 deletions
diff --git a/gtk/gtkshortcutssection.c b/gtk/gtkshortcutssection.c index 3295ebb885..e21d5ce897 100644 --- a/gtk/gtkshortcutssection.c +++ b/gtk/gtkshortcutssection.c @@ -163,14 +163,15 @@ gtk_shortcuts_section_forall (GtkContainer *container, if (include_internal) { - callback (GTK_WIDGET (self->stack), callback_data); - callback (GTK_WIDGET (self->footer), callback_data); + GTK_CONTAINER_CLASS (gtk_shortcuts_section_parent_class)->forall (container, include_internal, callback, callback_data); } - - for (l = self->groups; l; l = l->next) + else { - GtkWidget *group = l->data; - callback (group, callback_data); + for (l = self->groups; l; l = l->next) + { + GtkWidget *group = l->data; + callback (group, callback_data); + } } } diff --git a/gtk/gtkshortcutswindow.c b/gtk/gtkshortcutswindow.c index 09e6a07c24..6edb4ee756 100644 --- a/gtk/gtkshortcutswindow.c +++ b/gtk/gtkshortcutswindow.c @@ -371,32 +371,29 @@ gtk_shortcuts_window_forall (GtkContainer *container, if (include_internal) { - if (priv->header_bar) - callback (GTK_WIDGET (priv->header_bar), callback_data); - if (priv->main_box) - callback (GTK_WIDGET (priv->main_box), callback_data); - if (priv->popover) - callback (GTK_WIDGET (priv->popover), callback_data); + GTK_CONTAINER_CLASS (gtk_shortcuts_window_parent_class)->forall (container, include_internal, callback, callback_data); } - - if (priv->stack) + else { - GList *children, *l; - GtkWidget *search; - GtkWidget *empty; - - search = gtk_stack_get_child_by_name (GTK_STACK (priv->stack), "internal-search"); - empty = gtk_stack_get_child_by_name (GTK_STACK (priv->stack), "no-search-results"); - children = gtk_container_get_children (GTK_CONTAINER (priv->stack)); - for (l = children; l; l = l->next) + if (priv->stack) { - GtkWidget *child = l->data; - - if (include_internal || - (child != search && child != empty)) - callback (child, callback_data); + GList *children, *l; + GtkWidget *search; + GtkWidget *empty; + + search = gtk_stack_get_child_by_name (GTK_STACK (priv->stack), "internal-search"); + empty = gtk_stack_get_child_by_name (GTK_STACK (priv->stack), "no-search-results"); + children = gtk_container_get_children (GTK_CONTAINER (priv->stack)); + for (l = children; l; l = l->next) + { + GtkWidget *child = l->data; + + if (include_internal || + (child != search && child != empty)) + callback (child, callback_data); + } + g_list_free (children); } - g_list_free (children); } } |