diff options
| author | Jabiertxof <jtx@jtx> | 2017-01-22 02:06:22 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx> | 2017-01-22 02:06:22 +0000 |
| commit | 2a398a6073bf3fb0497a774760a4cebb54bb7e2c (patch) | |
| tree | 74b9ddaa26241296827ac2d35dbee7173e5b69b1 /src | |
| parent | Update to trunk (diff) | |
| download | inkscape-2a398a6073bf3fb0497a774760a4cebb54bb7e2c.tar.gz inkscape-2a398a6073bf3fb0497a774760a4cebb54bb7e2c.zip | |
Add multiwidget fixes
(bzr r15356.1.15)
Diffstat (limited to 'src')
| -rw-r--r-- | src/live_effects/lpe-clone-original.cpp | 21 | ||||
| -rw-r--r-- | src/live_effects/lpe-clone-original.h | 3 |
2 files changed, 18 insertions, 6 deletions
diff --git a/src/live_effects/lpe-clone-original.cpp b/src/live_effects/lpe-clone-original.cpp index da93a5093..db697552a 100644 --- a/src/live_effects/lpe-clone-original.cpp +++ b/src/live_effects/lpe-clone-original.cpp @@ -32,8 +32,8 @@ LPECloneOriginal::LPECloneOriginal(LivePathEffectObject *lpeobject) : paintorder(_("Clone paint order"), _("Clone paint order"), "paintorder", &wr, this, false), opacity(_("Clone opacity"), _("Clone opacity"), "opacity", &wr, this, false), filter(_("Clone filter"), _("Clone filter"), "filter", &wr, this, false), - attributes("Attributes linked", "Attributes linked", "attributes", &wr, this,""), - style_attributes("Style attributes linked", "Style attributes linked", "style_attributes", &wr, this,""), + attributes("Attributes linked", "Attributes linked, comma separated atributes", "attributes", &wr, this,""), + style_attributes("Style attributes linked", "Style attributes linked, comma separated atributes", "style_attributes", &wr, this,""), expanded(false) { registerParameter(&linked_path); @@ -237,14 +237,14 @@ LPECloneOriginal::doBeforeEffect (SPLPEItem const* lpeitem){ } preserve_position_changed = preserve_position; } - Glib::ustring attr = Glib::ustring(attributes.param_getSVGValue()); + Glib::ustring attr = Glib::ustring(attributes.param_getSVGValue()).append(","); if (d) { attr.append("d,"); } if (transform) { attr.append("transform,"); } - Glib::ustring style_attr = Glib::ustring(style_attributes.param_getSVGValue()); + Glib::ustring style_attr = Glib::ustring(style_attributes.param_getSVGValue()).append(","); if (fill) { style_attr.append("fill,").append("fill-rule,"); } @@ -315,12 +315,23 @@ LPECloneOriginal::newWidget() expander = Gtk::manage(new Gtk::Expander(Glib::ustring(_("Show attributes override")))); expander->add(*vbox_expander); expander->set_expanded(expanded); - expander->property_expanded().signal_changed().connect(sigc::mem_fun(*this, &LPEMeasureLine::onExpanderChanged) ); + expander->property_expanded().signal_changed().connect(sigc::mem_fun(*this, &LPECloneOriginal::onExpanderChanged) ); vbox->pack_start(*expander, true, true, 2); this->upd_params = false; return dynamic_cast<Gtk::Widget *>(vbox); } +void +LPECloneOriginal::onExpanderChanged() +{ + expanded = expander->get_expanded(); + if(expanded) { + expander->set_label (Glib::ustring(_("Hide attributes override"))); + } else { + expander->set_label (Glib::ustring(_("Show attributes override"))); + } +} + LPECloneOriginal::~LPECloneOriginal() { diff --git a/src/live_effects/lpe-clone-original.h b/src/live_effects/lpe-clone-original.h index c5080ad0e..0ff5eb01d 100644 --- a/src/live_effects/lpe-clone-original.h +++ b/src/live_effects/lpe-clone-original.h @@ -8,7 +8,7 @@ * * Released under GNU GPL, read the file 'COPYING' for more information */ - +#include <gtkmm/expander.h> #include "live_effects/effect.h" #include "live_effects/parameter/originalitem.h" #include "live_effects/parameter/originalpath.h" @@ -28,6 +28,7 @@ public: virtual void doBeforeEffect (SPLPEItem const* lpeitem); virtual void transform_multiply(Geom::Affine const& postmul, bool set); virtual Gtk::Widget * newWidget(); + void onExpanderChanged(); void cloneAttrbutes(SPObject *origin, SPObject *dest, bool live, const char * attributes, const char * style_attributes, bool root); private: |
