From 3c1b0ea16b5a1fe437ccffd9e602d7a27fdd6379 Mon Sep 17 00:00:00 2001 From: John Levon Date: Wed, 2 Apr 2003 22:12:52 +0000 Subject: [PATCH] tab funcs changed git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6691 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 9 +++++++++ src/LyXAction.C | 6 +++--- src/insets/ChangeLog | 4 ++++ src/insets/insettabular.C | 6 +++--- src/lfuns.h | 6 +++--- src/lyx_main.C | 10 +++++----- src/lyxtext.h | 2 -- src/mathed/ChangeLog | 5 +++++ src/mathed/formulabase.C | 6 +++--- src/mathed/math_gridinset.C | 2 +- src/text.C | 18 ------------------ src/text3.C | 9 --------- 12 files changed, 36 insertions(+), 47 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 24a82cea5a..855f795721 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2003-04-02 John Levon + + * LyXAction.C: + * lfuns.h: + * lyx_main.C: + * lyxtext.h: + * text.C: + * text3.C: rename the "tab" lfuns. Remove tab support from normal text + 2003-04-02 Lars Gullik Bjønnes * paragraph.h: make ParagraphList and ParagraphList::iterator diff --git a/src/LyXAction.C b/src/LyXAction.C index 3856916b15..df045b4aa6 100644 --- a/src/LyXAction.C +++ b/src/LyXAction.C @@ -340,9 +340,9 @@ void LyXAction::init() { LFUN_SETXY, "server-set-xy", "", ReadOnly }, { LFUN_SET_COLOR, "set-color", "", ReadOnly|NoBuffer }, { LFUN_SPELLCHECK, "spellchecker", "", Noop }, - { LFUN_SHIFT_TAB, "tab-backward", "", Noop }, - { LFUN_TAB, "tab-forward", "", Noop }, - { LFUN_TABINSERT, "tab-insert", "", Noop }, + { LFUN_CELL_BACKWARD, "cell-backward", "", Noop }, + { LFUN_CELL_FORWARD, "cell-forward", "", Noop }, + { LFUN_CELL_SPLIT, "cell-split", "", Noop }, { LFUN_TABULAR_INSERT, "tabular-insert", N_("Insert Table"), Noop }, { LFUN_TABULAR_FEATURE, "tabular-feature", N_("Tabular Features"), Noop }, diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 9e96459142..112b7901a9 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,7 @@ +2003-04-02 John Levon + + * insettabular.C: tab lfuns renamed + 2003-04-02 Lars Gullik Bjønnes * insettext.C (update): move towards ParagraphList diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index 2c0e3aff52..8f1939db07 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -812,11 +812,11 @@ Inset::RESULT InsetTabular::localDispatch(FuncRequest const & cmd) case LFUN_MOUSE_RELEASE: return lfunMouseRelease(cmd) ? DISPATCHED : UNDISPATCHED; - case LFUN_SHIFT_TAB: - case LFUN_TAB: + case LFUN_CELL_BACKWARD: + case LFUN_CELL_FORWARD: hideInsetCursor(bv); unlockInsetInInset(bv, the_locking_inset); - if (cmd.action == LFUN_TAB) + if (cmd.action == LFUN_CELL_FORWARD) moveNextCell(bv, old_locking_inset != 0); else movePrevCell(bv, old_locking_inset != 0); diff --git a/src/lfuns.h b/src/lfuns.h index 2e0cbb6ff3..c3a29c0e42 100644 --- a/src/lfuns.h +++ b/src/lfuns.h @@ -77,8 +77,8 @@ enum kb_action { LFUN_NEXT, LFUN_HOME, LFUN_END, - LFUN_TAB, - LFUN_SHIFT_TAB, + LFUN_CELL_FORWARD, + LFUN_CELL_BACKWARD, // 45 LFUN_WORDRIGHT, LFUN_WORDLEFT, @@ -228,7 +228,7 @@ enum kb_action { LFUN_LATEX_LOG, // Lgb 97-04-05 LFUN_LAYOUT_COPY, // Asger 1997-05-04 LFUN_LAYOUT_PASTE, // Asger 1997-05-04 - LFUN_TABINSERT, // Ale 970515 + LFUN_CELL_SPLIT, // 170 LFUN_CHILDOPEN, // Ale 970528 LFUN_TOC_INSERT, // Lgb 97-05-27 diff --git a/src/lyx_main.C b/src/lyx_main.C index 168b299a9f..ba26292687 100644 --- a/src/lyx_main.C +++ b/src/lyx_main.C @@ -503,8 +503,8 @@ void LyX::defaultKeyBindings(kb_keymap * kbmap) kbmap->bind("Up", LFUN_UP); kbmap->bind("Down", LFUN_DOWN); - kbmap->bind("Tab", LFUN_TAB); - kbmap->bind("ISO_Left_Tab", LFUN_TAB); // jbl 2001-23-02 + kbmap->bind("Tab", LFUN_CELL_FORWARD); + kbmap->bind("ISO_Left_Tab", LFUN_CELL_FORWARD); // jbl 2001-23-02 kbmap->bind("Home", LFUN_HOME); kbmap->bind("End", LFUN_END); @@ -548,9 +548,9 @@ void LyX::defaultKeyBindings(kb_keymap * kbmap) kbmap->bind("KP_Prior", LFUN_PRIOR); kbmap->bind("KP_Next", LFUN_NEXT); - kbmap->bind("C-Tab", LFUN_TABINSERT); // ale970515 - kbmap->bind("S-Tab", LFUN_SHIFT_TAB); // jug20000522 - kbmap->bind("S-ISO_Left_Tab", LFUN_SHIFT_TAB); // jbl 2001-23-02 + kbmap->bind("C-Tab", LFUN_CELL_SPLIT); // ale970515 + kbmap->bind("S-Tab", LFUN_CELL_BACKWARD); // jug20000522 + kbmap->bind("S-ISO_Left_Tab", LFUN_CELL_BACKWARD); // jbl 2001-23-02 } diff --git a/src/lyxtext.h b/src/lyxtext.h index f416f5e3e9..b5764ad3f5 100644 --- a/src/lyxtext.h +++ b/src/lyxtext.h @@ -383,8 +383,6 @@ public: /// void cursorNext(); /// - void cursorTab(); - /// void cursorTop(); /// void cursorBottom(); diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 40cacd40af..4917919340 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,8 @@ +2003-04-02 John Levon + + * formulabase.C: + * math_gridinset.C: tab lfuns changed name + 2003-03-28 John Levon * formulabase.C: remove LFUN_GREEK - does nothing diff --git a/src/mathed/formulabase.C b/src/mathed/formulabase.C index 04eb31e3c4..971630ebc3 100644 --- a/src/mathed/formulabase.C +++ b/src/mathed/formulabase.C @@ -450,7 +450,7 @@ dispatch_result InsetFormulaBase::localDispatch(FuncRequest const & cmd) case LFUN_MATH_DISPLAY: case LFUN_MATH_NUMBER: case LFUN_MATH_NONUMBER: - case LFUN_TABINSERT: + case LFUN_CELL_SPLIT: case LFUN_BREAKLINE: case LFUN_DELETE_LINE_FORWARD: case LFUN_INSERT_LABEL: @@ -532,11 +532,11 @@ dispatch_result InsetFormulaBase::localDispatch(FuncRequest const & cmd) result = FINISHED_RIGHT; break; - case LFUN_TAB: + case LFUN_CELL_FORWARD: mathcursor->idxNext(); break; - case LFUN_SHIFT_TAB: + case LFUN_CELL_BACKWARD: mathcursor->idxPrev(); break; diff --git a/src/mathed/math_gridinset.C b/src/mathed/math_gridinset.C index fd8ef6e11c..61729990cb 100644 --- a/src/mathed/math_gridinset.C +++ b/src/mathed/math_gridinset.C @@ -1048,7 +1048,7 @@ dispatch_result MathGridInset::dispatch pos = cell(idx).size(); return DISPATCHED_POP; - case LFUN_TABINSERT: + case LFUN_CELL_SPLIT: //bv->lockedInsetStoreUndo(Undo::EDIT); splitCell(idx, pos); return DISPATCHED_POP; diff --git a/src/text.C b/src/text.C index b0d6183723..f4dc070067 100644 --- a/src/text.C +++ b/src/text.C @@ -1991,24 +1991,6 @@ void LyXText::cursorRightOneWord() } -void LyXText::cursorTab() -{ - LyXCursor tmpcursor = cursor; - while (tmpcursor.pos() < tmpcursor.par()->size() - && !tmpcursor.par()->isNewline(tmpcursor.pos())) - tmpcursor.pos(tmpcursor.pos() + 1); - - if (tmpcursor.pos() == tmpcursor.par()->size()) { - if (tmpcursor.par()->next()) { - tmpcursor.par(tmpcursor.par()->next()); - tmpcursor.pos(0); - } - } else - tmpcursor.pos(tmpcursor.pos() + 1); - setCursor(tmpcursor.par(), tmpcursor.pos()); -} - - // Skip initial whitespace at end of word and move cursor to *start* // of prior word, not to end of next prior word. void LyXText::cursorLeftOneWord() diff --git a/src/text3.C b/src/text3.C index 1e445f459f..b916f8d4b0 100644 --- a/src/text3.C +++ b/src/text3.C @@ -460,15 +460,6 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd) finishChange(bv); break; - case LFUN_SHIFT_TAB: - case LFUN_TAB: - if (!selection.mark()) - bv->beforeChange(this); - update(); - cursorTab(); - finishChange(bv); - break; - case LFUN_WORDRIGHT: if (!selection.mark()) bv->beforeChange(this); -- 2.39.5