X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetInfo.cpp;h=2f26c971f864b8293b3d146e59fb038d21775f23;hb=83d2c7fa3704a221b143a54b0c78747fbd712504;hp=6e21d9b3231bef0b9afa09df56c3ecae122f8239;hpb=4dcc73ebf0a4874cc51ca5fa316a148b0e15427d;p=lyx.git diff --git a/src/insets/InsetInfo.cpp b/src/insets/InsetInfo.cpp index 6e21d9b323..2f26c971f8 100644 --- a/src/insets/InsetInfo.cpp +++ b/src/insets/InsetInfo.cpp @@ -169,12 +169,20 @@ bool InsetInfo::validateModifyArgument(docstring const & arg) const 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);