From: Jürgen Vigna Date: Mon, 22 Oct 2001 21:17:06 +0000 (+0000) Subject: Fixed spellchecker problems. X-Git-Tag: 1.6.10~20453 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=609734fc4668e7900e9f2bcc74595500f151f030;p=features.git Fixed spellchecker problems. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2910 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index 3edc48f054..8e86c9a220 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-10-22 Juergen Vigna + + * 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 * buffer.C (insertStringAsLines): modify the font for inserting diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 88f072d55c..7a4c2f382a 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,9 @@ +2001-10-22 Juergen Vigna + + * 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 * ControlMinipage.[Ch] (getUnits): moved to helper_funcs. diff --git a/src/frontends/controllers/ControlSpellchecker.C b/src/frontends/controllers/ControlSpellchecker.C index e724c585b2..0bd1ce36e7 100644 --- a/src/frontends/controllers/ControlSpellchecker.C +++ b/src/frontends/controllers/ControlSpellchecker.C @@ -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; diff --git a/src/sp_pspell.h b/src/sp_pspell.h index 0833c8945e..7c682bbc64 100644 --- a/src/sp_pspell.h +++ b/src/sp_pspell.h @@ -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 diff --git a/src/sp_spell.C b/src/sp_spell.C index ce6323cfaa..bb301cadd5 100644 --- a/src/sp_spell.C +++ b/src/sp_spell.C @@ -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; } }