summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 084fc26)
raw | patch | inline | side by side (parent: 084fc26)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Fri, 5 Sep 2008 19:48:07 +0000 (19:48 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Fri, 5 Sep 2008 19:48:07 +0000 (19:48 +0000) |
src/shape-editor.cpp | patch | blob | history |
diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp
index 91fdeca350508f31324731f170b819b99a3c2a73..c9a4fe55757067bca78fea707a7864a446ef9585 100644 (file)
--- a/src/shape-editor.cpp
+++ b/src/shape-editor.cpp
return false;
}
-static void shapeeditor_event_attr_changed(Inkscape::XML::Node */*repr*/, gchar const *name,
+static void shapeeditor_np_event_attr_changed(Inkscape::XML::Node */*repr*/, gchar const *name,
gchar const */*old_value*/, gchar const */*new_value*/,
bool /*is_interactive*/, gpointer data)
{
gboolean changed_np = FALSE;
- gboolean changed_kh = FALSE;
g_assert(data);
ShapeEditor *sh = ((ShapeEditor *) data);
{
changed_np = !sh->has_local_change(SH_NODEPATH);
sh->decrement_local_change(SH_NODEPATH);
-
}
if (changed_np) {
@@ -199,6 +197,17 @@ static void shapeeditor_event_attr_changed(Inkscape::XML::Node */*repr*/, gchar
}
}
+ sh->update_statusbar(); //TODO: sh->get_container()->update_statusbar();
+}
+
+static void shapeeditor_kh_event_attr_changed(Inkscape::XML::Node */*repr*/, gchar const *name,
+ gchar const */*old_value*/, gchar const */*new_value*/,
+ bool /*is_interactive*/, gpointer data)
+{
+ gboolean changed_kh = FALSE;
+
+ g_assert(data);
+ ShapeEditor *sh = ((ShapeEditor *) data);
if (sh->has_knotholder())
{
@@ -214,10 +223,20 @@ static void shapeeditor_event_attr_changed(Inkscape::XML::Node */*repr*/, gchar
sh->update_statusbar(); //TODO: sh->get_container()->update_statusbar();
}
-static Inkscape::XML::NodeEventVector shapeeditor_repr_events = {
+
+
+static Inkscape::XML::NodeEventVector shapeeditor_np_repr_events = {
+ NULL, /* child_added */
+ NULL, /* child_removed */
+ shapeeditor_np_event_attr_changed,
+ NULL, /* content_changed */
+ NULL /* order_changed */
+};
+
+static Inkscape::XML::NodeEventVector shapeeditor_kh_repr_events = {
NULL, /* child_added */
NULL, /* child_removed */
- shapeeditor_event_attr_changed,
+ shapeeditor_kh_event_attr_changed,
NULL, /* content_changed */
NULL /* order_changed */
};
// setting new listener
repr = SP_OBJECT_REPR(item);
Inkscape::GC::anchor(repr);
- sp_repr_add_listener(repr, &shapeeditor_repr_events, this);
+ sp_repr_add_listener(repr, &shapeeditor_np_repr_events, this);
}
break;
// setting new listener
repr = this->knotholder->repr;
Inkscape::GC::anchor(repr);
- sp_repr_add_listener(repr, &shapeeditor_repr_events, this);
+ sp_repr_add_listener(repr, &shapeeditor_kh_repr_events, this);
}
break;
}
@@ -284,7 +303,7 @@ void ShapeEditor::set_item_lpe_path_parameter(SPItem *item, SPObject *lpeobject,
Inkscape::XML::Node *repr = SP_OBJECT_REPR(lpeobject);
if (repr) {
Inkscape::GC::anchor(repr);
- sp_repr_add_listener(repr, &shapeeditor_repr_events, this);
+ sp_repr_add_listener(repr, &shapeeditor_np_repr_events, this);
}
}
}