diff options
author | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2020-08-17 17:18:10 -0300 |
---|---|---|
committer | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2020-08-17 19:19:48 -0300 |
commit | a987d81b4e9a7c9a3d1f616444500d36c6dda274 (patch) | |
tree | 236677a806e35715b3e020ff1fcc7c4f9559b8e4 /plugins/gtk+/glade-gtk-grid.c | |
parent | 4858565c9528320baae892ab40dc32c45b216201 (diff) | |
download | glade-a987d81b4e9a7c9a3d1f616444500d36c6dda274.tar.gz |
Utils: Add glade_util_list_objects_ref()
Use new function to fix -Wcast-function-type warnings
Diffstat (limited to 'plugins/gtk+/glade-gtk-grid.c')
-rw-r--r-- | plugins/gtk+/glade-gtk-grid.c | 5 |
1 files changed, 2 insertions, 3 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 (); } |