diff --git a/src/LyXFunc.cpp b/src/LyXFunc.cpp index 948edbe331..8dac8f676b 100644 --- a/src/LyXFunc.cpp +++ b/src/LyXFunc.cpp @@ -633,7 +633,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const case LFUN_CANCEL: case LFUN_META_PREFIX: case LFUN_BUFFER_CLOSE: - case LFUN_BUFFER_CLOSE_ALL: case LFUN_BUFFER_IMPORT: case LFUN_BUFFER_AUTO_SAVE: case LFUN_RECONFIGURE: diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 605426be8b..c2735f4e04 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -1246,6 +1246,22 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag) enable = buf; break; + case LFUN_BUFFER_CLOSE_ALL: { + enable = false; + BufferList::iterator it = theBufferList().begin(); + BufferList::iterator end = theBufferList().end(); + int visible_buffers = 0; + for (; it != end; ++it) { + if (workArea(**it)) + ++visible_buffers; + if (visible_buffers > 1) { + enable = true; + break; + } + } + break; + } + case LFUN_SPLIT_VIEW: if (cmd.getArg(0) == "vertical") enable = buf && (d.splitter_->count() == 1 ||