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
This commit is contained in:
Abdelrazak Younes 2009-09-12 21:12:24 +00:00
parent 6854d67067
commit 1d7d54a4a7
3 changed files with 15 additions and 7 deletions

View File

@ -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;

View File

@ -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:

View File

@ -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?)