From 89c5159208fd982f527117e49d67ea1f90553dbe Mon Sep 17 00:00:00 2001 From: zautrix Date: Thu, 09 Jun 2005 16:17:14 +0000 Subject: dialog fixes --- (limited to 'korganizer/kodialogmanager.cpp') 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() -- cgit v0.9.0.2