From 1d7d54a4a711dbc2253d00480ed961f1d9898efd Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Sat, 12 Sep 2009 21:12:24 +0000 Subject: [PATCH] Move LFUN status check to where they belong. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31378 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/LyXFunc.cpp | 6 ------ src/Text3.cpp | 1 - src/frontends/qt4/GuiView.cpp | 15 +++++++++++++++ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/LyXFunc.cpp b/src/LyXFunc.cpp index 4a32f01ed1..b06bf0f1bc 100644 --- a/src/LyXFunc.cpp +++ b/src/LyXFunc.cpp @@ -590,7 +590,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const break; } - case LFUN_WORD_FINDADV: case LFUN_COMMAND_PREFIX: case LFUN_COMMAND_EXECUTE: case LFUN_CANCEL: @@ -601,12 +600,9 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const case LFUN_RECONFIGURE: case LFUN_HELP_OPEN: case LFUN_DROP_LAYOUTS_CHOICE: - case LFUN_MENU_OPEN: case LFUN_SERVER_GET_FILENAME: case LFUN_SERVER_NOTIFY: case LFUN_SERVER_GOTO_FILE_ROW: - case LFUN_DIALOG_HIDE: - case LFUN_DIALOG_DISCONNECT_INSET: case LFUN_BUFFER_CHILD_OPEN: case LFUN_CURSOR_FOLLOWS_SCROLLBAR_TOGGLE: case LFUN_KEYMAP_OFF: @@ -627,8 +623,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const case LFUN_LAYOUT_MODULE_ADD: case LFUN_LAYOUT_RELOAD: case LFUN_LYXRC_APPLY: - case LFUN_BUFFER_NEXT: - case LFUN_BUFFER_PREVIOUS: // these are handled in our dispatch() break; diff --git a/src/Text3.cpp b/src/Text3.cpp index be9a189029..c1e89abd6a 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -2740,7 +2740,6 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd, case LFUN_FONT_UWAVE: case LFUN_LABEL_GOTO: case LFUN_LAYOUT_TABULAR: - case LFUN_MENU_OPEN: case LFUN_NOACTION: case LFUN_NOTE_NEXT: case LFUN_REFERENCE_NEXT: diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index eca9dcd063..b245b02a68 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -1232,6 +1232,13 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag) flag.setOnOff(isFullScreen()); break; + case LFUN_DIALOG_DISCONNECT_INSET: + break; + + case LFUN_DIALOG_HIDE: + // FIXME: should we check if the dialog is shown? + break; + case LFUN_DIALOG_TOGGLE: flag.setOnOff(isDialogVisible(cmd.getArg(0))); // fall through to set "enable" @@ -1271,6 +1278,10 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag) enable = name == "prefs"; break; } + + case LFUN_MENU_OPEN: + // Nothing to check. + break; case LFUN_INSET_APPLY: { string const name = cmd.getArg(0); @@ -1335,6 +1346,10 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag) enable = doc_buffer; break; + case LFUN_BUFFER_NEXT: + case LFUN_BUFFER_PREVIOUS: + // FIXME: should we check is there is an previous or next buffer? + break; case LFUN_BUFFER_SWITCH: // toggle on the current buffer, but do not toggle off // the other ones (is that a good idea?)