improvie two spellchecker error dialogs

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10388 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2005-08-04 12:51:43 +00:00
parent 0424e3b04a
commit b039292c74
2 changed files with 15 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2005-08-04 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* ControlSpellchecker.C (checkAlive, initialiseParams): try to
give clearer error mesages.
2005-08-03 Jean-Marc Lasgouttes <lasgouttes@lyx.org> 2005-08-03 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* ControlTexinfo.C: compilation fix. * ControlTexinfo.C: compilation fix.

View File

@ -108,8 +108,9 @@ bool ControlSpellchecker::initialiseParams(std::string const &)
bool const success = speller_->error().empty(); bool const success = speller_->error().empty();
if (!success) { if (!success) {
Alert::error(_("The spell-checker could not be started"), Alert::error(_("Spell-checker error"),
speller_->error()); _("The spell-checker could not be started")
+ '\n' + speller_->error());
speller_.reset(0); speller_.reset(0);
} }
@ -259,14 +260,17 @@ bool ControlSpellchecker::checkAlive()
if (speller_->alive() && speller_->error().empty()) if (speller_->alive() && speller_->error().empty())
return true; return true;
string message = speller_->error(); string message;
if (message.empty()) if (speller_->error().empty())
message = _("The spell-checker has died for some reason.\n" message = _("The spell-checker has died for some reason.\n"
"Maybe it has been killed."); "Maybe it has been killed.");
else
message = _("The spell-checker has failed.")
+ '\n' + speller_->error();
dialog().CancelButton(); dialog().CancelButton();
Alert::error(_("The spell-checker has failed"), message); Alert::error(_("Spell-checker error"), message);
return false; return false;
} }