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/live_effects/lpe-perspective_path.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/live_effects/lpe-perspective_path.cpp') diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp index c8cdd7912..c62ead2b3 100644 --- a/src/live_effects/lpe-perspective_path.cpp +++ b/src/live_effects/lpe-perspective_path.cpp @@ -107,12 +107,12 @@ void LPEPerspectivePath::refresh(Gtk::Entry* perspective) { perspectiveID = perspective->get_text(); Persp3D *first = 0; Persp3D *persp = 0; - for ( SPObject *child = this->lpeobj->document->getDefs()->firstChild(); child && !persp; child = child->getNext() ) { - if (SP_IS_PERSP3D(child) && first == 0) { - first = SP_PERSP3D(child); + for (auto& child: lpeobj->document->getDefs()->_children) { + if (SP_IS_PERSP3D(&child) && first == 0) { + first = SP_PERSP3D(&child); } - if (SP_IS_PERSP3D(child) && strcmp(child->getId(), const_cast(perspectiveID.c_str())) == 0) { - persp = SP_PERSP3D(child); + if (SP_IS_PERSP3D(&child) && strcmp(child.getId(), const_cast(perspectiveID.c_str())) == 0) { + persp = SP_PERSP3D(&child); break; } } -- 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/live_effects/lpe-perspective_path.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/live_effects/lpe-perspective_path.cpp') diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp index c62ead2b3..049e10f0f 100644 --- a/src/live_effects/lpe-perspective_path.cpp +++ b/src/live_effects/lpe-perspective_path.cpp @@ -107,7 +107,7 @@ void LPEPerspectivePath::refresh(Gtk::Entry* perspective) { perspectiveID = perspective->get_text(); Persp3D *first = 0; Persp3D *persp = 0; - for (auto& child: lpeobj->document->getDefs()->_children) { + for (auto& child: lpeobj->document->getDefs()->children) { if (SP_IS_PERSP3D(&child) && first == 0) { first = SP_PERSP3D(&child); } -- cgit v1.2.3 From f35bb1f74a0ffeb5c6477a25e3c4cde87a97bcf1 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 12:06:06 +0200 Subject: Removed unused includes, decrease compilation time (bzr r15025) --- src/live_effects/lpe-perspective_path.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/live_effects/lpe-perspective_path.cpp') diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp index c8cdd7912..6857d4363 100644 --- a/src/live_effects/lpe-perspective_path.cpp +++ b/src/live_effects/lpe-perspective_path.cpp @@ -15,18 +15,13 @@ #include "persp3d.h" //#include "transf_mat_3x4.h" -#include "document.h" #include "document-private.h" #include "live_effects/lpe-perspective_path.h" #include "live_effects/lpeobject.h" -#include "sp-item-group.h" #include "knot-holder-entity.h" #include "knotholder.h" #include "desktop.h" #include -#include "inkscape.h" - -#include <2geom/path.h> namespace Inkscape { namespace LivePathEffect { -- cgit v1.2.3 From 43b49e325db73cc19b1731db6c69545664ee8fbe Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 13:26:17 +0200 Subject: Reverted changes to r15024 after many building problems (bzr r15027) --- src/live_effects/lpe-perspective_path.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/live_effects/lpe-perspective_path.cpp') diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp index 6857d4363..c8cdd7912 100644 --- a/src/live_effects/lpe-perspective_path.cpp +++ b/src/live_effects/lpe-perspective_path.cpp @@ -15,13 +15,18 @@ #include "persp3d.h" //#include "transf_mat_3x4.h" +#include "document.h" #include "document-private.h" #include "live_effects/lpe-perspective_path.h" #include "live_effects/lpeobject.h" +#include "sp-item-group.h" #include "knot-holder-entity.h" #include "knotholder.h" #include "desktop.h" #include +#include "inkscape.h" + +#include <2geom/path.h> namespace Inkscape { namespace LivePathEffect { -- cgit v1.2.3 From 35830f456cadaecf8b8e3944e3031a1a93f6cb41 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Wed, 3 Aug 2016 15:29:38 +0200 Subject: Removed unused includes, decreased compilation time. Once again (bzr r15034) --- src/live_effects/lpe-perspective_path.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/live_effects/lpe-perspective_path.cpp') diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp index c8cdd7912..6857d4363 100644 --- a/src/live_effects/lpe-perspective_path.cpp +++ b/src/live_effects/lpe-perspective_path.cpp @@ -15,18 +15,13 @@ #include "persp3d.h" //#include "transf_mat_3x4.h" -#include "document.h" #include "document-private.h" #include "live_effects/lpe-perspective_path.h" #include "live_effects/lpeobject.h" -#include "sp-item-group.h" #include "knot-holder-entity.h" #include "knotholder.h" #include "desktop.h" #include -#include "inkscape.h" - -#include <2geom/path.h> namespace Inkscape { namespace LivePathEffect { -- cgit v1.2.3 From e973e1fc03c1b10c52a21af5f354f63b0f6624bd Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Sat, 10 Dec 2016 17:15:17 +0100 Subject: Fix headers on LPE's (bzr r15318) --- src/live_effects/lpe-perspective_path.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/live_effects/lpe-perspective_path.cpp') diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp index cb4e43d87..2c6d66cee 100644 --- a/src/live_effects/lpe-perspective_path.cpp +++ b/src/live_effects/lpe-perspective_path.cpp @@ -11,8 +11,6 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ #include -#include - #include "persp3d.h" //#include "transf_mat_3x4.h" #include "document-private.h" @@ -23,6 +21,9 @@ #include "desktop.h" #include +// TODO due to internal breakage in glibmm headers, this must be last: +#include + namespace Inkscape { namespace LivePathEffect { -- cgit v1.2.3 From 952eb10b1e00f0e4abfbf8dd23fcb3935019f098 Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Mon, 19 Dec 2016 21:54:42 +0100 Subject: Remove some ocurrences of desktop in knot functions (bzr r15337) --- src/live_effects/lpe-perspective_path.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/live_effects/lpe-perspective_path.cpp') diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp index 2c6d66cee..979b6dea5 100644 --- a/src/live_effects/lpe-perspective_path.cpp +++ b/src/live_effects/lpe-perspective_path.cpp @@ -18,7 +18,6 @@ #include "live_effects/lpeobject.h" #include "knot-holder-entity.h" #include "knotholder.h" -#include "desktop.h" #include // TODO due to internal breakage in glibmm headers, this must be last: @@ -243,9 +242,9 @@ LPEPerspectivePath::newWidget() return dynamic_cast(vbox); } -void LPEPerspectivePath::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) { +void LPEPerspectivePath::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) { KnotHolderEntity *e = new PP::KnotHolderEntityOffset(this); - e->create( desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, + e->create( NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("Adjust the origin") ); knotholder->add(e); }; -- cgit v1.2.3 From 6587e0fd91e337ac0bcf650e7ba95e0b9001cfab Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Sun, 12 Mar 2017 09:47:27 +0000 Subject: LPE Gtk3 deprecation fixes (bzr r15587) --- src/live_effects/lpe-perspective_path.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/live_effects/lpe-perspective_path.cpp') diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp index 979b6dea5..b83fb67d7 100644 --- a/src/live_effects/lpe-perspective_path.cpp +++ b/src/live_effects/lpe-perspective_path.cpp @@ -226,15 +226,28 @@ LPEPerspectivePath::newWidget() ++it; } Gtk::HBox * perspectiveId = Gtk::manage(new Gtk::HBox(true,0)); + +#if WITH_GTKMM_3_10 + Gtk::Label* labelPerspective = Gtk::manage(new Gtk::Label("Perspective ID:", Gtk::ALIGN_START, Gtk::ALIGN_START)); +#else Gtk::Label* labelPerspective = Gtk::manage(new Gtk::Label("Perspective ID:", 0., 0.)); +#endif + Gtk::Entry* perspective = Gtk::manage(new Gtk::Entry()); perspective->set_text(perspectiveID); perspective->set_tooltip_text("Set the perspective ID to apply"); perspectiveId->pack_start(*labelPerspective, true, true, 2); perspectiveId->pack_start(*perspective, true, true, 2); vbox->pack_start(*perspectiveId, true, true, 2); - Gtk::Button* apply3D = Gtk::manage(new Gtk::Button(Glib::ustring(_("Refresh perspective")))); - apply3D->set_alignment(0.0, 0.5); + Gtk::Button* apply3D = Gtk::manage(new Gtk::Button()); + +#if WITH_GTKMM_3_10 + Gtk::Label *apply3DLabel = Gtk::manage(new Gtk::Label(_("Refresh perspective"), Gtk::ALIGN_START, Gtk::ALIGN_CENTER)); +#else + Gtk::Label *apply3DLabel = Gtk::manage(new Gtk::Label(_("Refresh perspective"), 0.0, 0.5)); +#endif + + apply3D->add(*apply3DLabel); apply3D->signal_clicked().connect(sigc::bind(sigc::mem_fun(*this,&LPEPerspectivePath::refresh),perspective)); Gtk::Widget* apply3DWidget = dynamic_cast(apply3D); apply3DWidget->set_tooltip_text("Refresh perspective"); -- cgit v1.2.3 From 8f46a5b0b98499b98623370b3fa4d15e22d5cbef Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Fri, 28 Apr 2017 22:04:47 +0200 Subject: Code formating (bzr r15649) --- src/live_effects/lpe-perspective_path.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/live_effects/lpe-perspective_path.cpp') diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp index b83fb67d7..435c91c2d 100644 --- a/src/live_effects/lpe-perspective_path.cpp +++ b/src/live_effects/lpe-perspective_path.cpp @@ -51,11 +51,11 @@ LPEPerspectivePath::LPEPerspectivePath(LivePathEffectObject *lpeobject) : uses_plane_xy(_("Uses XY plane?"), _("If true, put the path on the left side of an imaginary box, otherwise on the right side"), "uses_plane_xy", &wr, this, true) { // register all your parameters here, so Inkscape knows which parameters this effect has: - registerParameter( dynamic_cast(&scalex) ); - registerParameter( dynamic_cast(&scaley) ); - registerParameter( dynamic_cast(&offsetx) ); - registerParameter( dynamic_cast(&offsety) ); - registerParameter( dynamic_cast(&uses_plane_xy) ); + registerParameter( &scalex); + registerParameter( &scaley); + registerParameter( &offsetx); + registerParameter( &offsety); + registerParameter( &uses_plane_xy); concatenate_before_pwd2 = true; // don't split the path into its subpaths _provides_knotholder_entities = true; -- cgit v1.2.3