Move LFUN_KEYMAP_* to BufferView.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31410 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2009-09-19 16:59:36 +00:00
parent c1696ccae3
commit 1d5345289c
2 changed files with 19 additions and 24 deletions

View File

@ -937,6 +937,10 @@ bool BufferView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
case LFUN_ALL_INSETS_TOGGLE:
case LFUN_STATISTICS:
case LFUN_BRANCH_ADD_INSERT:
case LFUN_KEYMAP_OFF:
case LFUN_KEYMAP_PRIMARY:
case LFUN_KEYMAP_SECONDARY:
case LFUN_KEYMAP_TOGGLE:
flag.setEnabled(true);
break;
@ -1552,6 +1556,21 @@ bool BufferView::dispatch(FuncRequest const & cmd)
break;
}
case LFUN_KEYMAP_OFF:
getIntl().keyMapOn(false);
break;
case LFUN_KEYMAP_PRIMARY:
getIntl().keyMapPrim();
break;
case LFUN_KEYMAP_SECONDARY:
getIntl().keyMapSec();
break;
case LFUN_KEYMAP_TOGGLE:
getIntl().toggleKeyMap();
break;
default:
return false;

View File

@ -564,10 +564,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
case LFUN_SERVER_NOTIFY:
case LFUN_SERVER_GOTO_FILE_ROW:
case LFUN_CURSOR_FOLLOWS_SCROLLBAR_TOGGLE:
case LFUN_KEYMAP_OFF:
case LFUN_KEYMAP_PRIMARY:
case LFUN_KEYMAP_SECONDARY:
case LFUN_KEYMAP_TOGGLE:
case LFUN_REPEAT:
case LFUN_PREFERENCES_SAVE:
case LFUN_INSET_EDIT:
@ -968,26 +964,6 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
lyxrc.cursor_follows_scrollbar = !lyxrc.cursor_follows_scrollbar;
break;
case LFUN_KEYMAP_OFF:
LASSERT(lyx_view_ && lyx_view_->currentBufferView(), /**/);
lyx_view_->currentBufferView()->getIntl().keyMapOn(false);
break;
case LFUN_KEYMAP_PRIMARY:
LASSERT(lyx_view_ && lyx_view_->currentBufferView(), /**/);
lyx_view_->currentBufferView()->getIntl().keyMapPrim();
break;
case LFUN_KEYMAP_SECONDARY:
LASSERT(lyx_view_ && lyx_view_->currentBufferView(), /**/);
lyx_view_->currentBufferView()->getIntl().keyMapSec();
break;
case LFUN_KEYMAP_TOGGLE:
LASSERT(lyx_view_ && lyx_view_->currentBufferView(), /**/);
lyx_view_->currentBufferView()->getIntl().toggleKeyMap();
break;
case LFUN_REPEAT: {
// repeat command
string countstr;