-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 | |||
@@ -85,10 +85,12 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | |||
85 | #ifndef DESKTOP_VERSION | 85 | #ifndef DESKTOP_VERSION |
86 | if ( QApplication::desktop()->height() == 480 ) | 86 | if ( QApplication::desktop()->height() == 480 ) |
87 | hideButtons(); | 87 | hideButtons(); |
88 | #endif | 88 | #endif |
89 | 89 | kdelibcfg = 0; | |
90 | if ( !parent ) | ||
90 | setupGlobalTab(); | 91 | setupGlobalTab(); |
92 | else { | ||
91 | setupMainTab(); | 93 | setupMainTab(); |
92 | // setupLocaleTab(); | 94 | // setupLocaleTab(); |
93 | //setupTimeZoneTab(); | 95 | //setupTimeZoneTab(); |
94 | setupTimeTab(); | 96 | setupTimeTab(); |
@@ -100,9 +102,9 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | |||
100 | //setupSyncAlgTab(); | 102 | //setupSyncAlgTab(); |
101 | //setupPrinterTab(); | 103 | //setupPrinterTab(); |
102 | //setupGroupSchedulingTab(); | 104 | //setupGroupSchedulingTab(); |
103 | //setupGroupAutomationTab(); | 105 | //setupGroupAutomationTab(); |
104 | 106 | } | |
105 | 107 | ||
106 | } | 108 | } |
107 | 109 | ||
108 | 110 | ||
@@ -110,12 +112,12 @@ KOPrefsDialog::~KOPrefsDialog() | |||
110 | { | 112 | { |
111 | } | 113 | } |
112 | void KOPrefsDialog::setupGlobalTab() | 114 | void KOPrefsDialog::setupGlobalTab() |
113 | { | 115 | { |
114 | QFrame *topFrame = addPage(i18n("Global"),0,0); | 116 | //QFrame *topFrame = addPage(i18n("Global"),0,0); |
115 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); | 117 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), this, "KCMKdeLibConfig" ); |
116 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); | 118 | setMainWidget( kdelibcfg ); |
117 | topLayout->addWidget( kdelibcfg ); | 119 | setCaption( i18n("KDE-Pim Global Settings")); |
118 | 120 | ||
119 | 121 | ||
120 | } | 122 | } |
121 | void KOPrefsDialog::setupLocaleDateTab() | 123 | void KOPrefsDialog::setupLocaleDateTab() |
@@ -239,9 +241,9 @@ void KOPrefsDialog::setupLocaleTab() | |||
239 | #endif | 241 | #endif |
240 | } | 242 | } |
241 | void KOPrefsDialog::showSyncPage() | 243 | void KOPrefsDialog::showSyncPage() |
242 | { | 244 | { |
243 | showPage ( 0 ) ; | 245 | // showPage ( 0 ) ; |
244 | kdelibcfg->showTimeZoneTab() ; | 246 | kdelibcfg->showTimeZoneTab() ; |
245 | 247 | ||
246 | } | 248 | } |
247 | void KOPrefsDialog::setupSyncAlgTab() | 249 | void KOPrefsDialog::setupSyncAlgTab() |
@@ -1457,9 +1459,11 @@ void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text, | |||
1457 | } | 1459 | } |
1458 | 1460 | ||
1459 | void KOPrefsDialog::usrReadConfig() | 1461 | void KOPrefsDialog::usrReadConfig() |
1460 | { | 1462 | { |
1463 | if ( kdelibcfg ) | ||
1461 | kdelibcfg->readConfig(); | 1464 | kdelibcfg->readConfig(); |
1465 | else { | ||
1462 | mNameEdit->setText(KOPrefs::instance()->fullName()); | 1466 | mNameEdit->setText(KOPrefs::instance()->fullName()); |
1463 | mEmailEdit->setText(KOPrefs::instance()->email()); | 1467 | mEmailEdit->setText(KOPrefs::instance()->email()); |
1464 | 1468 | ||
1465 | mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); | 1469 | mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); |
@@ -1502,14 +1506,16 @@ void KOPrefsDialog::usrReadConfig() | |||
1502 | mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); | 1506 | mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); |
1503 | mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); | 1507 | mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); |
1504 | mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); | 1508 | mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); |
1505 | } | 1509 | } |
1510 | } | ||
1506 | 1511 | ||
1507 | 1512 | ||
1508 | void KOPrefsDialog::usrWriteConfig() | 1513 | void KOPrefsDialog::usrWriteConfig() |
1509 | { | 1514 | { |
1510 | 1515 | if ( kdelibcfg ) | |
1511 | kdelibcfg->writeConfig(); | 1516 | kdelibcfg->writeConfig(); |
1517 | else { | ||
1512 | // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text(); | 1518 | // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text(); |
1513 | //KOPrefs::instance()->mRemoteUser = mRemoteUser->text(); | 1519 | //KOPrefs::instance()->mRemoteUser = mRemoteUser->text(); |
1514 | //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text(); | 1520 | //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text(); |
1515 | //KOPrefs::instance()->mRemoteFile= mRemoteFile->text(); | 1521 | //KOPrefs::instance()->mRemoteFile= mRemoteFile->text(); |
@@ -1565,9 +1571,9 @@ void KOPrefsDialog::usrWriteConfig() | |||
1565 | KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value(); | 1571 | KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value(); |
1566 | KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; | 1572 | KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; |
1567 | KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; | 1573 | KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; |
1568 | KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; | 1574 | KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; |
1569 | 1575 | } | |
1570 | } | 1576 | } |
1571 | 1577 | ||
1572 | void KOPrefsDialog::updateCategories() | 1578 | void KOPrefsDialog::updateCategories() |
1573 | { | 1579 | { |