* src/Thesaurus.C:

- check for aiksaurus errors (fix bug 2691)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@18700 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2007-06-07 17:31:08 +00:00
parent 8140cf0e4f
commit e0e66da204
3 changed files with 24 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2007-06-07 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* Thesaurus.C: check for aiksaurus errors (fix crash, bug 2691).
2007-05-29 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* BufferView.C (mouseSetCursor): do not forget to set boundary

View File

@ -12,12 +12,19 @@
#include "Thesaurus.h"
#include "gettext.h"
#include "support/lstrings.h"
#include "frontends/Alert.h"
#include <algorithm>
#include <string>
using std::string;
#ifdef HAVE_LIBAIKSAURUS
using lyx::support::bformat;
using std::sort;
@ -37,6 +44,17 @@ Thesaurus::Meanings Thesaurus::lookup(string const & text)
{
Meanings meanings;
string error = string(aik_->error());
if (!error.empty()) {
static bool sent_error = false;
if (!sent_error) {
Alert::error(_("Thesaurus failure"),
bformat(_("Aiksaurus returned the following error:\n\n%1$s."),
error));
sent_error = true;
}
return meanings;
}
if (!aik_->find(text.c_str()))
return meanings;

View File

@ -52,6 +52,8 @@ What's new
- Fix crash when undoing ctrl-<minus> in mathed (bug 3590).
- Fix crash if the thesaurus fails on startup (bug 2691).
- Handle undo correctly when inserting a plain text file (bug 3204).
- Fix misplaced cursor when clicking at the end of a line (bug 3310).