Diffstat (limited to 'korganizer/kodialogmanager.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | korganizer/kodialogmanager.cpp | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp index c927b37..aa30c52 100644 --- a/korganizer/kodialogmanager.cpp +++ b/korganizer/kodialogmanager.cpp @@ -88,17 +88,32 @@ void KODialogManager::createOutgoingDialog() } } +void KODialogManager::showGlobalOptionsDialog( bool showSync ) +{ + if (!mOptionsDialog) { + mOptionsDialog = new KOPrefsDialog(0); + connect(mOptionsDialog,SIGNAL(configChanged()), + mMainView,SLOT(updateConfig())); + } + mOptionsDialog->readConfig(); +#ifndef DESKTOP_VERSION + mOptionsDialog->showMaximized(); +#else + mOptionsDialog->show(); +#endif + if ( showSync ) + mOptionsDialog->showSyncPage(); + mOptionsDialog->exec(); + delete mOptionsDialog; + mOptionsDialog = 0; +} void KODialogManager::showOptionsDialog( bool showSync ) { if (!mOptionsDialog) { mOptionsDialog = new KOPrefsDialog(mMainView); - //mOptionsDialog->readConfig(); connect(mOptionsDialog,SIGNAL(configChanged()), mMainView,SLOT(updateConfig())); - //connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()), - // mOptionsDialog,SLOT(updateCategories())); - } mOptionsDialog->readConfig(); #ifndef DESKTOP_VERSION @@ -109,11 +124,12 @@ void KODialogManager::showOptionsDialog( bool showSync ) if ( showSync ) mOptionsDialog->showSyncPage(); mOptionsDialog->exec(); - + delete mOptionsDialog; + mOptionsDialog = 0; } void KODialogManager::showSyncOptions() { - showOptionsDialog( true ); + showGlobalOptionsDialog( true ); } void KODialogManager::showOutgoingDialog() |