summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorJuan Pablo Ugarte <juanpablougarte@gmail.com>2020-08-17 17:18:10 -0300
committerJuan Pablo Ugarte <juanpablougarte@gmail.com>2020-08-17 19:19:48 -0300
commita987d81b4e9a7c9a3d1f616444500d36c6dda274 (patch)
tree236677a806e35715b3e020ff1fcc7c4f9559b8e4 /plugins
parent4858565c9528320baae892ab40dc32c45b216201 (diff)
downloadglade-a987d81b4e9a7c9a3d1f616444500d36c6dda274.tar.gz
Utils: Add glade_util_list_objects_ref()
Use new function to fix -Wcast-function-type warnings
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtk+/glade-gtk-grid.c5
-rw-r--r--plugins/gtk+/glade-gtk-notebook.c2
-rw-r--r--plugins/gtk+/glade-gtk-table.c5
3 files changed, 5 insertions, 7 deletions
diff --git a/plugins/gtk+/glade-gtk-grid.c b/plugins/gtk+/glade-gtk-grid.c
index f1760fa0..a851b2e7 100644
--- a/plugins/gtk+/glade-gtk-grid.c
+++ b/plugins/gtk+/glade-gtk-grid.c
@@ -530,7 +530,7 @@ glade_gtk_grid_child_insert_remove_action (GladeWidgetAdaptor *adaptor,
children = glade_widget_adaptor_get_children (adaptor, container);
/* Make sure widgets does not get destroyed */
- g_list_foreach (children, (GFunc) g_object_ref, NULL);
+ glade_util_object_list_ref (children);
glade_widget_property_get (parent, n_row_col, &size);
@@ -612,8 +612,7 @@ glade_gtk_grid_child_insert_remove_action (GladeWidgetAdaptor *adaptor,
size - 1);
}
- g_list_foreach (children, (GFunc) g_object_unref, NULL);
- g_list_free (children);
+ g_list_free_full (children, g_object_unref);
glade_command_pop_group ();
}
diff --git a/plugins/gtk+/glade-gtk-notebook.c b/plugins/gtk+/glade-gtk-notebook.c
index cd5de473..8847e5da 100644
--- a/plugins/gtk+/glade-gtk-notebook.c
+++ b/plugins/gtk+/glade-gtk-notebook.c
@@ -1005,7 +1005,7 @@ glade_gtk_box_notebook_child_insert_remove_action (GladeWidgetAdaptor *adaptor,
/* Make sure widgets does not get destroyed */
children = glade_widget_adaptor_get_children (adaptor, container);
- g_list_foreach (children, (GFunc) g_object_ref, NULL);
+ glade_util_object_list_ref (children);
glade_widget_property_get (parent, size_prop, &size);
diff --git a/plugins/gtk+/glade-gtk-table.c b/plugins/gtk+/glade-gtk-table.c
index dbaa0a28..2c67f338 100644
--- a/plugins/gtk+/glade-gtk-table.c
+++ b/plugins/gtk+/glade-gtk-table.c
@@ -563,7 +563,7 @@ glade_gtk_table_child_insert_remove_action (GladeWidgetAdaptor *adaptor,
children = glade_widget_adaptor_get_children (adaptor, container);
/* Make sure widgets does not get destroyed */
- g_list_foreach (children, (GFunc) g_object_ref, NULL);
+ glade_util_object_list_ref (children);
glade_widget_property_get (parent, n_row_col, &size);
@@ -660,8 +660,7 @@ glade_gtk_table_child_insert_remove_action (GladeWidgetAdaptor *adaptor,
size - 1);
}
- g_list_foreach (children, (GFunc) g_object_unref, NULL);
- g_list_free (children);
+ g_list_free_full (children, g_object_unref);
glade_command_pop_group ();
}