Diffstat (limited to 'korganizer/kodialogmanager.cpp') (more/less context) (ignore 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() | |||
88 | } | 88 | } |
89 | } | 89 | } |
90 | 90 | ||
91 | void KODialogManager::showGlobalOptionsDialog( bool showSync ) | ||
92 | { | ||
93 | if (!mOptionsDialog) { | ||
94 | mOptionsDialog = new KOPrefsDialog(0); | ||
95 | connect(mOptionsDialog,SIGNAL(configChanged()), | ||
96 | mMainView,SLOT(updateConfig())); | ||
97 | } | ||
98 | mOptionsDialog->readConfig(); | ||
99 | #ifndef DESKTOP_VERSION | ||
100 | mOptionsDialog->showMaximized(); | ||
101 | #else | ||
102 | mOptionsDialog->show(); | ||
103 | #endif | ||
104 | if ( showSync ) | ||
105 | mOptionsDialog->showSyncPage(); | ||
106 | mOptionsDialog->exec(); | ||
107 | delete mOptionsDialog; | ||
108 | mOptionsDialog = 0; | ||
109 | } | ||
91 | void KODialogManager::showOptionsDialog( bool showSync ) | 110 | void KODialogManager::showOptionsDialog( bool showSync ) |
92 | { | 111 | { |
93 | 112 | ||
94 | if (!mOptionsDialog) { | 113 | if (!mOptionsDialog) { |
95 | mOptionsDialog = new KOPrefsDialog(mMainView); | 114 | mOptionsDialog = new KOPrefsDialog(mMainView); |
96 | //mOptionsDialog->readConfig(); | ||
97 | connect(mOptionsDialog,SIGNAL(configChanged()), | 115 | connect(mOptionsDialog,SIGNAL(configChanged()), |
98 | mMainView,SLOT(updateConfig())); | 116 | mMainView,SLOT(updateConfig())); |
99 | //connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()), | ||
100 | // mOptionsDialog,SLOT(updateCategories())); | ||
101 | |||
102 | } | 117 | } |
103 | mOptionsDialog->readConfig(); | 118 | mOptionsDialog->readConfig(); |
104 | #ifndef DESKTOP_VERSION | 119 | #ifndef DESKTOP_VERSION |
@@ -109,11 +124,12 @@ void KODialogManager::showOptionsDialog( bool showSync ) | |||
109 | if ( showSync ) | 124 | if ( showSync ) |
110 | mOptionsDialog->showSyncPage(); | 125 | mOptionsDialog->showSyncPage(); |
111 | mOptionsDialog->exec(); | 126 | mOptionsDialog->exec(); |
112 | 127 | delete mOptionsDialog; | |
128 | mOptionsDialog = 0; | ||
113 | } | 129 | } |
114 | void KODialogManager::showSyncOptions() | 130 | void KODialogManager::showSyncOptions() |
115 | { | 131 | { |
116 | showOptionsDialog( true ); | 132 | showGlobalOptionsDialog( true ); |
117 | 133 | ||
118 | } | 134 | } |
119 | void KODialogManager::showOutgoingDialog() | 135 | void KODialogManager::showOutgoingDialog() |