-rw-r--r-- | korganizer/koprefsdialog.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index c9477e3..4b5b66a 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -86,8 +86,10 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : if ( QApplication::desktop()->height() == 480 ) hideButtons(); #endif - + kdelibcfg = 0; + if ( !parent ) setupGlobalTab(); + else { setupMainTab(); // setupLocaleTab(); //setupTimeZoneTab(); @@ -101,7 +103,7 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : //setupPrinterTab(); //setupGroupSchedulingTab(); //setupGroupAutomationTab(); - + } } @@ -111,10 +113,10 @@ KOPrefsDialog::~KOPrefsDialog() } void KOPrefsDialog::setupGlobalTab() { - QFrame *topFrame = addPage(i18n("Global"),0,0); - kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); - QVBoxLayout *topLayout = new QVBoxLayout(topFrame); - topLayout->addWidget( kdelibcfg ); + //QFrame *topFrame = addPage(i18n("Global"),0,0); + kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), this, "KCMKdeLibConfig" ); + setMainWidget( kdelibcfg ); + setCaption( i18n("KDE-Pim Global Settings")); } @@ -240,7 +242,7 @@ void KOPrefsDialog::setupLocaleTab() } void KOPrefsDialog::showSyncPage() { - showPage ( 0 ) ; + // showPage ( 0 ) ; kdelibcfg->showTimeZoneTab() ; } @@ -1458,7 +1460,9 @@ void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text, void KOPrefsDialog::usrReadConfig() { + if ( kdelibcfg ) kdelibcfg->readConfig(); + else { mNameEdit->setText(KOPrefs::instance()->fullName()); mEmailEdit->setText(KOPrefs::instance()->email()); @@ -1503,12 +1507,14 @@ void KOPrefsDialog::usrReadConfig() mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); } +} void KOPrefsDialog::usrWriteConfig() { - + if ( kdelibcfg ) kdelibcfg->writeConfig(); + else { // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text(); //KOPrefs::instance()->mRemoteUser = mRemoteUser->text(); //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text(); @@ -1566,7 +1572,7 @@ void KOPrefsDialog::usrWriteConfig() KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; - + } } void KOPrefsDialog::updateCategories() |