author | zautrix <zautrix> | 2005-06-09 16:17:14 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-09 16:17:14 (UTC) |
commit | 89c5159208fd982f527117e49d67ea1f90553dbe (patch) (side-by-side diff) | |
tree | b6b72ca9e0668e871a6969b25654945747015d0f /korganizer/kodialogmanager.cpp | |
parent | ad88eadf0bdb34cb4a93639b50a5566a06470c22 (diff) | |
download | kdepimpi-89c5159208fd982f527117e49d67ea1f90553dbe.zip kdepimpi-89c5159208fd982f527117e49d67ea1f90553dbe.tar.gz kdepimpi-89c5159208fd982f527117e49d67ea1f90553dbe.tar.bz2 |
dialog fixes
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 @@ -59,90 +59,106 @@ KODialogManager::KODialogManager( CalendarView *mainView ) : KODialogManager::~KODialogManager() { delete mOutgoingDialog; delete mIncomingDialog; delete mOptionsDialog; delete mSearchDialog; #ifndef KORG_NOARCHIVE delete mArchiveDialog; #endif delete mFilterEditDialog; #ifndef KORG_NOPLUGINS delete mPluginDialog; #endif } OutgoingDialog *KODialogManager::outgoingDialog() { createOutgoingDialog(); return mOutgoingDialog; } void KODialogManager::createOutgoingDialog() { if (!mOutgoingDialog) { mOutgoingDialog = new OutgoingDialog(mMainView->calendar(),mMainView); if (mIncomingDialog) mIncomingDialog->setOutgoingDialog(mOutgoingDialog); connect(mOutgoingDialog,SIGNAL(numMessagesChanged(int)), mMainView,SIGNAL(numOutgoingChanged(int))); } } +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 mOptionsDialog->showMaximized(); #else mOptionsDialog->show(); #endif if ( showSync ) mOptionsDialog->showSyncPage(); mOptionsDialog->exec(); - + delete mOptionsDialog; + mOptionsDialog = 0; } void KODialogManager::showSyncOptions() { - showOptionsDialog( true ); + showGlobalOptionsDialog( true ); } void KODialogManager::showOutgoingDialog() { createOutgoingDialog(); mOutgoingDialog->show(); mOutgoingDialog->raise(); } IncomingDialog *KODialogManager::incomingDialog() { createOutgoingDialog(); if (!mIncomingDialog) { mIncomingDialog = new IncomingDialog(mMainView->calendar(),mOutgoingDialog,mMainView); connect(mIncomingDialog,SIGNAL(numMessagesChanged(int)), mMainView,SIGNAL(numIncomingChanged(int))); connect(mIncomingDialog,SIGNAL(calendarUpdated()), mMainView,SLOT(updateView())); } return mIncomingDialog; } void KODialogManager::createIncomingDialog() { createOutgoingDialog(); if (!mIncomingDialog) { mIncomingDialog = new IncomingDialog(mMainView->calendar(),mOutgoingDialog,mMainView); connect(mIncomingDialog,SIGNAL(numMessagesChanged(int)), mMainView,SIGNAL(numIncomingChanged(int))); connect(mIncomingDialog,SIGNAL(calendarUpdated()), mMainView,SLOT(updateView())); } |