From 96f5fec5242cc2a1e451ad6402bd4a4f6fb9b257 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Sun, 4 Oct 2009 21:29:37 +0000 Subject: [PATCH] Code simplification. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31523 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/LyXFunc.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/LyXFunc.cpp b/src/LyXFunc.cpp index fe5f514849..024fdb14e7 100644 --- a/src/LyXFunc.cpp +++ b/src/LyXFunc.cpp @@ -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 -- 2.39.2