summaryrefslogtreecommitdiffstats
path: root/tdeui
diff options
context:
space:
mode:
Diffstat (limited to 'tdeui')
-rw-r--r--tdeui/ksconfig.cpp29
1 files changed, 17 insertions, 12 deletions
diff --git a/tdeui/ksconfig.cpp b/tdeui/ksconfig.cpp
index 234882939..6ae9e3d5f 100644
--- a/tdeui/ksconfig.cpp
+++ b/tdeui/ksconfig.cpp
@@ -444,20 +444,25 @@ void KSpellConfig::getAvailDictsIspell () {
dictcombo->insertItem( i18n("ISpell Default") );
// dictionary path
- TQFileInfo dir ("/usr/lib" KDELIBSUFF "/ispell");
- if (!dir.exists() || !dir.isDir())
- dir.setFile ("/usr/local/lib" KDELIBSUFF "/ispell");
- if (!dir.exists() || !dir.isDir())
- dir.setFile ("/usr/local/share/ispell");
- if (!dir.exists() || !dir.isDir())
- dir.setFile ("/usr/share/ispell");
- if (!dir.exists() || !dir.isDir())
- dir.setFile ("/usr/pkg/lib");
+ TQFileInfo dir;
+ TQStringList dirs;
+ dirs
+ << "/usr/" SYSTEM_LIBDIR "/ispell"
+ << "/usr/lib/ispell"
+ << "/usr/local/" SYSTEM_LIBDIR "/ispell"
+ << "/usr/local/lib/ispell"
+ << "/usr/local/share/ispell"
+ << "/usr/share/ispell"
+ << "/usr/pkg/lib";
+ for (TQStringList::ConstIterator it=dirs.begin(); it != dirs.end(); ++it) {
+ dir.setFile(*it);
+ if (dir.exists() && dir.isDir()) {
+ break;
+ }
+ }
/* TODO get them all instead of just one of them.
* If /usr/local/lib exists, it skips the rest
- if (!dir.exists() || !dir.isDir())
- dir.setFile ("/usr/local/lib");
- */
+ */
if (!dir.exists() || !dir.isDir()) return;
kdDebug(750) << "KSpellConfig::getAvailDictsIspell "