diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-09-30 00:25:47 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-09-30 00:25:47 +0000 |
| commit | 4ced018164553d115a24947ec74dace836e99732 (patch) | |
| tree | cb77b1f59c161da5c1dcde9edaaff9e046865696 /src/widgets/spw-utilities.cpp | |
| parent | remove helper/gnome-utils.* (diff) | |
| download | inkscape-4ced018164553d115a24947ec74dace836e99732.tar.gz inkscape-4ced018164553d115a24947ec74dace836e99732.zip | |
Hunted every GList to the last (except in libnrtype and libcroco)
Diffstat (limited to 'src/widgets/spw-utilities.cpp')
| -rw-r--r-- | src/widgets/spw-utilities.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/widgets/spw-utilities.cpp b/src/widgets/spw-utilities.cpp index 68fb78327..29e86b885 100644 --- a/src/widgets/spw-utilities.cpp +++ b/src/widgets/spw-utilities.cpp @@ -249,9 +249,9 @@ gpointer sp_search_by_data_recursive(GtkWidget *w, gpointer key) if (r) return r; if (GTK_IS_CONTAINER(w)) { - GList *ch = gtk_container_get_children (GTK_CONTAINER(w)); - for (GList *i = ch; i != NULL; i = i->next) { - r = sp_search_by_data_recursive(GTK_WIDGET(i->data), key); + std::vector<Gtk::Widget*> children = Glib::wrap(GTK_CONTAINER(w))->get_children(); + for (auto i:children) { + r = sp_search_by_data_recursive(GTK_WIDGET(i->gobj()), key); if (r) return r; } } @@ -272,9 +272,9 @@ GtkWidget *sp_search_by_value_recursive(GtkWidget *w, gchar *key, gchar *value) if (r && !strcmp (r, value)) return w; if (GTK_IS_CONTAINER(w)) { - GList *ch = gtk_container_get_children (GTK_CONTAINER(w)); - for (GList *i = ch; i != NULL; i = i->next) { - GtkWidget *child = sp_search_by_value_recursive(GTK_WIDGET(i->data), key, value); + std::vector<Gtk::Widget*> children = Glib::wrap(GTK_CONTAINER(w))->get_children(); + for (auto i:children) { + GtkWidget *child = sp_search_by_value_recursive(GTK_WIDGET(i->gobj()), key, value); if (child) return child; } } |
