Diffstat (limited to 'core/pim/today/todayconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/today/todayconfig.cpp | 32 |
1 files changed, 16 insertions, 16 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 | |||
@@ -96,12 +96,11 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal ) | |||
96 | connect ( m_appletListView , SIGNAL( clicked(QListViewItem*) ), this, SLOT( appletChanged() ) ); | 96 | connect ( m_appletListView , SIGNAL( clicked(QListViewItem*) ), this, SLOT( appletChanged() ) ); |
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; |
107 | m_pluginLoader = plugLoader; | 106 | m_pluginLoader = plugLoader; |
@@ -113,17 +112,19 @@ void TodayConfig::setUpPlugins( OPluginManager * plugManager, OPluginLoader *plu | |||
113 | lst.prepend((*it)); | 112 | lst.prepend((*it)); |
114 | 113 | ||
115 | TodayPluginInterface* iface = m_pluginLoader->load<TodayPluginInterface>( *it, IID_TodayPluginInterface ); | 114 | TodayPluginInterface* iface = m_pluginLoader->load<TodayPluginInterface>( *it, IID_TodayPluginInterface ); |
115 | TodayConfigWidget *widget = iface->guiPart()->configWidget( TabWidget3 ); | ||
116 | 116 | ||
117 | if ( iface->guiPart()->configWidget(this) != 0l ) { | 117 | if (!widget ) |
118 | TodayConfigWidget* widget = iface->guiPart()->configWidget( TabWidget3 ); | 118 | continue; |
119 | TabWidget3->addTab( widget, iface->guiPart()->pixmapNameConfig() | 119 | |
120 | , iface->guiPart()->appName() ); | 120 | m_configMap.insert( iface, widget ); |
121 | } | 121 | TabWidget3->addTab( widget, iface->guiPart()->pixmapNameConfig() |
122 | , iface->guiPart()->appName() ); | ||
122 | } | 123 | } |
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 ); |
129 | } | 130 | } |
@@ -174,10 +175,10 @@ void TodayConfig::writeConfig() { | |||
174 | int position = m_appletListView->childCount(); | 175 | int position = m_appletListView->childCount(); |
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 ) { |
183 | (*it).setPosition(position--); | 184 | (*it).setPosition(position--); |
@@ -203,12 +204,11 @@ void TodayConfig::writeConfig() { | |||
203 | // set autostart settings | 204 | // set autostart settings |
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 | } |
214 | 214 | ||