author | zecke <zecke> | 2004-09-12 23:56:54 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-12 23:56:54 (UTC) |
commit | 848be27ce441430b6946221cd288ff9d6297096c (patch) (side-by-side diff) | |
tree | 1ff3d0bad98bee9d5dd0ff70f3eedd5484e25ab6 /core/pim/today/todayconfig.cpp | |
parent | df292cd5dbd8f3c11efa06db1a2ed565a6efa9b8 (diff) | |
download | opie-848be27ce441430b6946221cd288ff9d6297096c.zip opie-848be27ce441430b6946221cd288ff9d6297096c.tar.gz opie-848be27ce441430b6946221cd288ff9d6297096c.tar.bz2 |
-Refactor loading of the Plugin Widgets' to be only contained
in one place.
-Reload the Plugins after configuration to reflect the changes
immediately
Diffstat (limited to 'core/pim/today/todayconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/today/todayconfig.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp index dacce8b..864c708 100644 --- a/core/pim/today/todayconfig.cpp +++ b/core/pim/today/todayconfig.cpp @@ -90,13 +90,12 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal ) m_guiMisc = new TodayConfigMiscBase( tab_3 ); tab3Layout->addWidget( m_guiMisc ); TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); - connect ( m_appletListView , SIGNAL( clicked(QListViewItem*) ), this, SLOT( appletChanged() ) ); previousItem = 0l; readConfig(); } void TodayConfig::setUpPlugins( OPluginManager * plugManager, OPluginLoader *plugLoader ) { @@ -178,18 +177,23 @@ void TodayConfig::writeConfig() { OPluginItem::List lst = m_pluginLoader->allAvailable( true ); // this makes sure the names get saved in the order selected for ( ; list_it.current(); ++list_it ) { for ( OPluginItem::List::Iterator it = lst.begin(); it != lst.end(); ++it ) { if ( QString::compare( (*it).name() , list_it.current()->text(0) ) == 0 ) { + qWarning( "Enabling %d and make it %d", position-1, + ((QCheckListItem*)list_it.current())->isOn() ); (*it).setPosition(position--); m_pluginManager->setEnabled( (*it),((QCheckListItem*)list_it.current())->isOn() ); } } } + /* + * save and get the changes back + */ m_pluginManager->save(); cfg.setGroup( "Autostart" ); m_autoStart = m_guiMisc->CheckBoxAuto->isChecked(); cfg.writeEntry( "autostart", m_autoStart ); m_autoStartTimer = m_guiMisc->SpinBoxTime->value(); @@ -206,12 +210,13 @@ void TodayConfig::writeConfig() { OPluginItem::List managedLst = m_pluginManager->managedPlugins(); for ( OPluginItem::List::Iterator it = managedLst.begin(); it != managedLst.end(); ++it ) { TodayPluginInterface* iface = m_pluginLoader->load<TodayPluginInterface>( *it, IID_TodayPluginInterface ); if ( m_configMap.contains( iface ) ) m_configMap[iface]->writeConfig(); + } } void TodayConfig::moveSelectedUp() { QListViewItem *item = m_appletListView->selectedItem(); |