case SHORTCUT_INFO:
case SHORTCUTS_INFO:
- case MENU_INFO:
- case ICON_INFO: {
+ case MENU_INFO: {
FuncRequest func = lyxaction.lookupFunc(name);
return func.action() != LFUN_UNKNOWN_ACTION;
}
+ case ICON_INFO: {
+ FuncCode const action = lyxaction.lookupFunc(name).action();
+ if (action == LFUN_UNKNOWN_ACTION) {
+ string dir = "images";
+ return !imageLibFileSearch(dir, name, "svgz,png").empty();
+ }
+ return true;
+ }
+
case LYXRC_INFO: {
ostringstream oss;
lyxrc.write(oss, true, name);
icon: argument is the name of the LFUN such as "paste". The syntax is the same
as what is used in the bind and ui files. The output is the icon use in
- the toolbar for this LFUN.
+ the toolbar for this LFUN. Alternatively, argument can be the icon path
+ without extension specified with respect to the images directory.
buffer: argument can be one of "name", "path", "class". This inset output the
filename, path, and textclass of this buffer.