]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetInfo.cpp
Properly terminate quote macros by means of new textstream function
[lyx.git] / src / insets / InsetInfo.cpp
index 6e21d9b3231bef0b9afa09df56c3ecae122f8239..2f26c971f864b8293b3d146e59fb038d21775f23 100644 (file)
@@ -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);