author | zautrix <zautrix> | 2005-06-09 16:17:14 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-09 16:17:14 (UTC) |
commit | 89c5159208fd982f527117e49d67ea1f90553dbe (patch) (unidiff) | |
tree | b6b72ca9e0668e871a6969b25654945747015d0f /korganizer/koprefsdialog.cpp | |
parent | ad88eadf0bdb34cb4a93639b50a5566a06470c22 (diff) | |
download | kdepimpi-89c5159208fd982f527117e49d67ea1f90553dbe.zip kdepimpi-89c5159208fd982f527117e49d67ea1f90553dbe.tar.gz kdepimpi-89c5159208fd982f527117e49d67ea1f90553dbe.tar.bz2 |
dialog fixes
Diffstat (limited to 'korganizer/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koprefsdialog.cpp | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index c9477e3..4b5b66a 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -83,14 +83,16 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | |||
83 | mSpacingHint = spacingHintSmall(); | 83 | mSpacingHint = spacingHintSmall(); |
84 | mMarginHint = marginHintSmall(); | 84 | mMarginHint = marginHintSmall(); |
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(); |
95 | //setupLocaleDateTab(); | 97 | //setupLocaleDateTab(); |
96 | setupFontsTab(); | 98 | setupFontsTab(); |
@@ -98,26 +100,26 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | |||
98 | setupViewsTab(); | 100 | setupViewsTab(); |
99 | //setupSyncTab(); | 101 | //setupSyncTab(); |
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 | ||
109 | KOPrefsDialog::~KOPrefsDialog() | 111 | 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() |
122 | { | 124 | { |
123 | #if 0 | 125 | #if 0 |
@@ -237,13 +239,13 @@ void KOPrefsDialog::setupLocaleTab() | |||
237 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 239 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
238 | #endif | 240 | #endif |
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() |
248 | { | 250 | { |
249 | #if 0 | 251 | #if 0 |
@@ -1455,13 +1457,15 @@ void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text, | |||
1455 | } | 1457 | } |
1456 | } | 1458 | } |
1457 | } | 1459 | } |
1458 | 1460 | ||
1459 | void KOPrefsDialog::usrReadConfig() | 1461 | void KOPrefsDialog::usrReadConfig() |
1460 | { | 1462 | { |
1461 | kdelibcfg->readConfig(); | 1463 | if ( kdelibcfg ) |
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); |
1466 | // QDate current ( 2001, 1,1); | 1470 | // QDate current ( 2001, 1,1); |
1467 | //mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); | 1471 | //mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); |
@@ -1499,19 +1503,21 @@ void KOPrefsDialog::usrReadConfig() | |||
1499 | //mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); | 1503 | //mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); |
1500 | updateCategories(); | 1504 | updateCategories(); |
1501 | mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); | 1505 | mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); |
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 ); |
1509 | } | ||
1505 | } | 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(); |
1516 | //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); | 1522 | //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); |
1517 | KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); | 1523 | KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); |
@@ -1563,13 +1569,13 @@ void KOPrefsDialog::usrWriteConfig() | |||
1563 | // item = item->nextSibling(); | 1569 | // item = item->nextSibling(); |
1564 | // } | 1570 | // } |
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 | { |
1574 | mCategoryCombo->clear(); | 1580 | mCategoryCombo->clear(); |
1575 | mCategoryDict.clear(); | 1581 | mCategoryDict.clear(); |