summaryrefslogtreecommitdiffstats
path: root/src/extension/effect.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2007-01-12 16:19:05 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2007-01-12 16:19:05 +0000
commit6c1b4f1bf3d31fde6158f1c040088b47055f97d0 (patch)
treeca0d9350681377e08f420d0ef4d7a29a700601f6 /src/extension/effect.cpp
parentadded new perspective script's inx file to POTFILES.in (diff)
downloadinkscape-6c1b4f1bf3d31fde6158f1c040088b47055f97d0.tar.gz
inkscape-6c1b4f1bf3d31fde6158f1c040088b47055f97d0.zip
fix 1633451: mark the help commands as not needing the document and avoid saving/reading/parsing errors when running them
(bzr r2194)
Diffstat (limited to 'src/extension/effect.cpp')
-rw-r--r--src/extension/effect.cpp30
1 files changed, 17 insertions, 13 deletions
diff --git a/src/extension/effect.cpp b/src/extension/effect.cpp
index 4e6c6fd79..93928d77e 100644
--- a/src/extension/effect.cpp
+++ b/src/extension/effect.cpp
@@ -34,28 +34,32 @@ Effect::Effect (Inkscape::XML::Node * in_repr, Implementation::Implementation *
bool hidden = false;
+ no_doc = false;
+
if (repr != NULL) {
- Inkscape::XML::Node * child_repr;
- for (child_repr = sp_repr_children(repr); child_repr != NULL; child_repr = child_repr->next()) {
- if (!strcmp(child_repr->name(), "effect")) {
- for (child_repr = sp_repr_children(child_repr); child_repr != NULL; child_repr = child_repr->next()) {
- if (!strcmp(child_repr->name(), "effects-menu")) {
+ for (Inkscape::XML::Node *child = sp_repr_children(repr); child != NULL; child = child->next()) {
+ if (!strcmp(child->name(), "effect")) {
+ if (child->attribute("needs-document") && !strcmp(child->attribute("needs-document"), "no")) {
+ no_doc = true;
+ }
+ for (Inkscape::XML::Node *effect_child = sp_repr_children(child); effect_child != NULL; effect_child = effect_child->next()) {
+ if (!strcmp(effect_child->name(), "effects-menu")) {
// printf("Found local effects menu in %s\n", this->get_name());
- local_effects_menu = sp_repr_children(child_repr);
- if (child_repr->attribute("hidden") && !strcmp(child_repr->attribute("hidden"), "yes")) {
+ local_effects_menu = sp_repr_children(effect_child);
+ if (effect_child->attribute("hidden") && !strcmp(effect_child->attribute("hidden"), "yes")) {
hidden = true;
}
}
- if (!strcmp(child_repr->name(), "menu-name") ||
- !strcmp(child_repr->name(), "_menu-name")) {
+ if (!strcmp(effect_child->name(), "menu-name") ||
+ !strcmp(effect_child->name(), "_menu-name")) {
// printf("Found local effects menu in %s\n", this->get_name());
- _verb.set_name(sp_repr_children(child_repr)->content());
+ _verb.set_name(sp_repr_children(effect_child)->content());
}
- if (!strcmp(child_repr->name(), "menu-tip") ||
- !strcmp(child_repr->name(), "_menu-tip")) {
+ if (!strcmp(effect_child->name(), "menu-tip") ||
+ !strcmp(effect_child->name(), "_menu-tip")) {
// printf("Found local effects menu in %s\n", this->get_name());
- _verb.set_tip(sp_repr_children(child_repr)->content());
+ _verb.set_tip(sp_repr_children(effect_child)->content());
}
} // children of "effect"
break; // there can only be one effect