Move LFUN_BUFFER_SWITCH from LyXFunc::getStatus to GuiView::getStatus.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31359 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-09-09 05:49:51 +00:00
parent d4d8d03153
commit 3be8389d61
2 changed files with 8 additions and 7 deletions

View File

@ -467,13 +467,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
flag.setOnOff(buf->isReadonly());
break;
case LFUN_BUFFER_SWITCH:
// toggle on the current buffer, but do not toggle off
// the other ones (is that a good idea?)
if (buf && to_utf8(cmd.argument()) == buf->absFileName())
flag.setOnOff(true);
break;
case LFUN_BUFFER_CHKTEX:
enable = buf->isLatex() && !lyxrc.chktex_command.empty();
break;

View File

@ -1323,6 +1323,14 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
case LFUN_BUFFER_ZOOM_IN:
enable = buf;
break;
case LFUN_BUFFER_SWITCH:
// toggle on the current buffer, but do not toggle off
// the other ones (is that a good idea?)
buf = &documentBufferView()->buffer();
if (buf && to_utf8(cmd.argument()) == buf->absFileName())
flag.setOnOff(true);
break;
default:
return false;