From d1947e768272c703674129d5c583204ff2b59251 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Wed, 13 Jul 2016 13:36:19 +0200 Subject: Second part of new SPObject children list (bzr r14954.1.19) --- src/helper/pixbuf-ops.cpp | 4 ++-- src/helper/png-write.cpp | 4 ++-- src/helper/stock-items.cpp | 30 +++++++++++++++--------------- 3 files changed, 19 insertions(+), 19 deletions(-) (limited to 'src/helper') diff --git a/src/helper/pixbuf-ops.cpp b/src/helper/pixbuf-ops.cpp index 9639096fb..fb1740fc5 100644 --- a/src/helper/pixbuf-ops.cpp +++ b/src/helper/pixbuf-ops.cpp @@ -53,8 +53,8 @@ static void hide_other_items_recursively(SPObject *o, GSList *list, unsigned dke // recurse if (!g_slist_find(list, o)) { - for ( SPObject *child = o->firstChild() ; child; child = child->getNext() ) { - hide_other_items_recursively(child, list, dkey); + for (auto& child: o->_children) { + hide_other_items_recursively(&child, list, dkey); } } } diff --git a/src/helper/png-write.cpp b/src/helper/png-write.cpp index 9430feeff..c59db9df6 100644 --- a/src/helper/png-write.cpp +++ b/src/helper/png-write.cpp @@ -374,8 +374,8 @@ static void hide_other_items_recursively(SPObject *o, const std::vector // recurse if (list.end()==find(list.begin(),list.end(),o)) { - for ( SPObject *child = o->firstChild() ; child; child = child->getNext() ) { - hide_other_items_recursively(child, list, dkey); + for (auto& child: o->_children) { + hide_other_items_recursively(&child, list, dkey); } } } diff --git a/src/helper/stock-items.cpp b/src/helper/stock-items.cpp index 5a56b89ff..cf10a6c4d 100644 --- a/src/helper/stock-items.cpp +++ b/src/helper/stock-items.cpp @@ -204,37 +204,37 @@ SPObject *get_stock_item(gchar const *urn, gboolean stock) } SPObject *object = NULL; if (!strcmp(base, "marker") && !stock) { - for ( SPObject *child = defs->firstChild(); child; child = child->getNext() ) + for (auto& child: defs->_children) { - if (child->getRepr()->attribute("inkscape:stockid") && - !strcmp(name_p, child->getRepr()->attribute("inkscape:stockid")) && - SP_IS_MARKER(child)) + if (child.getRepr()->attribute("inkscape:stockid") && + !strcmp(name_p, child.getRepr()->attribute("inkscape:stockid")) && + SP_IS_MARKER(&child)) { - object = child; + object = &child; } } } else if (!strcmp(base,"pattern") && !stock) { - for ( SPObject *child = defs->firstChild() ; child; child = child->getNext() ) + for (auto& child: defs->_children) { - if (child->getRepr()->attribute("inkscape:stockid") && - !strcmp(name_p, child->getRepr()->attribute("inkscape:stockid")) && - SP_IS_PATTERN(child)) + if (child.getRepr()->attribute("inkscape:stockid") && + !strcmp(name_p, child.getRepr()->attribute("inkscape:stockid")) && + SP_IS_PATTERN(&child)) { - object = child; + object = &child; } } } else if (!strcmp(base,"gradient") && !stock) { - for ( SPObject *child = defs->firstChild(); child; child = child->getNext() ) + for (auto& child: defs->_children) { - if (child->getRepr()->attribute("inkscape:stockid") && - !strcmp(name_p, child->getRepr()->attribute("inkscape:stockid")) && - SP_IS_GRADIENT(child)) + if (child.getRepr()->attribute("inkscape:stockid") && + !strcmp(name_p, child.getRepr()->attribute("inkscape:stockid")) && + SP_IS_GRADIENT(&child)) { - object = child; + object = &child; } } -- cgit v1.2.3 From 24d3f50003ca3cec6a03a7f5267cc4fe5588c69f Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 14 Jul 2016 13:17:21 +0200 Subject: Renamed children list in SPObject (bzr r14954.1.21) --- src/helper/pixbuf-ops.cpp | 2 +- src/helper/png-write.cpp | 2 +- src/helper/stock-items.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/helper') diff --git a/src/helper/pixbuf-ops.cpp b/src/helper/pixbuf-ops.cpp index fb1740fc5..24d2d7f1e 100644 --- a/src/helper/pixbuf-ops.cpp +++ b/src/helper/pixbuf-ops.cpp @@ -53,7 +53,7 @@ static void hide_other_items_recursively(SPObject *o, GSList *list, unsigned dke // recurse if (!g_slist_find(list, o)) { - for (auto& child: o->_children) { + for (auto& child: o->children) { hide_other_items_recursively(&child, list, dkey); } } diff --git a/src/helper/png-write.cpp b/src/helper/png-write.cpp index c59db9df6..2255157e2 100644 --- a/src/helper/png-write.cpp +++ b/src/helper/png-write.cpp @@ -374,7 +374,7 @@ static void hide_other_items_recursively(SPObject *o, const std::vector // recurse if (list.end()==find(list.begin(),list.end(),o)) { - for (auto& child: o->_children) { + for (auto& child: o->children) { hide_other_items_recursively(&child, list, dkey); } } diff --git a/src/helper/stock-items.cpp b/src/helper/stock-items.cpp index cf10a6c4d..647e42916 100644 --- a/src/helper/stock-items.cpp +++ b/src/helper/stock-items.cpp @@ -204,7 +204,7 @@ SPObject *get_stock_item(gchar const *urn, gboolean stock) } SPObject *object = NULL; if (!strcmp(base, "marker") && !stock) { - for (auto& child: defs->_children) + for (auto& child: defs->children) { if (child.getRepr()->attribute("inkscape:stockid") && !strcmp(name_p, child.getRepr()->attribute("inkscape:stockid")) && @@ -216,7 +216,7 @@ SPObject *get_stock_item(gchar const *urn, gboolean stock) } else if (!strcmp(base,"pattern") && !stock) { - for (auto& child: defs->_children) + for (auto& child: defs->children) { if (child.getRepr()->attribute("inkscape:stockid") && !strcmp(name_p, child.getRepr()->attribute("inkscape:stockid")) && @@ -228,7 +228,7 @@ SPObject *get_stock_item(gchar const *urn, gboolean stock) } else if (!strcmp(base,"gradient") && !stock) { - for (auto& child: defs->_children) + for (auto& child: defs->children) { if (child.getRepr()->attribute("inkscape:stockid") && !strcmp(name_p, child.getRepr()->attribute("inkscape:stockid")) && -- cgit v1.2.3 From e471a664f923f517b68071f2e33fbb6ce070f8b7 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Mon, 8 Aug 2016 13:56:40 +0100 Subject: Remove deprecated Autotools and btool files. Please use CMake instead (bzr r15046) --- src/helper/Makefile_insert | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 src/helper/Makefile_insert (limited to 'src/helper') diff --git a/src/helper/Makefile_insert b/src/helper/Makefile_insert deleted file mode 100644 index e59fcfb70..000000000 --- a/src/helper/Makefile_insert +++ /dev/null @@ -1,45 +0,0 @@ -## Makefile.am fragment sourced by src/Makefile.am. - -helper/unit-menu.$(OBJEXT): helper/sp-marshal.h - -ink_common_sources += \ - helper/action.cpp \ - helper/action.h \ - helper/action-context.cpp \ - helper/action-context.h \ - helper/geom.cpp \ - helper/geom.h \ - helper/geom-curves.h \ - helper/geom-nodetype.cpp \ - helper/geom-nodetype.h \ - helper/geom-pathstroke.cpp \ - helper/geom-pathstroke.h \ - helper/gnome-utils.cpp \ - helper/gnome-utils.h \ - helper/mathfns.h \ - helper/png-write.cpp \ - helper/png-write.h \ - helper/sp-marshal.cpp \ - helper/sp-marshal.h \ - helper/window.cpp \ - helper/window.h \ - helper/stock-items.cpp \ - helper/stock-items.h - -# cmp exits with status 0 when there are no differences. "if" executes the commands -# after "then" when the exit status of the if command is 0 (this is crazy). -helper/sp-marshal.h: helper/sp-marshal.list - glib-genmarshal --prefix=sp_marshal --header $(srcdir)/helper/sp-marshal.list > helper/tmp.sp-marshal.h - if cmp -s helper/sp-marshal.h helper/tmp.sp-marshal.h; \ - then rm helper/tmp.sp-marshal.h; \ - else mv helper/tmp.sp-marshal.h helper/sp-marshal.h; fi - -helper/sp-marshal.cpp: helper/sp-marshal.list helper/sp-marshal.h - ( echo '#include "helper/sp-marshal.h"' && \ - glib-genmarshal --prefix=sp_marshal --body $(srcdir)/helper/sp-marshal.list ) \ - > helper/tmp.sp-marshal.cpp; \ - if cmp -s helper/sp-marshal.cpp helper/tmp.sp-marshal.cpp; \ - then rm helper/tmp.sp-marshal.cpp; \ - else mv helper/tmp.sp-marshal.cpp helper/sp-marshal.cpp; fi - -helper/sp-marshal.cpp helper/sp-marshal.h: helper/sp-marshal.list -- cgit v1.2.3