author | harlekin <harlekin> | 2003-12-05 11:20:37 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-12-05 11:20:37 (UTC) |
commit | 2b37759fc317b5efd9b371210b16117f7d346455 (patch) (unidiff) | |
tree | f99beb5ff1c886f9b41a2d3a34300f8f121cf738 /core/pim/today/today.cpp | |
parent | 1ef5137234e2b7cd0be2a220a86d848503196269 (diff) | |
download | opie-2b37759fc317b5efd9b371210b16117f7d346455.zip opie-2b37759fc317b5efd9b371210b16117f7d346455.tar.gz opie-2b37759fc317b5efd9b371210b16117f7d346455.tar.bz2 |
today in HEAD up to date
-rw-r--r-- | core/pim/today/today.cpp | 33 |
1 files changed, 12 insertions, 21 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 | |||
@@ -193,10 +193,5 @@ void Today::loadPlugins() { | |||
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(); |
@@ -221,20 +216,16 @@ void Today::loadPlugins() { | |||
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 ); | 222 | |
228 | 223 | qDebug( "Languages: " + lang ); | |
229 | for (QStringList::ConstIterator lit = langs.begin(); lit!=langs.end(); ++lit) { | 224 | QTranslator * trans = new QTranslator( qApp ); |
230 | QString lang = *lit; | 225 | QString tfn = QPEApplication::qpeDir()+"/i18n/" + lang + "/" + type + ".qm"; |
231 | qDebug( "Languages: " + lang ); | 226 | if ( trans->load( tfn ) ) { |
232 | QTranslator * trans = new QTranslator( qApp ); | 227 | qApp->installTranslator( trans ); |
233 | QString tfn = QPEApplication::qpeDir()+"/i18n/" + lang + "/" + type + ".qm"; | 228 | } else { |
234 | if ( trans->load( tfn ) ) { | 229 | delete trans; |
235 | qApp->installTranslator( trans ); | ||
236 | } else { | ||
237 | delete trans; | ||
238 | } | ||
239 | } | 230 | } |
240 | 231 | ||