-rw-r--r-- | core/pim/today/config.in | 2 | ||||
-rw-r--r-- | core/pim/today/today.cpp | 22 |
2 files changed, 13 insertions, 11 deletions
diff --git a/core/pim/today/config.in b/core/pim/today/config.in index c4377e4..c663fc1 100644 --- a/core/pim/today/config.in +++ b/core/pim/today/config.in @@ -1,4 +1,4 @@ config TODAY boolean "opie-today (today gives an overview of appointments and todos)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI && LIBOPIE2PIM + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBOPIE2PIM diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index ebcd2dd..3ddb88d 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp @@ -13,16 +13,18 @@ * (at your option) any later version. * * * ***************************************************************************/ #define QTOPIA_INTERNAL_LANGLIST #include "today.h" +#include <opie2/odebug.h> + #include <qpe/config.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/resource.h> #include <qpe/qpeapplication.h> #include <qpe/contact.h> #include <qdir.h> #include <qtimer.h> @@ -183,49 +185,49 @@ void Today::loadPlugins() { (*tit).library->unload(); delete (*tit).library; } pluginList.clear(); } QString path = QPEApplication::qpeDir() + "/plugins/today"; #ifdef Q_OS_MACX - qWarning("Searching for Plugins in: %s", path.latin1()); + Opie::Core::owarn << "Searching for Plugins in: " << path << oendl; QDir dir( path, "lib*.dylib" ); #else QDir dir( path, "lib*.so" ); #endif QStringList list = dir.entryList(); QStringList::Iterator it; // QMap<QString, TodayPlugin> tempList; for ( it = list.begin(); it != list.end(); ++it ) { QInterfacePtr<TodayPluginInterface> iface; QLibrary *lib = new QLibrary( path + "/" + *it ); - qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); + Opie::Core::odebug << "querying: " << path + "/" + *it << oendl; if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { - qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() ); - qDebug( QString(*it) ); + Opie::Core::odebug << "accepted: " << path + "/" + *it << oendl; + Opie::Core::odebug << *it << oendl; TodayPlugin plugin; plugin.library = lib; plugin.iface = iface; plugin.name = QString(*it); QString type = (*it).left( (*it).find(".") ); QString lang; Config config("locale"); config.setGroup("Language"); lang = config.readEntry( "Language", "en" ); - qDebug( "Languages: " + lang ); + Opie::Core::odebug << "Languages: " << lang << oendl; QTranslator * trans = new QTranslator( qApp ); QString tfn = QPEApplication::qpeDir()+"/i18n/" + lang + "/" + type + ".qm"; if ( trans->load( tfn ) ) { qApp->installTranslator( trans ); } else { delete trans; } @@ -266,17 +268,17 @@ void Today::loadPlugins() { m_bblayout->addWidget( plugin.guiBox ); } // if plugin is not yet in the list, add it to the layout too else if ( !m_allApplets.contains( plugin.name ) ) { pluginList.append( plugin ); } } else { - qDebug( "could not recognize %s", QString( path + "/" + *it ).latin1() ); + Opie::Core::odebug << "could not recognize " << path + "/" + *it << oendl; delete lib; } } if ( !m_allApplets.isEmpty() ) { TodayPlugin tempPlugin; @@ -310,20 +312,20 @@ void Today::draw() { } uint count = 0; TodayPlugin plugin; for ( uint i = 0; i < pluginList.count(); i++ ) { plugin = pluginList[i]; if ( plugin.active ) { - // qDebug( plugin.name + " is ACTIVE " ); + //Opie::Core::odebug << plugin.name << " is ACTIVE " << oendl; plugin.guiBox->show(); } else { - // qDebug( plugin.name + " is INACTIVE" ); + //Opie::Core::odebug << plugin.name << " is INACTIVE " << oendl; plugin.guiBox->hide(); } count++; } if ( count == 0 ) { QLabel *noPluginsActive = new QLabel( this ); noPluginsActive->setText( tr( "No plugins activated" ) ); @@ -390,17 +392,17 @@ void Today::reinitialize() { m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); m_allApplets = cfg.readListEntry( "AllApplets", ',' ); /* reinitialize all plugins */ QValueList<TodayPlugin>::Iterator it; for ( it = pluginList.begin(); it != pluginList.end(); ++it ) { if ( !(*it).excludeRefresh ) { (*it).guiPart->reinitialize(); - qDebug( "reinit" ); + Opie::Core::odebug << "reinit" << oendl; } /* check if plugins is still to be shown */ if ( m_excludeApplets.grep( (*it).name ).isEmpty() ) { (*it).active = true; } else { (*it).active = false; } @@ -444,17 +446,17 @@ void Today::reinitialize() { * */ void Today::refresh() { QValueList<TodayPlugin>::Iterator it; for ( it = pluginList.begin(); it != pluginList.end(); ++it ) { if ( !(*it).excludeRefresh ) { (*it).guiPart->refresh(); - qDebug( "refresh" ); + Opie::Core::odebug << "refresh" << oendl; } } DateLabel->setText( QString( "<font color=#FFFFFF>" + TimeString::longDateString( QDate::currentDate() ) + "</font>" ) ); updateGeometry(); repaint(); } |