From a7f2b2ba3f13ceb60376802f4a31e104153839e8 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Tue, 17 Feb 2015 03:00:37 +0100 Subject: 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) --- src/ui/interface.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'src/ui/interface.cpp') diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp index 28a65e0b4..86cf629c1 100644 --- a/src/ui/interface.cpp +++ b/src/ui/interface.cpp @@ -1906,11 +1906,10 @@ void ContextMenu::ActivateGroup(void) void ContextMenu::ActivateUngroup(void) { - GSList *children = NULL; + SelContainer children; - sp_item_group_ungroup(static_cast(_item), &children); + sp_item_group_ungroup(static_cast(_item), children); _desktop->selection->setList(children); - g_slist_free(children); } void ContextMenu::MakeAnchorMenu(void) @@ -1959,10 +1958,9 @@ void ContextMenu::AnchorLinkFollow(void) void ContextMenu::AnchorLinkRemove(void) { - GSList *children = NULL; - sp_item_group_ungroup(static_cast(_item), &children, false); + SelContainer children; + sp_item_group_ungroup(static_cast(_item), children, false); DocumentUndo::done(_desktop->doc(), SP_VERB_NONE, _("Remove link")); - g_slist_free(children); } void ContextMenu::MakeImageMenu (void) @@ -2051,8 +2049,6 @@ void ContextMenu::ImageEdit(void) _desktop->selection->set(_item); } - GSList const *selected = _desktop->selection->itemList(); - GError* errThing = 0; Glib::ustring cmdline = getImageEditorName(); Glib::ustring name; @@ -2079,8 +2075,9 @@ void ContextMenu::ImageEdit(void) } #endif - for (GSList const *iter = selected; iter != NULL; iter = iter->next) { - Inkscape::XML::Node *ir = SP_ITEM(iter->data)->getRepr(); + SelContainer itemlist=_desktop->selection->itemList(); + for(SelContainer::const_iterator i=itemlist.begin();i!=itemlist.end();i++){ + Inkscape::XML::Node *ir = SP_ITEM(*i)->getRepr(); const gchar *href = ir->attribute("xlink:href"); if (strncmp (href,"file:",5) == 0) { -- cgit v1.2.3