index 1d0c4c4af4757bb31063a5437eccf90c5b0157e5..aefdeefa75a875de03056715fad4f150fe794a69 100644 (file)
--- a/src/extension/effect.cpp
+++ b/src/extension/effect.cpp
// printf("Found local effects menu in %s\n", this->get_name());
local_effects_menu = sp_repr_children(child_repr);
}
+ if (!strcmp(child_repr->name(), "menu-name") ||
+ !strcmp(child_repr->name(), "_menu-name")) {
+ // printf("Found local effects menu in %s\n", this->get_name());
+ _verb.set_name(sp_repr_children(child_repr)->content());
+ }
+ if (!strcmp(child_repr->name(), "menu-tip") ||
+ !strcmp(child_repr->name(), "_menu-tip")) {
+ // printf("Found local effects menu in %s\n", this->get_name());
+ _verb.set_tip(sp_repr_children(child_repr)->content());
+ }
} // children of "effect"
break; // there can only be one effect
} // find "effect"
Inkscape::XML::Node * mergee) {
Glib::ustring mergename;
Inkscape::XML::Node * tomerge = NULL;
+ Inkscape::XML::Node * submenu = NULL;
/* printf("Merge menu with '%s' '%s' '%s'\n",
base != NULL ? base->name() : "NULL",
mergename = _(menuname);
}
- base->appendChild(tomerge);
- Inkscape::GC::release(tomerge);
+ int position = -1;
if (start != NULL) {
Inkscape::XML::Node * menupass;
Glib::ustring compare(_(compare_char));
+ if (mergename == compare) {
+ Inkscape::GC::release(tomerge);
+ tomerge = NULL;
+ submenu = menupass;
+ break;
+ }
+
if (mergename < compare) {
- tomerge->setPosition(menupass->position());
+ position = menupass->position();
break;
}
} // for menu items
} // start != NULL
+ if (tomerge != NULL) {
+ base->appendChild(tomerge);
+ Inkscape::GC::release(tomerge);
+ if (position != -1)
+ tomerge->setPosition(position);
+ }
+
if (patern != NULL) {
- merge_menu(tomerge, tomerge->firstChild(), patern->firstChild(), mergee);
+ if (submenu == NULL)
+ submenu = tomerge;
+ merge_menu(submenu, submenu->firstChild(), patern->firstChild(), mergee);
}
return;
return true;
}
- PrefDialog * dialog = new PrefDialog(this->get_name(), controls);
+ PrefDialog * dialog = new PrefDialog(this->get_name(), this->get_help(), controls);
int response = dialog->run();
dialog->hide();
return false;
}
+Gtk::VBox *
+Effect::get_info_widget(void)
+{
+ return Extension::get_info_widget();
+}
+
/** \brief Create an action for a \c EffectVerb
\param view Which view the action should be created for
\return The built action.