InsetInfo::InsetInfo(Buffer * buf, string const & name)
: InsetCollapsable(buf), type_(UNKNOWN_INFO), name_()
{
- setAutoBreakRows(true);
setInfo(name);
status_ = Collapsed;
}
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);
break;
int percent_scale = 100;
if (use_gui) {
- // Compute the scale factor for the icon such its
+ // Compute the scale factor for the icon such that its
// width on screen is equal to 1em in pixels.
// The scale factor is rounded to the integer nearest
// to the float value of the ratio 100*iconsize/imgsize.