From: André Pönitz Date: Thu, 3 Jan 2002 16:16:39 +0000 (+0000) Subject: Martin's patches, part I X-Git-Tag: 1.6.10~20096 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b63592b7d88cdc23818f0844eb85ceb439218911;p=lyx.git Martin's patches, part I git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3289 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index 9e2311594f..1551469e02 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,22 @@ +2002-01-03 Martin Vermeer + + * FormMathsPanel.C: + * FormMathsPanel.h + * MathsSymbols.C: + * form_maths_panel.C: + * form_maths_panel.h: + * form_maths_panel.fd: + implemented sub- and super- buttons in math panel. + + * lyx_main.C: + Revised hardwired bindings to allow original _ and ^ (or ^ space) + to be used as in TeX (req'd byAndré). + + * lyxfunc.C: + Allow ^and _ again to be used both as super/subscript (mathed) + and as themselves (in text). + + 2002-01-03 Allan Rae * LyXView.C (updateWindowTitle): Setup a short icon title of either diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 302aa2d1ec..34eaec042e 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -559,8 +559,6 @@ func_status::value_type LyXFunc::getStatus(int ac, case LFUN_MATH_LIMITS: case LFUN_MATH_NONUMBER: case LFUN_MATH_NUMBER: - case LFUN_SUBSCRIPT: - case LFUN_SUPERSCRIPT: disable = !mathcursor; break; @@ -1436,13 +1434,19 @@ string const LyXFunc::dispatch(int ac, case LFUN_MATH_NUMBER: case LFUN_MATH_NONUMBER: case LFUN_MATH_LIMITS: - case LFUN_SUBSCRIPT: - case LFUN_SUPERSCRIPT: { setErrorMessage(N_("This is only allowed in math mode!")); } break; + // passthrough hat and underscore outside mathed: + case LFUN_SUBSCRIPT: + dispatch(LFUN_SELFINSERT, "_"); + break; + case LFUN_SUPERSCRIPT: + dispatch(LFUN_SELFINSERT, "^"); + break; + case LFUN_MATH_PANEL: owner->getDialogs()->showMathPanel(); break;