TO_EXPORTFORMATS,
TO_IMPORTFORMATS,
TO_UPDATEFORMATS,
- TO_VIEWFORMATS
+ TO_VIEWFORMATS,
+ TO_DYNAMICMENU
};
struct LexerKeyword toolTags[] = {
+ { "dynamicmenu", TO_DYNAMICMENU},
{ "end", TO_ENDTOOLBAR },
{ "exportformats", TO_EXPORTFORMATS },
{ "iconpalette", TO_ICONPALETTE },
}
break;
+ case TO_DYNAMICMENU: {
+ if (lex.next(true)) {
+ string const name = lex.getString();
+ lex.next(true);
+ docstring const label = lex.getDocString();
+ add(ToolbarItem(ToolbarItem::DYNAMICMENU, name, label));
+ }
+ break;
+ }
+
case TO_STICKYPOPUPMENU:
if (lex.next(true)) {
string const pname = lex.getString();
case TO_IMPORTFORMATS:
case TO_UPDATEFORMATS:
case TO_VIEWFORMATS: {
- FormatList formats = (code == TO_IMPORTFORMATS) ?
- theConverters().importableFormats() :
- theConverters().exportableFormats(true);
+ FormatList formats;
+ if (code == TO_IMPORTFORMATS)
+ formats = theConverters().importableFormats();
+ else if (code == TO_EXPORTFORMATS)
+ formats = theConverters().exportableFormats(false);
+ else
+ formats = theConverters().exportableFormats(true);
sort(formats.begin(), formats.end());
for (Format const * f : formats) {
if (f->dummy())