diff options
| author | Marc Jeanmougin <mc@localhost.localdomain> | 2015-02-17 02:00:37 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <mc@localhost.localdomain> | 2015-02-17 02:00:37 +0000 |
| commit | a7f2b2ba3f13ceb60376802f4a31e104153839e8 (patch) | |
| tree | 6db393e9e5a0a9ab7916a0e7ed29d875efa39ea1 /src/widgets/spiral-toolbar.cpp | |
| parent | device-manager: Get rid of GLists (diff) | |
| download | inkscape-a7f2b2ba3f13ceb60376802f4a31e104153839e8.tar.gz inkscape-a7f2b2ba3f13ceb60376802f4a31e104153839e8.zip | |
At first, I was thinking "I just have to go to the selection file, and change that GSList* with a std::list, then resolve the few problems"
So, i tried that.
And I will continue tomorrow, and the days after, on and on.
(bzr r13922.1.1)
Diffstat (limited to 'src/widgets/spiral-toolbar.cpp')
| -rw-r--r-- | src/widgets/spiral-toolbar.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/widgets/spiral-toolbar.cpp b/src/widgets/spiral-toolbar.cpp index 3fb0015c1..2f4ad481d 100644 --- a/src/widgets/spiral-toolbar.cpp +++ b/src/widgets/spiral-toolbar.cpp @@ -79,11 +79,9 @@ static void sp_spl_tb_value_changed(GtkAdjustment *adj, GObject *tbl, Glib::ustr gchar* namespaced_name = g_strconcat("sodipodi:", value_name.data(), NULL); bool modmade = false; - for (GSList const *items = desktop->getSelection()->itemList(); - items != NULL; - items = items->next) - { - SPItem *item = reinterpret_cast<SPItem*>(items->data); + SelContainer itemlist=desktop->getSelection()->itemList(); + for(SelContainer::const_iterator i=itemlist.begin();i!=itemlist.end();i++){ + SPItem *item = SP_ITEM(*i); if (SP_IS_SPIRAL(item)) { Inkscape::XML::Node *repr = item->getRepr(); sp_repr_set_svg_double( repr, namespaced_name, @@ -197,11 +195,9 @@ static void sp_spiral_toolbox_selection_changed(Inkscape::Selection *selection, purge_repr_listener( tbl, tbl ); - for (GSList const *items = selection->itemList(); - items != NULL; - items = items->next) - { - SPItem *item = reinterpret_cast<SPItem*>(items->data); + SelContainer itemlist=selection->itemList(); + for(SelContainer::const_iterator i=itemlist.begin();i!=itemlist.end();i++){ + SPItem *item = SP_ITEM(*i); if (SP_IS_SPIRAL(item)) { n_selected++; repr = item->getRepr(); |
