diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-07-02 16:33:20 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-07-02 16:33:20 +0000 |
| commit | 37dc1dd695cd2db6dcda930866bf97c10076ca77 (patch) | |
| tree | 214b3f9d8d6508725894695e80c77fce4ccd27bd /src/live_effects/parameter | |
| parent | Don't dereference NULL knotholder; fixes instant crash, but using the handles... (diff) | |
| download | inkscape-37dc1dd695cd2db6dcda930866bf97c10076ca77.tar.gz inkscape-37dc1dd695cd2db6dcda930866bf97c10076ca77.zip | |
Enable status bar tips for LPE handles that are automatically created from PointParams
(bzr r6118)
Diffstat (limited to 'src/live_effects/parameter')
| -rw-r--r-- | src/live_effects/parameter/point.cpp | 5 | ||||
| -rw-r--r-- | src/live_effects/parameter/point.h | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/live_effects/parameter/point.cpp b/src/live_effects/parameter/point.cpp index be8415d8d..84de8db05 100644 --- a/src/live_effects/parameter/point.cpp +++ b/src/live_effects/parameter/point.cpp @@ -32,7 +32,7 @@ namespace LivePathEffect { PointParam::PointParam( const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Inkscape::UI::Widget::Registry* wr, - Effect* effect, Geom::Point default_value ) + Effect* effect, const gchar *htip, Geom::Point default_value) : Geom::Point(default_value), Parameter(label, tip, key, wr, effect), defvalue(default_value) { oncanvas_editable = true; @@ -40,10 +40,13 @@ PointParam::PointParam( const Glib::ustring& label, const Glib::ustring& tip, knot_shape = SP_KNOT_SHAPE_SQUARE; knot_mode = SP_KNOT_MODE_XOR; knot_color = 0x00ff0000; + handle_tip = g_strdup(htip); } PointParam::~PointParam() { + if (handle_tip) + g_free(handle_tip); } void diff --git a/src/live_effects/parameter/point.h b/src/live_effects/parameter/point.h index 3e8dc843a..bbd4d815e 100644 --- a/src/live_effects/parameter/point.h +++ b/src/live_effects/parameter/point.h @@ -30,7 +30,8 @@ public: const Glib::ustring& key, Inkscape::UI::Widget::Registry* wr, Effect* effect, - Geom::Point default_value = Geom::Point(0,0)); + const gchar *handle_tip = NULL, + Geom::Point default_value = Geom::Point(0,0) ); // tip for automatically associated on-canvas handle virtual ~PointParam(); virtual ParamType paramType() { return POINT_PARAM; } @@ -39,6 +40,7 @@ public: bool param_readSVGValue(const gchar * strvalue); gchar * param_getSVGValue() const; + inline const gchar *handleTip() const { return handle_tip ? handle_tip : param_tooltip.c_str(); } void param_setValue(Geom::Point newpoint); void param_set_default(); @@ -69,6 +71,7 @@ private: SPKnotShapeType knot_shape; SPKnotModeType knot_mode; guint32 knot_color; + gchar *handle_tip; }; |
