summaryrefslogtreecommitdiff
path: root/core/pim/today/today.cpp
Unidiff
Diffstat (limited to 'core/pim/today/today.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/today.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index d0cdd18..4ec690c 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -251,97 +251,97 @@ void Today::loadPlugins() {
251 layout->addWidget( plugin.guiBox ); 251 layout->addWidget( plugin.guiBox );
252 pluginList.append( plugin ); 252 pluginList.append( plugin );
253 } 253 }
254 254
255 // if plugin is not yet in the list, add it to the layout too 255 // if plugin is not yet in the list, add it to the layout too
256 else if ( !m_allApplets.contains( plugin.name ) ) { 256 else if ( !m_allApplets.contains( plugin.name ) ) {
257 layout->addWidget( plugin.guiBox ); 257 layout->addWidget( plugin.guiBox );
258 pluginList.append( plugin ); 258 pluginList.append( plugin );
259 } 259 }
260 } else { 260 } else {
261 qDebug( "could not recognize %s", QString( path + "/" + *it ).latin1() ); 261 qDebug( "could not recognize %s", QString( path + "/" + *it ).latin1() );
262 delete lib; 262 delete lib;
263 } 263 }
264 } 264 }
265 265
266 if ( !m_allApplets.isEmpty() ) { 266 if ( !m_allApplets.isEmpty() ) {
267 TodayPlugin tempPlugin; 267 TodayPlugin tempPlugin;
268 QStringList::Iterator stringit; 268 QStringList::Iterator stringit;
269 269
270 for( stringit = m_allApplets.begin(); stringit != m_allApplets.end(); ++stringit ) { 270 for( stringit = m_allApplets.begin(); stringit != m_allApplets.end(); ++stringit ) {
271 tempPlugin = ( tempList.find( *stringit ) ).data(); 271 tempPlugin = ( tempList.find( *stringit ) ).data();
272 if ( !( (tempPlugin.name).isEmpty() ) ) { 272 if ( !( (tempPlugin.name).isEmpty() ) ) {
273 layout->addWidget( tempPlugin.guiBox ); 273 layout->addWidget( tempPlugin.guiBox );
274 pluginList.append( tempPlugin ); 274 pluginList.append( tempPlugin );
275 } 275 }
276 } 276 }
277 } 277 }
278 draw(); 278 draw();
279} 279}
280 280
281 281
282/** 282/**
283 * Repaint method. Reread all fields. 283 * Repaint method. Reread all fields.
284 */ 284 */
285void Today::draw() { 285void Today::draw() {
286 286
287 if ( pluginList.count() == 0 ) { 287 if ( pluginList.count() == 0 ) {
288 QLabel *noPlugins = new QLabel( this ); 288 QLabel *noPlugins = new QLabel( this );
289 noPlugins->setText( tr( "No plugins found" ) ); 289 noPlugins->setText( tr( "No plugins found" ) );
290 layout->addWidget( noPlugins ); 290 layout->addWidget( noPlugins );
291 return; 291 return;
292 } 292 }
293 293
294 uint count = 0; 294 uint count = 0;
295 TodayPlugin plugin; 295 TodayPlugin plugin;
296 for ( uint i = 0; i < pluginList.count(); i++ ) { 296 for ( uint i = 0; i < pluginList.count(); i++ ) {
297 plugin = pluginList[i]; 297 plugin = pluginList[i];
298 298
299 if ( plugin.active ) { 299 if ( plugin.active ) {
300 // qDebug( plugin.name + " is ACTIVE " ); 300 // qDebug( plugin.name + " is ACTIVE " );
301 plugin.guiBox->show(); 301 plugin.guiBox->show();
302 } else { 302 } else {
303 // qDebug( plugin.name + " is INACTIVE" ); 303 // qDebug( plugin.name + " is INACTIVE" );
304 plugin.guiBox->hide(); 304 plugin.guiBox->hide();
305 } 305 }
306 count++; 306 count++;
307 } 307 }
308 308
309 if ( count == 0 ) { 309 if ( count == 0 ) {
310 QLabel *noPluginsActive = new QLabel( this ); 310 QLabel *noPluginsActive = new QLabel( this );
311 noPluginsActive->setText( tr( "No plugins activated" ) ); 311 noPluginsActive->setText( tr( "No plugins activated" ) );
312 layout->addWidget( noPluginsActive ); 312 layout->addWidget( noPluginsActive );
313 } 313 }
314 layout->addStretch(0); 314 layout->addStretch(0);
315} 315}
316 316
317 317
318/** 318/**
319 * The method for the configuration dialog. 319 * The method for the configuration dialog.
320 */ 320 */
321void Today::startConfig() { 321void Today::startConfig() {
322 322
323 // disconnect timer to prevent problems while being on config dialog 323 // disconnect timer to prevent problems while being on config dialog
324 disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); 324 disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) );
325 m_refreshTimer->stop( ); 325 m_refreshTimer->stop( );
326 326
327 TodayConfig conf( this, "dialog", true ); 327 TodayConfig conf( this, "dialog", true );
328 328
329 TodayPlugin plugin; 329 TodayPlugin plugin;
330 QList<TodayConfigWidget> configWidgetList; 330 QList<TodayConfigWidget> configWidgetList;
331 331
332 for ( int i = pluginList.count() - 1; i >= 0; i-- ) { 332 for ( int i = pluginList.count() - 1; i >= 0; i-- ) {
333 plugin = pluginList[i]; 333 plugin = pluginList[i];
334 334
335 // load the config widgets in the tabs 335 // load the config widgets in the tabs
336 if ( plugin.guiPart->configWidget( this ) != 0l ) { 336 if ( plugin.guiPart->configWidget( this ) != 0l ) {
337 TodayConfigWidget* widget = plugin.guiPart->configWidget( conf.TabWidget3 ); 337 TodayConfigWidget* widget = plugin.guiPart->configWidget( conf.TabWidget3 );
338 configWidgetList.append( widget ); 338 configWidgetList.append( widget );
339 conf.TabWidget3->addTab( widget, plugin.guiPart->pixmapNameConfig() 339 conf.TabWidget3->addTab( widget, plugin.guiPart->pixmapNameConfig()
340 , plugin.guiPart->appName() ); 340 , plugin.guiPart->appName() );
341 } 341 }
342 // set the order/activate tab 342 // set the order/activate tab
343 conf.pluginManagement( plugin.name, plugin.guiPart->pluginName(), 343 conf.pluginManagement( plugin.name, plugin.guiPart->pluginName(),
344 Resource::loadPixmap( plugin.guiPart->pixmapNameWidget() ) ); 344 Resource::loadPixmap( plugin.guiPart->pixmapNameWidget() ) );
345 } 345 }
346 346
347 if ( conf.exec() == QDialog::Accepted ) { 347 if ( conf.exec() == QDialog::Accepted ) {