]> git.lyx.org Git - lyx.git/blobdiff - src/LyXFunc.cpp
Kornel's gcc compile fix.
[lyx.git] / src / LyXFunc.cpp
index 2017df3ef647285c0ab79dcbe4fc90013b4e1838..024fdb14e7cd7d619977637a955a850f652cbb6b 100644 (file)
@@ -162,27 +162,13 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
                return flag;
        }
 
-       switch (cmd.action) {
-       case LFUN_UNKNOWN_ACTION:
+       if (cmd.action == LFUN_UNKNOWN_ACTION) {
                flag.unknown(true);
                flag.setEnabled(false);
-               break;
-
-       default:
-               break;
-       }
-
-       if (flag.unknown()) {
                flag.message(from_utf8(N_("Unknown action")));
                return flag;
        }
 
-       if (!flag.enabled()) {
-               if (flag.message().empty())
-                       flag.message(from_utf8(N_("Command disabled")));
-               return flag;
-       }
-
        // I would really like to avoid having this switch and rather try to
        // encode this in the function itself.
        // -- And I'd rather let an inset decide which LFUNs it is willing
@@ -257,11 +243,9 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
                break;
        }
 
-       case LFUN_DROP_LAYOUTS_CHOICE:
        case LFUN_CURSOR_FOLLOWS_SCROLLBAR_TOGGLE:
        case LFUN_REPEAT:
        case LFUN_PREFERENCES_SAVE:
-       case LFUN_INSET_EDIT:
        case LFUN_BUFFER_SAVE_AS_DEFAULT:
                // these are handled in our dispatch()
                break;