diff options
| author | bulia byak <buliabyak@gmail.com> | 2006-10-09 23:16:46 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2006-10-09 23:16:46 +0000 |
| commit | c2403cb060f94f710fc05429bc94a9912c53af31 (patch) | |
| tree | 5a1bbb1e8a3c0f00b7e8ff295be9e9b966c24095 /src/extension/effect.cpp | |
| parent | add webbrowser extensions (diff) | |
| download | inkscape-c2403cb060f94f710fc05429bc94a9912c53af31.tar.gz inkscape-c2403cb060f94f710fc05429bc94a9912c53af31.zip | |
allow an effect to be hidden from the effects menu
(bzr r1789)
Diffstat (limited to 'src/extension/effect.cpp')
| -rw-r--r-- | src/extension/effect.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/extension/effect.cpp b/src/extension/effect.cpp index 71ddf3e24..168688f0e 100644 --- a/src/extension/effect.cpp +++ b/src/extension/effect.cpp @@ -32,6 +32,8 @@ Effect::Effect (Inkscape::XML::Node * in_repr, Implementation::Implementation * if (!strcmp(this->get_id(), "org.inkscape.filter.dropshadow")) return; + bool hidden = false; + if (repr != NULL) { Inkscape::XML::Node * child_repr; @@ -41,6 +43,9 @@ Effect::Effect (Inkscape::XML::Node * in_repr, Implementation::Implementation * if (!strcmp(child_repr->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")) { + hidden = true; + } } if (!strcmp(child_repr->name(), "menu-name") || !strcmp(child_repr->name(), "_menu-name")) { @@ -65,7 +70,8 @@ Effect::Effect (Inkscape::XML::Node * in_repr, Implementation::Implementation * _menu_node = sp_repr_new("verb"); _menu_node->setAttribute("verb-id", this->get_id(), false); - merge_menu(_effects_list->parent(), _effects_list, local_effects_menu, _menu_node); + if (!hidden) + merge_menu(_effects_list->parent(), _effects_list, local_effects_menu, _menu_node); } return; |
