mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
* Move LFUN_BUFFER_CLOSE and LFUN_BUFFER_CLOSE_ALL to GuiView.
* Create a status for LFUN_BUFFER_CLOSE git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31400 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1be79d02e5
commit
37f71fba12
@ -557,7 +557,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
|
||||
case LFUN_COMMAND_PREFIX:
|
||||
case LFUN_CANCEL:
|
||||
case LFUN_META_PREFIX:
|
||||
case LFUN_BUFFER_CLOSE:
|
||||
case LFUN_RECONFIGURE:
|
||||
case LFUN_HELP_OPEN:
|
||||
case LFUN_DROP_LAYOUTS_CHOICE:
|
||||
@ -733,18 +732,6 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
break;
|
||||
|
||||
// --- Menus -----------------------------------------------
|
||||
case LFUN_BUFFER_CLOSE:
|
||||
lyx_view_->closeBuffer();
|
||||
buffer = 0;
|
||||
updateFlags = Update::None;
|
||||
break;
|
||||
|
||||
case LFUN_BUFFER_CLOSE_ALL:
|
||||
lyx_view_->closeBufferAll();
|
||||
buffer = 0;
|
||||
updateFlags = Update::None;
|
||||
break;
|
||||
|
||||
case LFUN_RECONFIGURE:
|
||||
// argument is any additional parameter to the configure.py command
|
||||
reconfigure(lyx_view_, argument);
|
||||
|
@ -1209,6 +1209,10 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
|
||||
enable = doc_buffer;
|
||||
break;
|
||||
|
||||
case LFUN_BUFFER_CLOSE:
|
||||
enable = doc_buffer;
|
||||
break;
|
||||
|
||||
case LFUN_BUFFER_CLOSE_ALL:
|
||||
enable = theBufferList().last() != theBufferList().first();
|
||||
break;
|
||||
@ -2453,6 +2457,14 @@ bool GuiView::dispatch(FuncRequest const & cmd)
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_BUFFER_CLOSE:
|
||||
closeBuffer();
|
||||
break;
|
||||
|
||||
case LFUN_BUFFER_CLOSE_ALL:
|
||||
closeBufferAll();
|
||||
break;
|
||||
|
||||
case LFUN_TOOLBAR_TOGGLE: {
|
||||
string const name = cmd.getArg(0);
|
||||
if (GuiToolbar * t = toolbar(name))
|
||||
|
Loading…
Reference in New Issue
Block a user