summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4ea9891)
raw | patch | inline | side by side (parent: 4ea9891)
author | gouldtj <gouldtj@users.sourceforge.net> | |
Mon, 30 Jan 2006 05:12:10 +0000 (05:12 +0000) | ||
committer | gouldtj <gouldtj@users.sourceforge.net> | |
Mon, 30 Jan 2006 05:12:10 +0000 (05:12 +0000) |
Whoo hoo, we do submenus now too!
src/extension/effect.cpp | patch | blob | history |
index 1d0c4c4af4757bb31063a5437eccf90c5b0157e5..f88833ec445c9a545726ac362bdf4dca0b6da268 100644 (file)
--- a/src/extension/effect.cpp
+++ b/src/extension/effect.cpp
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;