some more LFUN transfer from LyXFunc to GuiView.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21741 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-11-23 12:37:09 +00:00
parent 47f54dd68b
commit b8cd772329
2 changed files with 11 additions and 17 deletions

View File

@ -845,6 +845,9 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
} else {
switch (action) {
// Let lyx_view_ dispatch its own actions.
case LFUN_BUFFER_SWITCH:
case LFUN_BUFFER_NEXT:
case LFUN_BUFFER_PREVIOUS:
case LFUN_COMMAND_EXECUTE:
case LFUN_DROP_LAYOUTS_CHOICE:
case LFUN_MENU_OPEN:
@ -1268,23 +1271,6 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
break;
// --- buffers ----------------------------------------
case LFUN_BUFFER_SWITCH:
BOOST_ASSERT(lyx_view_);
lyx_view_->setBuffer(theBufferList().getBuffer(argument));
updateFlags = Update::None;
break;
case LFUN_BUFFER_NEXT:
BOOST_ASSERT(lyx_view_);
lyx_view_->setBuffer(theBufferList().next(lyx_view_->buffer()));
updateFlags = Update::None;
break;
case LFUN_BUFFER_PREVIOUS:
BOOST_ASSERT(lyx_view_);
lyx_view_->setBuffer(theBufferList().previous(lyx_view_->buffer()));
updateFlags = Update::None;
break;
case LFUN_FILE_NEW: {
BOOST_ASSERT(lyx_view_);

View File

@ -1030,6 +1030,14 @@ void GuiView::dispatch(FuncRequest const & cmd)
setBuffer(theBufferList().getBuffer(to_utf8(cmd.argument())));
break;
case LFUN_BUFFER_NEXT:
setBuffer(theBufferList().next(buffer()));
break;
case LFUN_BUFFER_PREVIOUS:
setBuffer(theBufferList().previous(buffer()));
break;
case LFUN_COMMAND_EXECUTE: {
bool const show_it = cmd.argument() != "off";
d.toolbars_->showCommandBuffer(show_it);