-rw-r--r-- | core/pim/today/today.cpp | 35 | ||||
-rw-r--r-- | core/pim/today/today.h | 2 |
2 files changed, 6 insertions, 31 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 1f758f2..2f6907d 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp @@ -2,5 +2,5 @@ * today.cpp * - * copyright : (c) 2002 by Maximilian Reiß + * copyright : (c) 2002,2003 by Maximilian Reiß * email : harlekin@handhelds.org * @@ -71,5 +71,5 @@ Today::Today( QWidget* parent, const char* name, WFlags fl ) connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); m_refreshTimer->start( 15000 ); - init(); + //init(); loadPlugins(); showMaximized(); @@ -123,5 +123,4 @@ void Today::setOwnerField( QString &message ) { } - /** * Init stuff needed for today. Reads the config file. @@ -139,10 +138,7 @@ void Today::init() { setRefreshTimer( cfg.readNumEntry( "checkinterval", 15000 ) ); - - // qDebug(" refresh "); // set the date in top label QDate date = QDate::currentDate(); QString time = ( tr( date.toString() ) ); - DateLabel->setText( QString( "<font color=#FFFFFF>" + time + "</font>" ) ); @@ -155,5 +151,4 @@ void Today::init() { } - /** * Load the plugins @@ -161,14 +156,8 @@ void Today::init() { void Today::loadPlugins() { - // extra list for plugins that exclude themself from periodic refresh - QMap<QString, TodayPlugin> pluginListRefreshExclude; - + init(); QValueList<TodayPlugin>::Iterator tit; if ( !pluginList.isEmpty() ) { for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) { - if ( (*tit).excludeRefresh ) { - pluginListRefreshExclude.insert( (*tit).name , (*tit) ); - qDebug( "Found a plugin that does not want refresh feature" ); - } else { (*tit).guiBox->hide(); (*tit).guiBox->reparent( 0, QPoint( 0, 0 ) ); @@ -177,5 +166,4 @@ void Today::loadPlugins() { delete (*tit).library; } - } pluginList.clear(); } @@ -190,5 +178,4 @@ void Today::loadPlugins() { for ( it = list.begin(); it != list.end(); ++it ) { -// TodayPluginInterface *iface = 0; QInterfacePtr<TodayPluginInterface> iface; QLibrary *lib = new QLibrary( path + "/" + *it ); @@ -199,16 +186,4 @@ void Today::loadPlugins() { qDebug( QString(*it) ); - // If plugin is exludes from refresh, get it in the list again here. - - if ( pluginListRefreshExclude.contains( (*it) ) ) { - // if its not in allApplets list, add it to a layout - if ( !m_allApplets.contains( pluginListRefreshExclude[(*it)].name ) ) { - layout->addWidget( pluginListRefreshExclude[(*it)].guiBox ); - pluginList.append( pluginListRefreshExclude[(*it)] ); - } else { - tempList.insert( pluginListRefreshExclude[(*it)].name, pluginListRefreshExclude[(*it)] ); - } - } else { - TodayPlugin plugin; plugin.library = lib; @@ -240,5 +215,5 @@ void Today::loadPlugins() { QWidget *plugWidget = plugin.guiPart->widget( sv->viewport() ); // not sure if that is good .-) - sv->setMinimumHeight( 10 ); + sv->setMinimumHeight( 12 ); sv->setResizePolicy( QScrollView::AutoOneFit ); sv->setHScrollBarMode( QScrollView::AlwaysOff ); @@ -264,5 +239,4 @@ void Today::loadPlugins() { pluginList.append( plugin ); } - } } else { qDebug( "could not recognize %s", QString( path + "/" + *it ).latin1() ); @@ -371,4 +345,5 @@ void Today::startConfig() { */ void Today::refresh() { + init(); diff --git a/core/pim/today/today.h b/core/pim/today/today.h index 35b7ee3..24f5611 100644 --- a/core/pim/today/today.h +++ b/core/pim/today/today.h @@ -2,5 +2,5 @@ * today.h * - * copyright : (c) 2002 by Maximilian Reiß + * copyright : (c) 2002,2003 by Maximilian Reiß * email : harlekin@handhelds.org * |