void KCModule::save() { KConfigDialogManager *manager; for(manager = d->managers.first(); manager; manager = d->managers.next()) manager->updateSettings(); emit(changed(false)); }
void App::firstRunWizard() { ///show firstRunWizard FirstRunWizard wizard; setTopWidget( &wizard ); KConfigDialogManager* config = new KConfigDialogManager(&wizard, AmarokConfig::self(), "wizardconfig"); config->updateWidgets(); // connect(config, SIGNAL(settingsChanged()), SLOT(updateSettings())); wizard.setCaption( makeStdCaption( i18n( "First-Run Wizard" ) ) ); if( wizard.exec() != QDialog::Rejected ) { switch( wizard.interface() ) { case FirstRunWizard::XMMS: amaroK::config()->writeEntry( "XMLFile", "amarokui_xmms.rc" ); AmarokConfig::setShowPlayerWindow( true ); //FIXME the statusbar is now quite essential and also without it // the popup messages break. Fix in 1.2.1 AmarokConfig::setShowStatusBar( /*false*/ true ); break; case FirstRunWizard::Compact: amaroK::config()->writeEntry( "XMLFile", "amarokui.rc" ); AmarokConfig::setShowPlayerWindow( false ); AmarokConfig::setShowStatusBar( true ); break; } const QStringList oldCollectionFolders = AmarokConfig::collectionFolders(); wizard.writeCollectionConfig(); // If wizard is invoked at runtime, rescan collection if folder setup has changed if ( !amaroK::config()->readBoolEntry( "First Run", true ) && oldCollectionFolders != AmarokConfig::collectionFolders() ) CollectionDB::instance()->startScan(); config->updateSettings(); } }