[gtk+/wip/baedert/progressbar: 14/19] container: Remove include_internals parameter from forall
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/progressbar: 14/19] container: Remove include_internals parameter from forall
- Date: Mon, 24 Apr 2017 16:41:39 +0000 (UTC)
commit 424011cb1868190d7931c42625125c0a463f8b28
Author: Timm Bäder <mail baedert org>
Date: Sat Apr 22 22:16:27 2017 +0200
container: Remove include_internals parameter from forall
with include_internals=TRUE, this is the same as the (still private)
gtk_widget_forall, or just using the children/sibling accessors in a
loop.
demos/gtk-demo/gtkfishbowl.c | 4 ----
gtk/gtkactionbar.c | 20 ++++++--------------
gtk/gtkapplicationwindow.c | 3 +--
gtk/gtkbin.c | 2 --
gtk/gtkbox.c | 2 --
gtk/gtkcombobox.c | 8 --------
gtk/gtkcontainer.c | 11 ++++-------
gtk/gtkcontainer.h | 1 -
gtk/gtkfixed.c | 2 --
gtk/gtkflowbox.c | 3 +--
gtk/gtkframe.c | 2 --
gtk/gtkgrid.c | 1 -
gtk/gtkheaderbar.c | 10 ----------
gtk/gtkiconview.c | 2 --
gtk/gtklayout.c | 2 --
gtk/gtklistbox.c | 11 ++---------
gtk/gtkmenuitem.c | 2 --
gtk/gtkmenushell.c | 2 --
gtk/gtknotebook.c | 18 ------------------
gtk/gtkoverlay.c | 1 -
gtk/gtkpaned.c | 2 --
gtk/gtkpathbar.c | 2 --
gtk/gtkscrolledwindow.c | 30 ------------------------------
gtk/gtkshortcutsgroup.c | 7 ++-----
gtk/gtkshortcutssection.c | 14 +++-----------
gtk/gtkshortcutswindow.c | 37 ++++++++++++++-----------------------
gtk/gtkstack.c | 2 --
gtk/gtktextview.c | 2 --
gtk/gtktoolbar.c | 7 +------
gtk/gtktoolitemgroup.c | 4 ----
gtk/gtktoolpalette.c | 1 -
gtk/gtktreeview.c | 15 ---------------
gtk/gtkwindow.c | 15 +--------------
33 files changed, 35 insertions(+), 210 deletions(-)
---
diff --git a/demos/gtk-demo/gtkfishbowl.c b/demos/gtk-demo/gtkfishbowl.c
index 3e5a7e9..fd7b262 100644
--- a/demos/gtk-demo/gtkfishbowl.c
+++ b/demos/gtk-demo/gtkfishbowl.c
@@ -200,7 +200,6 @@ gtk_fishbowl_remove (GtkContainer *container,
static void
gtk_fishbowl_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
@@ -209,9 +208,6 @@ gtk_fishbowl_forall (GtkContainer *container,
GtkFishbowlChild *child;
GList *children;
- if (!include_internals)
- return;
-
children = priv->children;
while (children)
{
diff --git a/gtk/gtkactionbar.c b/gtk/gtkactionbar.c
index 85506ea..986f51e 100644
--- a/gtk/gtkactionbar.c
+++ b/gtk/gtkactionbar.c
@@ -112,27 +112,19 @@ gtk_action_bar_remove (GtkContainer *container,
static void
gtk_action_bar_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
GtkActionBarPrivate *priv = gtk_action_bar_get_instance_private (GTK_ACTION_BAR (container));
- if (include_internals)
- {
- (*callback) (priv->revealer, callback_data);
- }
- else
- {
- if (priv->start_box != NULL)
- gtk_container_forall (GTK_CONTAINER (priv->start_box), callback, callback_data);
+ if (priv->start_box != NULL)
+ gtk_container_forall (GTK_CONTAINER (priv->start_box), callback, callback_data);
- if (gtk_center_box_get_center_widget (GTK_CENTER_BOX (priv->center_box)) != NULL)
- (*callback) (gtk_center_box_get_center_widget (GTK_CENTER_BOX (priv->center_box)), callback_data);
+ if (gtk_center_box_get_center_widget (GTK_CENTER_BOX (priv->center_box)) != NULL)
+ (*callback) (gtk_center_box_get_center_widget (GTK_CENTER_BOX (priv->center_box)), callback_data);
- if (priv->end_box != NULL)
- gtk_container_forall (GTK_CONTAINER (priv->end_box), callback, callback_data);
- }
+ if (priv->end_box != NULL)
+ gtk_container_forall (GTK_CONTAINER (priv->end_box), callback, callback_data);
}
static void
diff --git a/gtk/gtkapplicationwindow.c b/gtk/gtkapplicationwindow.c
index 6cb2264..42ce7c6 100644
--- a/gtk/gtkapplicationwindow.c
+++ b/gtk/gtkapplicationwindow.c
@@ -692,7 +692,6 @@ gtk_application_window_real_unmap (GtkWidget *widget)
static void
gtk_application_window_real_forall_internal (GtkContainer *container,
- gboolean include_internal,
GtkCallback callback,
gpointer user_data)
{
@@ -702,7 +701,7 @@ gtk_application_window_real_forall_internal (GtkContainer *container,
callback (window->priv->menubar, user_data);
GTK_CONTAINER_CLASS (gtk_application_window_parent_class)
- ->forall (container, include_internal, callback, user_data);
+ ->forall (container, callback, user_data);
}
static void
diff --git a/gtk/gtkbin.c b/gtk/gtkbin.c
index c5e1bc5..7d928ca 100644
--- a/gtk/gtkbin.c
+++ b/gtk/gtkbin.c
@@ -51,7 +51,6 @@ static void gtk_bin_add (GtkContainer *container,
static void gtk_bin_remove (GtkContainer *container,
GtkWidget *widget);
static void gtk_bin_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
static GType gtk_bin_child_type (GtkContainer *container);
@@ -150,7 +149,6 @@ gtk_bin_remove (GtkContainer *container,
static void
gtk_bin_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c
index 26a78ec..2a8f3f7 100644
--- a/gtk/gtkbox.c
+++ b/gtk/gtkbox.c
@@ -163,7 +163,6 @@ static void gtk_box_add (GtkContainer *container,
static void gtk_box_remove (GtkContainer *container,
GtkWidget *widget);
static void gtk_box_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
static void gtk_box_set_child_property (GtkContainer *container,
@@ -2290,7 +2289,6 @@ gtk_box_remove (GtkContainer *container,
static void
gtk_box_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index a64d5cf..c6f364c 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -254,7 +254,6 @@ static void gtk_combo_box_menu_hide (GtkWidget *menu,
static void gtk_combo_box_unset_model (GtkComboBox *combo_box);
static void gtk_combo_box_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
static gboolean gtk_combo_box_scroll_event (GtkWidget *widget,
@@ -1739,7 +1738,6 @@ gtk_combo_box_unset_model (GtkComboBox *combo_box)
static void
gtk_combo_box_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
@@ -1747,12 +1745,6 @@ gtk_combo_box_forall (GtkContainer *container,
GtkComboBoxPrivate *priv = combo_box->priv;
GtkWidget *child;
- if (include_internals)
- {
- if (priv->box)
- (* callback) (priv->box, callback_data);
- }
-
child = gtk_bin_get_child (GTK_BIN (container));
if (child && child != priv->cell_view)
(* callback) (child, callback_data);
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index aedd504..2670fb8 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -1910,15 +1910,12 @@ gtk_container_forall (GtkContainer *container,
GtkCallback callback,
gpointer callback_data)
{
- GtkContainerClass *class;
-
g_return_if_fail (GTK_IS_CONTAINER (container));
g_return_if_fail (callback != NULL);
- class = GTK_CONTAINER_GET_CLASS (container);
-
- if (class->forall)
- class->forall (container, TRUE, callback, callback_data);
+ gtk_widget_forall (GTK_WIDGET (container),
+ callback,
+ callback_data);
}
/**
@@ -1950,7 +1947,7 @@ gtk_container_foreach (GtkContainer *container,
class = GTK_CONTAINER_GET_CLASS (container);
if (class->forall)
- class->forall (container, FALSE, callback, callback_data);
+ class->forall (container, callback, callback_data);
}
/**
diff --git a/gtk/gtkcontainer.h b/gtk/gtkcontainer.h
index f4c88d4..e56736f 100644
--- a/gtk/gtkcontainer.h
+++ b/gtk/gtkcontainer.h
@@ -82,7 +82,6 @@ struct _GtkContainerClass
GtkWidget *widget);
void (*check_resize) (GtkContainer *container);
void (*forall) (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
void (*set_focus_child) (GtkContainer *container,
diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c
index 389d6ea..6a05363 100644
--- a/gtk/gtkfixed.c
+++ b/gtk/gtkfixed.c
@@ -106,7 +106,6 @@ static void gtk_fixed_add (GtkContainer *container,
static void gtk_fixed_remove (GtkContainer *container,
GtkWidget *widget);
static void gtk_fixed_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
static GType gtk_fixed_child_type (GtkContainer *container);
@@ -498,7 +497,6 @@ gtk_fixed_remove (GtkContainer *container,
static void
gtk_fixed_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index 2ad1d48..3499fbb 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -3154,7 +3154,6 @@ gtk_flow_box_remove (GtkContainer *container,
static void
gtk_flow_box_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_target)
{
@@ -4374,7 +4373,7 @@ gtk_flow_box_bind_model (GtkFlowBox *box,
g_clear_object (&priv->bound_model);
}
- gtk_flow_box_forall (GTK_CONTAINER (box), FALSE, (GtkCallback) gtk_widget_destroy, NULL);
+ gtk_flow_box_forall (GTK_CONTAINER (box), (GtkCallback) gtk_widget_destroy, NULL);
if (model == NULL)
return;
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c
index 9c7ec93..0a5ae21 100644
--- a/gtk/gtkframe.c
+++ b/gtk/gtkframe.c
@@ -128,7 +128,6 @@ static void gtk_frame_size_allocate (GtkWidget *widget,
static void gtk_frame_remove (GtkContainer *container,
GtkWidget *child);
static void gtk_frame_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
@@ -399,7 +398,6 @@ gtk_frame_remove (GtkContainer *container,
static void
gtk_frame_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c
index 62b88b9..7b794b1 100644
--- a/gtk/gtkgrid.c
+++ b/gtk/gtkgrid.c
@@ -526,7 +526,6 @@ gtk_grid_remove (GtkContainer *container,
static void
gtk_grid_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
diff --git a/gtk/gtkheaderbar.c b/gtk/gtkheaderbar.c
index 0055f3b..c2ffe02 100644
--- a/gtk/gtkheaderbar.c
+++ b/gtk/gtkheaderbar.c
@@ -1656,7 +1656,6 @@ gtk_header_bar_remove (GtkContainer *container,
static void
gtk_header_bar_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
@@ -1665,9 +1664,6 @@ gtk_header_bar_forall (GtkContainer *container,
Child *child;
GList *children;
- if (include_internals && priv->titlebar_start_box != NULL)
- (* callback) (priv->titlebar_start_box, callback_data);
-
children = priv->children;
while (children)
{
@@ -1680,9 +1676,6 @@ gtk_header_bar_forall (GtkContainer *container,
if (priv->custom_title != NULL)
(* callback) (priv->custom_title, callback_data);
- if (include_internals && priv->label_box != NULL)
- (* callback) (priv->label_box, callback_data);
-
children = priv->children;
while (children)
{
@@ -1691,9 +1684,6 @@ gtk_header_bar_forall (GtkContainer *container,
if (child->pack_type == GTK_PACK_END)
(* callback) (child->widget, callback_data);
}
-
- if (include_internals && priv->titlebar_end_box != NULL)
- (* callback) (priv->titlebar_end_box, callback_data);
}
static void
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index b17e8bc..e96b13a 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -176,7 +176,6 @@ static gboolean gtk_icon_view_key_release (GtkWidget
static void gtk_icon_view_remove (GtkContainer *container,
GtkWidget *widget);
static void gtk_icon_view_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
@@ -1987,7 +1986,6 @@ gtk_icon_view_remove (GtkContainer *container,
static void
gtk_icon_view_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
diff --git a/gtk/gtklayout.c b/gtk/gtklayout.c
index f505278..fe73830 100644
--- a/gtk/gtklayout.c
+++ b/gtk/gtklayout.c
@@ -137,7 +137,6 @@ static void gtk_layout_add (GtkContainer *container,
static void gtk_layout_remove (GtkContainer *container,
GtkWidget *widget);
static void gtk_layout_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
static void gtk_layout_set_child_property (GtkContainer *container,
@@ -935,7 +934,6 @@ gtk_layout_remove (GtkContainer *container,
static void
gtk_layout_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index 9873940..8193cfe 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -221,7 +221,6 @@ static void gtk_list_box_add (GtkContai
static void gtk_list_box_remove (GtkContainer *container,
GtkWidget *widget);
static void gtk_list_box_forall (GtkContainer *container,
- gboolean
include_internals,
GtkCallback callback,
gpointer callback_target);
static void gtk_list_box_compute_expand (GtkWidget *widget,
@@ -2166,10 +2165,7 @@ gtk_list_box_realize (GtkWidget *widget)
&allocation);
gdk_window_set_user_data (priv->view_window, (GObject*) widget);
- gtk_list_box_forall (GTK_CONTAINER (widget),
- TRUE,
- (GtkCallback) gtk_widget_set_parent_window,
- priv->view_window);
+ gtk_widget_forall (widget, (GtkCallback)gtk_widget_set_parent_window, priv->view_window);
GTK_WIDGET_CLASS (gtk_list_box_parent_class)->realize (widget);
}
@@ -2564,7 +2560,6 @@ gtk_list_box_remove (GtkContainer *container,
static void
gtk_list_box_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_target)
{
@@ -2580,8 +2575,6 @@ gtk_list_box_forall (GtkContainer *container,
{
row = g_sequence_get (iter);
iter = g_sequence_iter_next (iter);
- if (ROW_PRIV (row)->header != NULL && include_internals)
- callback (ROW_PRIV (row)->header, callback_target);
callback (GTK_WIDGET (row), callback_target);
}
}
@@ -3926,7 +3919,7 @@ gtk_list_box_bind_model (GtkListBox *box,
g_clear_object (&priv->bound_model);
}
- gtk_list_box_forall (GTK_CONTAINER (box), FALSE, (GtkCallback) gtk_widget_destroy, NULL);
+ gtk_list_box_forall (GTK_CONTAINER (box), (GtkCallback) gtk_widget_destroy, NULL);
if (model == NULL)
return;
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index ab780fc..c659d3a 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -166,7 +166,6 @@ static void gtk_menu_item_ensure_label (GtkMenuItem *menu_item);
static gint gtk_menu_item_popup_timeout (gpointer data);
static void gtk_menu_item_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
@@ -1926,7 +1925,6 @@ gtk_menu_item_get_accel_path (GtkMenuItem *menu_item)
static void
gtk_menu_item_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c
index 9bab5ed..61135ec 100644
--- a/gtk/gtkmenushell.c
+++ b/gtk/gtkmenushell.c
@@ -136,7 +136,6 @@ static void gtk_menu_shell_add (GtkContainer *container,
static void gtk_menu_shell_remove (GtkContainer *container,
GtkWidget *widget);
static void gtk_menu_shell_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
static void gtk_menu_shell_real_insert (GtkMenuShell *menu_shell,
@@ -1092,7 +1091,6 @@ gtk_menu_shell_remove (GtkContainer *container,
static void
gtk_menu_shell_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 707bec6..88bf788 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -448,7 +448,6 @@ static void gtk_notebook_set_focus_child (GtkContainer *container,
GtkWidget *child);
static GType gtk_notebook_child_type (GtkContainer *container);
static void gtk_notebook_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
@@ -4408,14 +4407,12 @@ gtk_notebook_set_focus_child (GtkContainer *container,
static void
gtk_notebook_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
GtkNotebook *notebook = GTK_NOTEBOOK (container);
GtkNotebookPrivate *priv = notebook->priv;
GList *children;
- gint i;
children = priv->children;
while (children)
@@ -4425,21 +4422,6 @@ gtk_notebook_forall (GtkContainer *container,
page = children->data;
children = children->next;
(* callback) (page->child, callback_data);
-
- if (include_internals)
- {
- if (page->tab_label)
- (* callback) (page->tab_label, callback_data);
- }
- }
-
- if (include_internals)
- {
- for (i = 0; i < N_ACTION_WIDGETS; i++)
- {
- if (priv->action_widget[i])
- (* callback) (priv->action_widget[i], callback_data);
- }
}
}
diff --git a/gtk/gtkoverlay.c b/gtk/gtkoverlay.c
index 175672e..d547a72 100644
--- a/gtk/gtkoverlay.c
+++ b/gtk/gtkoverlay.c
@@ -596,7 +596,6 @@ gtk_overlay_reorder_overlay (GtkOverlay *overlay,
static void
gtk_overlay_forall (GtkContainer *overlay,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index 43bcaa4..9014875 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -235,7 +235,6 @@ static void gtk_paned_add (GtkContainer *container,
static void gtk_paned_remove (GtkContainer *container,
GtkWidget *widget);
static void gtk_paned_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
static void gtk_paned_calc_position (GtkPaned *paned,
@@ -2179,7 +2178,6 @@ gtk_paned_remove (GtkContainer *container,
static void
gtk_paned_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index d5e9e29..1c19243 100644
--- a/gtk/gtkpathbar.c
+++ b/gtk/gtkpathbar.c
@@ -133,7 +133,6 @@ static void gtk_path_bar_add (GtkContainer *container,
static void gtk_path_bar_remove (GtkContainer *container,
GtkWidget *widget);
static void gtk_path_bar_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
static gboolean gtk_path_bar_scroll (GtkWidget *widget,
@@ -839,7 +838,6 @@ gtk_path_bar_remove (GtkContainer *container,
static void
gtk_path_bar_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index be15ef3..d5a240f 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -329,10 +329,6 @@ static void gtk_scrolled_window_add (GtkContainer *conta
GtkWidget *widget);
static void gtk_scrolled_window_remove (GtkContainer *container,
GtkWidget *widget);
-static void gtk_scrolled_window_forall (GtkContainer *container,
- gboolean include_internals,
- GtkCallback callback,
- gpointer callback_data);
static gboolean gtk_scrolled_window_scroll_child (GtkScrolledWindow *scrolled_window,
GtkScrollType scroll,
gboolean horizontal);
@@ -532,7 +528,6 @@ gtk_scrolled_window_class_init (GtkScrolledWindowClass *class)
container_class->add = gtk_scrolled_window_add;
container_class->remove = gtk_scrolled_window_remove;
- container_class->forall = gtk_scrolled_window_forall;
class->scroll_child = gtk_scrolled_window_scroll_child;
class->move_focus_out = gtk_scrolled_window_move_focus_out;
@@ -2857,31 +2852,6 @@ gtk_scrolled_window_snapshot (GtkWidget *widget,
gtk_css_gadget_snapshot (priv->gadget, snapshot);
}
-static void
-gtk_scrolled_window_forall (GtkContainer *container,
- gboolean include_internals,
- GtkCallback callback,
- gpointer callback_data)
-{
- GtkScrolledWindowPrivate *priv;
- GtkScrolledWindow *scrolled_window;
-
- GTK_CONTAINER_CLASS (gtk_scrolled_window_parent_class)->forall (container,
- include_internals,
- callback,
- callback_data);
- if (include_internals)
- {
- scrolled_window = GTK_SCROLLED_WINDOW (container);
- priv = scrolled_window->priv;
-
- if (priv->vscrollbar)
- callback (priv->vscrollbar, callback_data);
- if (priv->hscrollbar)
- callback (priv->hscrollbar, callback_data);
- }
-}
-
static gboolean
gtk_scrolled_window_scroll_child (GtkScrolledWindow *scrolled_window,
GtkScrollType scroll,
diff --git a/gtk/gtkshortcutsgroup.c b/gtk/gtkshortcutsgroup.c
index 2ea98e8..d1775d9 100644
--- a/gtk/gtkshortcutsgroup.c
+++ b/gtk/gtkshortcutsgroup.c
@@ -157,7 +157,6 @@ gtk_shortcuts_group_add (GtkContainer *container,
typedef struct {
GtkCallback callback;
gpointer data;
- gboolean include_internal;
} CallbackData;
static void
@@ -167,23 +166,21 @@ forall_cb (GtkWidget *widget, gpointer data)
CallbackData *cbdata = data;
self = GTK_SHORTCUTS_GROUP (gtk_widget_get_parent (widget));
- if (cbdata->include_internal || widget != (GtkWidget*)self->title)
+ if (widget != (GtkWidget*)self->title)
cbdata->callback (widget, cbdata->data);
}
static void
gtk_shortcuts_group_forall (GtkContainer *container,
- gboolean include_internal,
GtkCallback callback,
gpointer callback_data)
{
CallbackData cbdata;
- cbdata.include_internal = include_internal;
cbdata.callback = callback;
cbdata.data = callback_data;
- GTK_CONTAINER_CLASS (gtk_shortcuts_group_parent_class)->forall (container, include_internal, forall_cb,
&cbdata);
+ GTK_CONTAINER_CLASS (gtk_shortcuts_group_parent_class)->forall (container, forall_cb, &cbdata);
}
static void
diff --git a/gtk/gtkshortcutssection.c b/gtk/gtkshortcutssection.c
index 65d6a31..ac1399b 100644
--- a/gtk/gtkshortcutssection.c
+++ b/gtk/gtkshortcutssection.c
@@ -154,24 +154,16 @@ gtk_shortcuts_section_remove (GtkContainer *container,
static void
gtk_shortcuts_section_forall (GtkContainer *container,
- gboolean include_internal,
GtkCallback callback,
gpointer callback_data)
{
GtkShortcutsSection *self = (GtkShortcutsSection *)container;
GList *l;
- if (include_internal)
+ for (l = self->groups; l; l = l->next)
{
- GTK_CONTAINER_CLASS (gtk_shortcuts_section_parent_class)->forall (container, include_internal,
callback, callback_data);
- }
- else
- {
- for (l = self->groups; l; l = l->next)
- {
- GtkWidget *group = l->data;
- callback (group, callback_data);
- }
+ GtkWidget *group = l->data;
+ callback (group, callback_data);
}
}
diff --git a/gtk/gtkshortcutswindow.c b/gtk/gtkshortcutswindow.c
index 6ef901f..5cf4f73 100644
--- a/gtk/gtkshortcutswindow.c
+++ b/gtk/gtkshortcutswindow.c
@@ -376,38 +376,29 @@ gtk_shortcuts_window_remove (GtkContainer *container,
static void
gtk_shortcuts_window_forall (GtkContainer *container,
- gboolean include_internal,
GtkCallback callback,
gpointer callback_data)
{
GtkShortcutsWindow *self = (GtkShortcutsWindow *)container;
GtkShortcutsWindowPrivate *priv = gtk_shortcuts_window_get_instance_private (self);
- if (include_internal)
- {
- GTK_CONTAINER_CLASS (gtk_shortcuts_window_parent_class)->forall (container, include_internal,
callback, callback_data);
- }
- else
+ if (priv->stack)
{
- if (priv->stack)
+ 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)
{
- 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);
+ GtkWidget *child = l->data;
+
+ if (child != search && child != empty)
+ callback (child, callback_data);
}
+ g_list_free (children);
}
}
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index b161729..2171cfc 100644
--- a/gtk/gtkstack.c
+++ b/gtk/gtkstack.c
@@ -169,7 +169,6 @@ static void gtk_stack_add (GtkContainer *widget,
static void gtk_stack_remove (GtkContainer *widget,
GtkWidget *child);
static void gtk_stack_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
static void gtk_stack_compute_expand (GtkWidget *widget,
@@ -1852,7 +1851,6 @@ gtk_stack_set_visible_child_full (GtkStack *stack,
static void
gtk_stack_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 6f4b4c8..300e68d 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -592,7 +592,6 @@ static void gtk_text_view_add (GtkContainer *container,
static void gtk_text_view_remove (GtkContainer *container,
GtkWidget *child);
static void gtk_text_view_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
@@ -6039,7 +6038,6 @@ gtk_text_view_remove (GtkContainer *container,
static void
gtk_text_view_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index 2734934..2df9cb7 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -234,7 +234,6 @@ static void gtk_toolbar_add (GtkContainer *contain
static void gtk_toolbar_remove (GtkContainer *container,
GtkWidget *widget);
static void gtk_toolbar_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
static GType gtk_toolbar_child_type (GtkContainer *container);
@@ -2366,7 +2365,6 @@ gtk_toolbar_remove (GtkContainer *container,
static void
gtk_toolbar_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
@@ -2382,7 +2380,7 @@ gtk_toolbar_forall (GtkContainer *container,
ToolbarContent *content = list->data;
GList *next = list->next;
- if (include_internals || !toolbar_content_is_placeholder (content))
+ if (!toolbar_content_is_placeholder (content))
{
GtkWidget *child = toolbar_content_get_widget (content);
@@ -2392,9 +2390,6 @@ gtk_toolbar_forall (GtkContainer *container,
list = next;
}
-
- if (include_internals && priv->arrow_button)
- callback (priv->arrow_button, callback_data);
}
static GType
diff --git a/gtk/gtktoolitemgroup.c b/gtk/gtktoolitemgroup.c
index e808427..91184c2 100644
--- a/gtk/gtktoolitemgroup.c
+++ b/gtk/gtktoolitemgroup.c
@@ -1312,7 +1312,6 @@ gtk_tool_item_group_remove (GtkContainer *container,
static void
gtk_tool_item_group_forall (GtkContainer *container,
- gboolean internals,
GtkCallback callback,
gpointer callback_data)
{
@@ -1320,9 +1319,6 @@ gtk_tool_item_group_forall (GtkContainer *container,
GtkToolItemGroupPrivate* priv = group->priv;
GList *children;
- if (internals && priv->header)
- callback (priv->header, callback_data);
-
children = priv->children;
while (children)
{
diff --git a/gtk/gtktoolpalette.c b/gtk/gtktoolpalette.c
index a121083..a168679 100644
--- a/gtk/gtktoolpalette.c
+++ b/gtk/gtktoolpalette.c
@@ -791,7 +791,6 @@ gtk_tool_palette_remove (GtkContainer *container,
static void
gtk_tool_palette_forall (GtkContainer *container,
- gboolean internals,
GtkCallback callback,
gpointer callback_data)
{
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 72c687e..caba18b 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -624,7 +624,6 @@ static void gtk_tree_view_style_updated (GtkWidget *widget);
static void gtk_tree_view_remove (GtkContainer *container,
GtkWidget *widget);
static void gtk_tree_view_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
@@ -8141,14 +8140,11 @@ gtk_tree_view_remove (GtkContainer *container,
static void
gtk_tree_view_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
GtkTreeView *tree_view = GTK_TREE_VIEW (container);
GtkTreeViewChild *child = NULL;
- GtkTreeViewColumn *column;
- GtkWidget *button;
GList *tmp_list;
tmp_list = tree_view->priv->children;
@@ -8159,17 +8155,6 @@ gtk_tree_view_forall (GtkContainer *container,
(* callback) (child->widget, callback_data);
}
- if (include_internals == FALSE)
- return;
-
- for (tmp_list = tree_view->priv->columns; tmp_list; tmp_list = tmp_list->next)
- {
- column = tmp_list->data;
- button = gtk_tree_view_column_get_button (column);
-
- if (button)
- (* callback) (button, callback_data);
- }
}
/* Returns TRUE is any of the columns contains a cell that can-focus.
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index ce3da22..56da76f 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -430,7 +430,6 @@ static void gtk_window_remove (GtkContainer *container,
GtkWidget *widget);
static void gtk_window_check_resize (GtkContainer *container);
static void gtk_window_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
static gint gtk_window_focus (GtkWidget *widget,
@@ -7921,7 +7920,6 @@ gtk_window_check_resize (GtkContainer *container)
static void
gtk_window_forall (GtkContainer *container,
- gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
@@ -7929,23 +7927,12 @@ gtk_window_forall (GtkContainer *container,
GtkWindowPrivate *priv = window->priv;
GtkWidget *child;
- if (include_internals)
- {
- GList *l;
-
- for (l = priv->popovers; l; l = l->next)
- {
- GtkWindowPopover *data = l->data;
- (* callback) (data->widget, callback_data);
- }
- }
-
child = gtk_bin_get_child (GTK_BIN (container));
if (child != NULL)
(* callback) (child, callback_data);
if (priv->title_box != NULL &&
- (priv->titlebar == NULL || include_internals))
+ priv->titlebar == NULL)
(* callback) (priv->title_box, callback_data);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]