diff --git a/lib/ChangeLog b/lib/ChangeLog index 082688f81a..ae50f2922a 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2001-12-16 Jürgen Spitzmüller + + * ui/default.ui: fix shortcut clash in the insert menu. + 2001-12-15 Dekel Tsur * symbols: Add glyph for \colon for the symbol font. diff --git a/lib/ui/default.ui b/lib/ui/default.ui index 03aa55b0a0..f5ef994a35 100644 --- a/lib/ui/default.ui +++ b/lib/ui/default.ui @@ -1,4 +1,4 @@ -# This is the default LyX user interface definition file. -*- text -*- +# This is the default LyX user interface definition file. -*- text -*- # The syntax should be straightforward enough. The menubar # "main_nobuffer" (if it exists) is used when there is no buffer open; # otherwise, the menubar "main" is used. @@ -100,7 +100,7 @@ Menuset Separator #Item "Read Only" "buffer-toggle-read-only" Item "Spellchecker...|S" "spellchecker" - Item "Thesaurus" "thesaurus-entry" + Item "Thesaurus..." "thesaurus-entry" Item "Check TeX|h" "buffer-chktex" Item "Remove All Error Boxes|E" "error-remove-all" Separator @@ -203,8 +203,8 @@ Menuset Item "Tabular Material...|b" "dialog-tabular-insert" Submenu "Floats|a" "insert_floats" Separator - Item "Include File|e" "buffer-child-insert" - Submenu "Insert File|t" "insert_file" + Item "Include File|d" "buffer-child-insert" + Submenu "Insert File|e" "insert_file" Item "External Material...|x" "external-insert" End diff --git a/src/ChangeLog b/src/ChangeLog index 41171be9ba..c9d72bd5c0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,18 @@ +2001-12-15 John Levon + + * lyxfunc.C: ignore space-only minibuffer dispatches. + Show the command name when it doesn't exist + + * minibuffer.C: don't add empty lines to the history + +2001-12-15 John Levon + + * minibuffer.C: add a space on dropdown completion + +2001-12-14 John Levon + + * text.C: fix line above/below drawing in insets + 2001-12-15 Lars Gullik Bjønnes * lyxlength.C (LyXLength): Initialize private variables. diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 8253912947..798f72fa54 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -739,8 +739,10 @@ func_status::value_type LyXFunc::getStatus(int ac, // temporary dispatch method void LyXFunc::miniDispatch(string const & s) { - if (!s.empty()) { - dispatch(s); + string s2(frontStrip(strip(s))); + + if (!s2.empty()) { + dispatch(s2); } } @@ -752,7 +754,16 @@ string const LyXFunc::dispatch(string const & s) string line = frontStrip(s); string const arg = strip(frontStrip(split(line, cmd, ' '))); - return dispatch(lyxaction.LookupFunc(cmd), arg); + int action = lyxaction.LookupFunc(cmd); + + if (action == LFUN_UNKNOWN_ACTION) { + string const msg = string(_("Unknown function (")) + + cmd + ")"; + owner->message(msg); + return string(); + } else { + return dispatch(action, arg); + } } @@ -782,6 +793,7 @@ string const LyXFunc::dispatch(int ac, argument = do_not_use_this_arg; // except here } + #ifdef NEW_DISPATCHER // We try do call the most specific dispatcher first: // 1. the lockinginset's dispatch @@ -1583,7 +1595,7 @@ exit_with_message: if (!shortcuts.empty()) { comname += ": " + shortcuts; - } else if (!argsadded) { + } else if (!argsadded && !argument.empty()) { comname += " " + argument; } diff --git a/src/minibuffer.C b/src/minibuffer.C index 0ea7b7e25c..7df08768eb 100644 --- a/src/minibuffer.C +++ b/src/minibuffer.C @@ -218,7 +218,9 @@ int MiniBuffer::peek_event(FL_OBJECT * ob, int event, int key) // Return the inputted string deactivate(); owner_->view()->focus(true); - history_->push_back(input); + if (!input.empty()) { + history_->push_back(input); + } stringReady.emit(input); # if 0 } @@ -384,8 +386,11 @@ void MiniBuffer::redraw() void MiniBuffer::set_complete_input(string const & str) { - if (!str.empty()) - set_input(str); + if (!str.empty()) { + // add a space so the user can type + // an argument immediately + set_input(str + " "); + } } diff --git a/src/text.C b/src/text.C index dfe9c260aa..2c626a6a22 100644 --- a/src/text.C +++ b/src/text.C @@ -3333,8 +3333,8 @@ void LyXText::paintFirstRow(DrawRowParams & p) y_top += asc; int const w = (inset_owner ? inset_owner->width(p.bv, font) : ww); - int const xp = static_cast(inset_owner ? p.x : 0); - p.pain->line(xp, p.yo + y_top, w, p.yo + y_top, + int const xp = static_cast(inset_owner ? p.xo : 0); + p.pain->line(xp, p.yo + y_top, xp + w, p.yo + y_top, LColor::topline, Painter::line_solid, Painter::line_thick); @@ -3493,9 +3493,9 @@ void LyXText::paintLastRow(DrawRowParams & p) y_bottom -= asc; int const w = (inset_owner ? inset_owner->width(p.bv, font) : ww); - int const xp = static_cast(inset_owner ? p.x : 0); + int const xp = static_cast(inset_owner ? p.xo : 0); int const y = p.yo + y_bottom; - p.pain->line(xp, y, w, y, LColor::topline, Painter::line_solid, + p.pain->line(xp, y, xp + w, y, LColor::topline, Painter::line_solid, Painter::line_thick); y_bottom -= asc;