Diffstat (limited to 'core/pim/today/todayconfig.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/today/todayconfig.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp index c9823d4..dacce8b 100644 --- a/core/pim/today/todayconfig.cpp +++ b/core/pim/today/todayconfig.cpp | |||
@@ -97,10 +97,9 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal ) | |||
97 | previousItem = 0l; | 97 | previousItem = 0l; |
98 | readConfig(); | 98 | readConfig(); |
99 | QPEApplication::showDialog( this ); | ||
100 | } | 99 | } |
101 | 100 | ||
102 | 101 | ||
103 | void TodayConfig::setUpPlugins( OPluginManager * plugManager, OPluginLoader *plugLoader ) { | 102 | void TodayConfig::setUpPlugins( OPluginManager * plugManager, OPluginLoader *plugLoader ) { |
104 | 103 | m_configMap.clear(); | |
105 | 104 | ||
106 | m_pluginManager = plugManager; | 105 | m_pluginManager = plugManager; |
@@ -114,15 +113,17 @@ void TodayConfig::setUpPlugins( OPluginManager * plugManager, OPluginLoader *plu | |||
114 | 113 | ||
115 | TodayPluginInterface* iface = m_pluginLoader->load<TodayPluginInterface>( *it, IID_TodayPluginInterface ); | 114 | TodayPluginInterface* iface = m_pluginLoader->load<TodayPluginInterface>( *it, IID_TodayPluginInterface ); |
116 | |||
117 | if ( iface->guiPart()->configWidget(this) != 0l ) { | ||
118 | TodayConfigWidget* widget = iface->guiPart()->configWidget( TabWidget3 ); | 115 | TodayConfigWidget* widget = iface->guiPart()->configWidget( TabWidget3 ); |
116 | |||
117 | if (!widget ) | ||
118 | continue; | ||
119 | |||
120 | m_configMap.insert( iface, widget ); | ||
119 | TabWidget3->addTab( widget, iface->guiPart()->pixmapNameConfig() | 121 | TabWidget3->addTab( widget, iface->guiPart()->pixmapNameConfig() |
120 | , iface->guiPart()->appName() ); | 122 | , iface->guiPart()->appName() ); |
121 | } | 123 | } |
122 | } | ||
123 | 124 | ||
124 | for ( OPluginItem::List::Iterator it = lst.begin(); it != lst.end(); ++it ) { | 125 | for ( OPluginItem::List::Iterator it = lst.begin(); it != lst.end(); ++it ) |
125 | pluginManagement( (*it) ); | 126 | pluginManagement( (*it) ); |
126 | } | 127 | |
127 | 128 | ||
128 | TabWidget3->setCurrentTab( tab_2 ); | 129 | TabWidget3->setCurrentTab( tab_2 ); |
@@ -175,8 +176,8 @@ void TodayConfig::writeConfig() { | |||
175 | 176 | ||
176 | QListViewItemIterator list_it( m_appletListView ); | 177 | QListViewItemIterator list_it( m_appletListView ); |
177 | // | 178 | OPluginItem::List lst = m_pluginLoader->allAvailable( true ); |
179 | |||
178 | // this makes sure the names get saved in the order selected | 180 | // this makes sure the names get saved in the order selected |
179 | for ( ; list_it.current(); ++list_it ) { | 181 | for ( ; list_it.current(); ++list_it ) { |
180 | OPluginItem::List lst = m_pluginLoader->allAvailable( true ); | ||
181 | for ( OPluginItem::List::Iterator it = lst.begin(); it != lst.end(); ++it ) { | 182 | for ( OPluginItem::List::Iterator it = lst.begin(); it != lst.end(); ++it ) { |
182 | if ( QString::compare( (*it).name() , list_it.current()->text(0) ) == 0 ) { | 183 | if ( QString::compare( (*it).name() , list_it.current()->text(0) ) == 0 ) { |
@@ -204,10 +205,9 @@ void TodayConfig::writeConfig() { | |||
204 | setAutoStart(); | 205 | setAutoStart(); |
205 | 206 | ||
206 | OPluginItem::List lst = m_pluginManager->managedPlugins(); | 207 | OPluginItem::List managedLst = m_pluginManager->managedPlugins(); |
207 | for ( OPluginItem::List::Iterator it = lst.begin(); it != lst.end(); ++it ) { | 208 | for ( OPluginItem::List::Iterator it = managedLst.begin(); it != managedLst.end(); ++it ) { |
208 | TodayPluginInterface* iface = m_pluginLoader->load<TodayPluginInterface>( *it, IID_TodayPluginInterface ); | 209 | TodayPluginInterface* iface = m_pluginLoader->load<TodayPluginInterface>( *it, IID_TodayPluginInterface ); |
209 | if ( iface->guiPart()->configWidget(this) != 0l ) { | 210 | if ( m_configMap.contains( iface ) ) |
210 | iface->guiPart()->configWidget(this)->writeConfig(); | 211 | m_configMap[iface]->writeConfig(); |
211 | } | ||
212 | } | 212 | } |
213 | } | 213 | } |