-rw-r--r-- | core/pim/today/today.cpp | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index dd8d59b..d4a0ae6 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp | |||
@@ -192,12 +192,7 @@ void Today::loadPlugins() { | |||
192 | } | 192 | } |
193 | 193 | ||
194 | QString path = QPEApplication::qpeDir() + "/plugins/today"; | 194 | QString path = QPEApplication::qpeDir() + "/plugins/today"; |
195 | qWarning("Searching for Plugins in: %s", path.latin1()); | ||
196 | #ifdef Q_OS_MACX | ||
197 | QDir dir( path, "lib*.dylib" ); | ||
198 | #else | ||
199 | QDir dir( path, "lib*.so" ); | 195 | QDir dir( path, "lib*.so" ); |
200 | #endif | ||
201 | 196 | ||
202 | QStringList list = dir.entryList(); | 197 | QStringList list = dir.entryList(); |
203 | QStringList::Iterator it; | 198 | QStringList::Iterator it; |
@@ -220,14 +215,11 @@ void Today::loadPlugins() { | |||
220 | 215 | ||
221 | QString type = (*it).left( (*it).find(".") ); | 216 | QString type = (*it).left( (*it).find(".") ); |
222 | 217 | ||
223 | // grr, sharp rom does not know Global::languageList(); | 218 | QString lang; |
224 | // QStringList langs = Global::languageList(); | 219 | Config config("locale"); |
225 | QString tfn = QPEApplication::qpeDir() + "/i18n/"; | 220 | config.setGroup("Language"); |
226 | QDir langDir = tfn; | 221 | lang = config.readEntry( "Language", "en" ); |
227 | QStringList langs = langDir.entryList("*", QDir::Dirs ); | ||
228 | 222 | ||
229 | for (QStringList::ConstIterator lit = langs.begin(); lit!=langs.end(); ++lit) { | ||
230 | QString lang = *lit; | ||
231 | qDebug( "Languages: " + lang ); | 223 | qDebug( "Languages: " + lang ); |
232 | QTranslator * trans = new QTranslator( qApp ); | 224 | QTranslator * trans = new QTranslator( qApp ); |
233 | QString tfn = QPEApplication::qpeDir()+"/i18n/" + lang + "/" + type + ".qm"; | 225 | QString tfn = QPEApplication::qpeDir()+"/i18n/" + lang + "/" + type + ".qm"; |
@@ -236,7 +228,6 @@ void Today::loadPlugins() { | |||
236 | } else { | 228 | } else { |
237 | delete trans; | 229 | delete trans; |
238 | } | 230 | } |
239 | } | ||
240 | 231 | ||
241 | 232 | ||
242 | // find out if plugins should be shown | 233 | // find out if plugins should be shown |