-rw-r--r-- | core/pim/today/today.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 3eda5c0..01ef02d 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp @@ -153,5 +153,5 @@ void Today::loadPlugins() { if ( (*tit).excludeRefresh ) { pluginListRefreshExclude.insert( (*tit).name , (*tit) ); - qDebug( "Found an plug that does not want refresh feature" ); + qDebug( "Found an plugin that does not want refresh feature" ); } else { (*tit).library->unload(); @@ -183,6 +183,14 @@ void Today::loadPlugins() { if ( pluginListRefreshExclude.contains( (*it) ) ) { - tempList.insert( pluginListRefreshExclude[(*it)].name, pluginListRefreshExclude[(*it)] ); - qDebug( "TEST2 " + pluginListRefreshExclude[(*it)].name ); + + // if its not in allApplets list, add it to a layout + if ( !m_allApplets.contains( pluginListRefreshExclude[(*it)].name ) ) { + qDebug( "NUGASDA" ); + layout->addWidget( pluginListRefreshExclude[(*it)].guiBox ); + pluginList.append( pluginListRefreshExclude[(*it)] ); + } else { + tempList.insert( pluginListRefreshExclude[(*it)].name, pluginListRefreshExclude[(*it)] ); + qDebug( "TEST2 " + pluginListRefreshExclude[(*it)].name ); + } } else { @@ -198,4 +206,5 @@ void Today::loadPlugins() { plugin.active = false; } + plugin.guiPart = plugin.iface->guiPart(); plugin.excludeRefresh = plugin.guiPart->excludeFromRefresh(); @@ -233,4 +242,10 @@ void Today::loadPlugins() { pluginList.append( plugin ); } + + // if plugin is not yet in the list, add it to the layout too + if ( !m_allApplets.contains( plugin.name ) ) { + layout->addWidget( plugin.guiBox ); + pluginList.append( plugin ); + } } } else { |