a bunch of small patches from John and Juergen

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3224 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2001-12-17 12:22:39 +00:00
parent 9ee57f7245
commit d17bd7cce9
6 changed files with 51 additions and 15 deletions

View File

@ -1,3 +1,7 @@
2001-12-16 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* ui/default.ui: fix shortcut clash in the insert menu.
2001-12-15 Dekel Tsur <dekelts@tau.ac.il>
* symbols: Add glyph for \colon for the symbol font.

View File

@ -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

View File

@ -1,3 +1,18 @@
2001-12-15 John Levon <moz@compsoc.man.ac.uk>
* 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 <moz@compsoc.man.ac.uk>
* minibuffer.C: add a space on dropdown completion
2001-12-14 John Levon <moz@compsoc.man.ac.uk>
* text.C: fix line above/below drawing in insets
2001-12-15 Lars Gullik Bjønnes <larsbj@birdstep.com>
* lyxlength.C (LyXLength): Initialize private variables.

View File

@ -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;
}

View File

@ -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 + " ");
}
}

View File

@ -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<int>(inset_owner ? p.x : 0);
p.pain->line(xp, p.yo + y_top, w, p.yo + y_top,
int const xp = static_cast<int>(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<int>(inset_owner ? p.x : 0);
int const xp = static_cast<int>(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;