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 From 5fd00cab14d48beaf2279a2b8f3ad5b02b76c87b Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Thu, 19 Feb 2015 04:25:21 +0100 Subject: Put a few std::vector (bzr r13922.1.5) --- src/ui/interface.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ui/interface.cpp') diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp index 86cf629c1..43e35df9d 100644 --- a/src/ui/interface.cpp +++ b/src/ui/interface.cpp @@ -1906,7 +1906,7 @@ void ContextMenu::ActivateGroup(void) void ContextMenu::ActivateUngroup(void) { - SelContainer children; + std::vector children; sp_item_group_ungroup(static_cast(_item), children); _desktop->selection->setList(children); @@ -1958,7 +1958,7 @@ void ContextMenu::AnchorLinkFollow(void) void ContextMenu::AnchorLinkRemove(void) { - SelContainer children; + std::vector children; sp_item_group_ungroup(static_cast(_item), children, false); DocumentUndo::done(_desktop->doc(), SP_VERB_NONE, _("Remove link")); } @@ -2075,8 +2075,8 @@ void ContextMenu::ImageEdit(void) } #endif - SelContainer itemlist=_desktop->selection->itemList(); - for(SelContainer::const_iterator i=itemlist.begin();i!=itemlist.end();i++){ + std::vector itemlist=_desktop->selection->itemList(); + for(std::vector::const_iterator i=itemlist.begin();i!=itemlist.end();i++){ Inkscape::XML::Node *ir = SP_ITEM(*i)->getRepr(); const gchar *href = ir->attribute("xlink:href"); -- cgit v1.2.3 From 9a7fa4d1899d30ec745107823f307b2a0bf3172f Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Fri, 27 Feb 2015 03:10:36 +0100 Subject: corrected the casts (hopefully) (bzr r13922.1.10) --- src/ui/interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui/interface.cpp') diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp index 193dff33c..760d19e89 100644 --- a/src/ui/interface.cpp +++ b/src/ui/interface.cpp @@ -2077,7 +2077,7 @@ void ContextMenu::ImageEdit(void) std::vector itemlist=_desktop->selection->itemList(); for(std::vector::const_iterator i=itemlist.begin();i!=itemlist.end();i++){ - Inkscape::XML::Node *ir = SP_ITEM(*i)->getRepr(); + Inkscape::XML::Node *ir = (*i)->getRepr(); const gchar *href = ir->attribute("xlink:href"); if (strncmp (href,"file:",5) == 0) { -- cgit v1.2.3 From 48e0423afcb02fe4a0f705d828a0dbdb3106b397 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Fri, 8 May 2015 15:46:25 +0200 Subject: fixes a few of jenkins warnings (bzr r14126) --- src/ui/interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui/interface.cpp') diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp index 760d19e89..a129d4b92 100644 --- a/src/ui/interface.cpp +++ b/src/ui/interface.cpp @@ -439,7 +439,7 @@ sp_ui_dialog_title_string(Inkscape::Verb *verb, gchar *c) gchar* key = sp_shortcut_get_label(shortcut); s = g_stpcpy(s, " ("); s = g_stpcpy(s, key); - s = g_stpcpy(s, ")"); + g_stpcpy(s, ")"); g_free(key); } } -- cgit v1.2.3