From 1b8855bed84ecfca65a3dfaee6cc77bf8ee7bffa Mon Sep 17 00:00:00 2001 From: John Levon Date: Fri, 6 Sep 2002 01:41:01 +0000 Subject: [PATCH] small fixes git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5214 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 10 ++++++++++ src/LyXAction.C | 4 ++-- src/MenuBackend.C | 2 ++ src/lyxfunc.C | 13 ++++++------- src/undo_funcs.C | 2 +- 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index aa8d7506f6..5e2b7501c7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2002-09-06 John Levon + + * LyXAction.C: tooltips for sub/superscript + + * MenuBackend.C: a bit more verbose + + * lyxfunc.C: tiny clean + + * undo_funcs.C: document undo_frozen + 2002-09-05 Lars Gullik Bjønnes * counters.C (Counters): add missing algorithm counter. diff --git a/src/LyXAction.C b/src/LyXAction.C index d739cc4ac0..b42c04528c 100644 --- a/src/LyXAction.C +++ b/src/LyXAction.C @@ -286,8 +286,8 @@ void LyXAction::init() { LFUN_GREEK_TOGGLE, "math-greek-toggle", "", Noop }, { LFUN_INSERT_MATH, "math-insert", N_("Insert math symbol"), Noop }, - { LFUN_SUBSCRIPT, "math-subscript", "", Noop }, - { LFUN_SUPERSCRIPT, "math-superscript", "", Noop }, + { LFUN_SUBSCRIPT, "math-subscript", N_("Add subscript"), Noop }, + { LFUN_SUPERSCRIPT, "math-superscript", N_("Add superscript"), Noop }, { LFUN_MATH_LIMITS, "math-limits", "", Noop }, { LFUN_MATH_MACRO, "math-macro", "", Noop }, { LFUN_MATH_MUTATE, "math-mutate", "", Noop }, diff --git a/src/MenuBackend.C b/src/MenuBackend.C index 055924da53..f3f7fff25a 100644 --- a/src/MenuBackend.C +++ b/src/MenuBackend.C @@ -697,6 +697,8 @@ Menu const & MenuBackend::getMenu(string const & name) const { const_iterator cit = find_if(begin(), end(), lyx::compare_memfun(&Menu::name, name)); + if (cit == end()) + lyxerr << "No submenu named " << name << endl; lyx::Assert(cit != end()); return (*cit); } diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 6a22b5531e..17ef4856dd 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -183,6 +183,7 @@ void LyXFunc::processKeySym(LyXKeySymPtr keysym, << keysym->getSymbolName() << endl; } + // Do nothing if we have nothing (JMarc) if (!keysym->isOK()) { lyxerr[Debug::KEY] << "Empty kbd action (probably composing)" @@ -199,9 +200,7 @@ void LyXFunc::processKeySym(LyXKeySymPtr keysym, cancel_meta_seq.reset(); int action = cancel_meta_seq.addkey(keysym, state); - if (lyxerr.debugging(Debug::KEY)) { - lyxerr << "action first set to [" << action << "]" << endl; - } + lyxerr[Debug::KEY] << "action first set to [" << action << "]" << endl; // When not cancel or meta-fake, do the normal lookup. // Note how the meta_fake Mod1 bit is OR-ed in and reset afterwards. @@ -1379,19 +1378,19 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose) lyxrc.cursor_follows_scrollbar = !lyxrc.cursor_follows_scrollbar; break; - case LFUN_KMAP_OFF: // keymap off + case LFUN_KMAP_OFF: owner->getIntl().KeyMapOn(false); break; - case LFUN_KMAP_PRIM: // primary keymap + case LFUN_KMAP_PRIM: owner->getIntl().KeyMapPrim(); break; - case LFUN_KMAP_SEC: // secondary keymap + case LFUN_KMAP_SEC: owner->getIntl().KeyMapSec(); break; - case LFUN_KMAP_TOGGLE: // toggle keymap + case LFUN_KMAP_TOGGLE: owner->getIntl().ToggleKeyMap(); break; diff --git a/src/undo_funcs.C b/src/undo_funcs.C index 41578aa46e..e72a5c1d95 100644 --- a/src/undo_funcs.C +++ b/src/undo_funcs.C @@ -31,7 +31,7 @@ using boost::shared_ptr; /// the flag used by FinishUndo(); bool undo_finished; -/// FIXME +/// whether actions are not added to the undo stacks bool undo_frozen; namespace { -- 2.39.2