|
a/src/qtgui/spell_w.cpp |
|
b/src/qtgui/spell_w.cpp |
1 |
#ifndef lint
|
1 |
#ifndef lint
|
2 |
static char rcsid[] = "@(#$Id: spell_w.cpp,v 1.4 2006-11-04 17:09:08 dockes Exp $ (C) 2005 J.F.Dockes";
|
2 |
static char rcsid[] = "@(#$Id: spell_w.cpp,v 1.5 2006-11-06 17:37:22 dockes Exp $ (C) 2005 J.F.Dockes";
|
3 |
#endif
|
3 |
#endif
|
4 |
/*
|
4 |
/*
|
5 |
* This program is free software; you can redistribute it and/or modify
|
5 |
* This program is free software; you can redistribute it and/or modify
|
6 |
* it under the terms of the GNU General Public License as published by
|
6 |
* it under the terms of the GNU General Public License as published by
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
|
... |
|
... |
94 |
break;
|
94 |
break;
|
95 |
#ifdef RCL_USE_ASPELL
|
95 |
#ifdef RCL_USE_ASPELL
|
96 |
case 2: {
|
96 |
case 2: {
|
97 |
LOGDEB(("SpellW::doExpand: aspelling\n"));
|
97 |
LOGDEB(("SpellW::doExpand: aspelling\n"));
|
98 |
if (!aspell) {
|
98 |
if (!aspell) {
|
|
|
99 |
QMessageBox::warning(0, "Recoll",
|
|
|
100 |
tr("Aspell init failed. "
|
|
|
101 |
"Aspell not installed?"));
|
99 |
LOGDEB(("SpellW::doExpand: aspell init error\n"));
|
102 |
LOGDEB(("SpellW::doExpand: aspell init error\n"));
|
100 |
return;
|
103 |
return;
|
101 |
}
|
104 |
}
|
102 |
if (!aspell->suggest(*rcldb, expr, suggs, reason)) {
|
105 |
if (!aspell->suggest(*rcldb, expr, suggs, reason)) {
|
|
|
106 |
QMessageBox::warning(0, "Recoll",
|
|
|
107 |
tr("Aspell expansion error. "));
|
103 |
LOGERR(("SpellW::doExpand:suggest failed: %s\n", reason.c_str()));
|
108 |
LOGERR(("SpellW::doExpand:suggest failed: %s\n", reason.c_str()));
|
104 |
return;
|
|
|
105 |
}
|
109 |
}
|
106 |
}
|
110 |
}
|
107 |
#endif
|
111 |
#endif
|
108 |
}
|
112 |
}
|
109 |
|
113 |
|
|
... |
|
... |
129 |
}
|
133 |
}
|
130 |
}
|
134 |
}
|
131 |
|
135 |
|
132 |
void SpellW::textDoubleClicked(int para, int)
|
136 |
void SpellW::textDoubleClicked(int para, int)
|
133 |
{
|
137 |
{
|
134 |
suggsTE->setSelection(para, 0, para+1, 0);
|
138 |
suggsTE->setSelection(para, 0, para, 1000);
|
135 |
if (suggsTE->hasSelectedText())
|
139 |
if (suggsTE->hasSelectedText())
|
136 |
emit(wordSelect(suggsTE->selectedText()));
|
140 |
emit(wordSelect(suggsTE->selectedText()));
|
137 |
}
|
141 |
}
|