Fixed spellchecker problems.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2910 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2001-10-22 21:17:06 +00:00
parent 40b2b89d4d
commit 609734fc46
5 changed files with 25 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2001-10-22 Juergen Vigna <jug@sad.it>
* sp_pspell.h (class PSpell): add alive function needed in the
controller to see if the spellchecker could be started.
2001-10-22 Juergen Vigna <jug@sad.it>
* buffer.C (insertStringAsLines): modify the font for inserting

View File

@ -1,3 +1,9 @@
2001-10-22 Juergen Vigna <jug@sad.it>
* ControlSpellchecker.C (clearParams): use the error_ message of the
speller_ if available when the spellchecker died.
(setParams): remove double error message display.
2001-10-15 Angus Leeming <a.leeming@ic.ac.uk>
* ControlMinipage.[Ch] (getUnits): moved to helper_funcs.

View File

@ -90,9 +90,11 @@ void ControlSpellchecker::setParams()
}
if (speller_->error() != 0) {
#if 0
message_ = speller_->error();
// show error message
view().partialUpdate(2);
#endif
clearParams();
return;
}
@ -215,9 +217,11 @@ void ControlSpellchecker::clearParams()
message_ = _("Spellchecking completed! ") + message_;
} else {
message_ = speller_->error();
speller_->cleanUp();
message_ = _("The spell checker has died for some reason.\n"
"Maybe it has been killed.");
if (message_.empty())
message_ = _("The spell checker has died for some reason.\n"
"Maybe it has been killed.");
// make sure that the dialog is not launched
emergency_exit_ = true;

View File

@ -23,7 +23,7 @@ class PSpell : public SpellBase
/// initialize spell checker
void initialize(BufferParams const & params, string const & lang);
bool alive() { return true; }
bool alive() { return alive_; }
/// clean up after error
void cleanUp();
@ -58,7 +58,8 @@ class PSpell : public SpellBase
spellStatus flag;
const char * error_;
bool alive_;
};
#endif

View File

@ -74,13 +74,15 @@ extern void sigchldchecker(pid_t pid, int * status);
PSpell::PSpell()
: sc(0), els(0), spell_error_object(0), flag(ISP_UNKNOWN)
: sc(0), els(0), spell_error_object(0), flag(ISP_UNKNOWN),
alive_(false)
{
}
PSpell::PSpell(BufferParams const & params, string const & lang)
: sc(0), els(0), spell_error_object(0), flag(ISP_UNKNOWN)
: sc(0), els(0), spell_error_object(0), flag(ISP_UNKNOWN),
alive_(false)
{
initialize(params, lang);
}
@ -106,6 +108,7 @@ void PSpell::initialize(BufferParams const &, string const & lang)
error_ = 0;
sc = to_pspell_manager(spell_error_object);
spell_error_object = 0;
alive_ = true;
}
}