summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-05-30 09:22:49 (UTC)
committer harlekin <harlekin>2003-05-30 09:22:49 (UTC)
commit22fff7051b1960f4ae751621c8f52e0fc732033d (patch) (unidiff)
tree824f8f9ae3bfaf5a2c84f7f6703475d8380bff7a
parent66e2cf16ce2eb331cc88f8591fa07503a8ca82ce (diff)
downloadopie-22fff7051b1960f4ae751621c8f52e0fc732033d.zip
opie-22fff7051b1960f4ae751621c8f52e0fc732033d.tar.gz
opie-22fff7051b1960f4ae751621c8f52e0fc732033d.tar.bz2
small change so today works again on retail rom
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/today.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 83d8601..f213943 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -183,33 +183,39 @@ void Today::loadPlugins() {
183 183
184 for ( it = list.begin(); it != list.end(); ++it ) { 184 for ( it = list.begin(); it != list.end(); ++it ) {
185 QInterfacePtr<TodayPluginInterface> iface; 185 QInterfacePtr<TodayPluginInterface> iface;
186 QLibrary *lib = new QLibrary( path + "/" + *it ); 186 QLibrary *lib = new QLibrary( path + "/" + *it );
187 187
188 qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); 188 qDebug( "querying: %s", QString( path + "/" + *it ).latin1() );
189 if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { 189 if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) {
190 qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() ); 190 qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() );
191 qDebug( QString(*it) ); 191 qDebug( QString(*it) );
192 192
193 TodayPlugin plugin; 193 TodayPlugin plugin;
194 plugin.library = lib; 194 plugin.library = lib;
195 plugin.iface = iface; 195 plugin.iface = iface;
196 plugin.name = QString(*it); 196 plugin.name = QString(*it);
197 197
198 QString type = (*it).left( (*it).find(".") ); 198 QString type = (*it).left( (*it).find(".") );
199 QStringList langs = Global::languageList(); 199
200 // grr, sharp rom does not know Global::languageList();
201 // QStringList langs = Global::languageList();
202 QString tfn = QPEApplication::qpeDir() + "/i18n/";
203 QDir langDir = tfn;
204 QStringList langs = langDir.entryList("*", QDir::Dirs );
205
200 for (QStringList::ConstIterator lit = langs.begin(); lit!=langs.end(); ++lit) { 206 for (QStringList::ConstIterator lit = langs.begin(); lit!=langs.end(); ++lit) {
201 QString lang = *lit; 207 QString lang = *lit;
202 qDebug( "Languages: " + lang ); 208 qDebug( "Languages: " + lang );
203 QTranslator * trans = new QTranslator( qApp ); 209 QTranslator * trans = new QTranslator( qApp );
204 QString tfn = QPEApplication::qpeDir()+"/i18n/" + lang + "/" + type + ".qm"; 210 QString tfn = QPEApplication::qpeDir()+"/i18n/" + lang + "/" + type + ".qm";
205 if ( trans->load( tfn ) ) { 211 if ( trans->load( tfn ) ) {
206 qApp->installTranslator( trans ); 212 qApp->installTranslator( trans );
207 } else { 213 } else {
208 delete trans; 214 delete trans;
209 } 215 }
210 } 216 }
211 217
212 // find out if plugins should be shown 218 // find out if plugins should be shown
213 if ( m_excludeApplets.grep( *it ).isEmpty() ) { 219 if ( m_excludeApplets.grep( *it ).isEmpty() ) {
214 plugin.active = true; 220 plugin.active = true;
215 } else { 221 } else {