summaryrefslogtreecommitdiffabout
path: root/korganizer/koprefsdialog.cpp
Unidiff
Diffstat (limited to 'korganizer/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koprefsdialog.cpp106
1 files changed, 61 insertions, 45 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index 7dafcd8..b4b3b27 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -81,10 +81,10 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
81 81
82 setupGlobalTab(); 82 setupGlobalTab();
83 setupMainTab(); 83 setupMainTab();
84 setupLocaleTab(); 84 // setupLocaleTab();
85 setupTimeZoneTab(); 85 //setupTimeZoneTab();
86 setupTimeTab(); 86 setupTimeTab();
87 setupLocaleDateTab(); 87 //setupLocaleDateTab();
88 setupFontsTab(); 88 setupFontsTab();
89 setupColorsTab(); 89 setupColorsTab();
90 setupViewsTab(); 90 setupViewsTab();
@@ -110,6 +110,7 @@ void KOPrefsDialog::setupGlobalTab()
110} 110}
111void KOPrefsDialog::setupLocaleDateTab() 111void KOPrefsDialog::setupLocaleDateTab()
112{ 112{
113#if 0
113QFrame *topFrame = addPage(i18n("Date Format"),0,0); 114QFrame *topFrame = addPage(i18n("Date Format"),0,0);
114 QGridLayout *topLayout = new QGridLayout(topFrame,3,2); 115 QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
115 topLayout->setSpacing(spacingHint()); 116 topLayout->setSpacing(spacingHint());
@@ -159,11 +160,13 @@ QFrame *topFrame = addPage(i18n("Date Format"),0,0);
159 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); 160 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame);
160 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 161 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
161 ++iii; 162 ++iii;
163#endif
162 164
163} 165}
164 166
165void KOPrefsDialog::setupLocaleTab() 167void KOPrefsDialog::setupLocaleTab()
166{ 168{
169#if 0
167 QFrame *topFrame = addPage(i18n("Locale"),0,0); 170 QFrame *topFrame = addPage(i18n("Locale"),0,0);
168 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 171 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
169 topLayout->setSpacing(spacingHint()); 172 topLayout->setSpacing(spacingHint());
@@ -223,6 +226,7 @@ void KOPrefsDialog::setupLocaleTab()
223 &(KOPrefs::instance()->mUseQuicksave),topFrame); 226 &(KOPrefs::instance()->mUseQuicksave),topFrame);
224 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 227 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
225#endif 228#endif
229#endif
226} 230}
227void KOPrefsDialog::showSyncPage() 231void KOPrefsDialog::showSyncPage()
228{ 232{
@@ -623,22 +627,7 @@ void KOPrefsDialog::setupViewsTab()
623 topLayout->addWidget(enableToolTips->checkBox(),ii++,0); 627 topLayout->addWidget(enableToolTips->checkBox(),ii++,0);
624 628
625 } 629 }
626 KPrefsDialogWidBool *passwdk = 630
627 addWidBool(i18n("Show parent To-Do's in What's Next view"),
628 &(KOPrefs::instance()->mWNViewShowsParents),topFrame);
629 topLayout->addWidget(passwdk->checkBox(), ii++,0);
630
631 passwdk =
632 addWidBool(i18n("Show location in What's Next view"),
633 &(KOPrefs::instance()->mWNViewShowLocation),topFrame);
634 topLayout->addWidget(passwdk->checkBox(), ii++,0);
635
636 passwdk =
637 addWidBool(i18n("Show Sync Events in WN/Agenda view"),
638 &(KOPrefs::instance()->mShowSyncEvents),topFrame);
639 topLayout->addWidget(passwdk->checkBox(), ii++,0);
640
641
642 KPrefsDialogWidBool *marcusBainsEnabled = 631 KPrefsDialogWidBool *marcusBainsEnabled =
643 addWidBool(i18n("Show Marcus Bains line"), 632 addWidBool(i18n("Show Marcus Bains line"),
644 &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); 633 &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame);
@@ -799,7 +788,33 @@ void KOPrefsDialog::setupViewsTab()
799 &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); 788 &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame);
800 topLayout->addWidget(holidayColor->label(),ii,0); 789 topLayout->addWidget(holidayColor->label(),ii,0);
801 topLayout->addWidget(holidayColor->button(),ii++,1); 790 topLayout->addWidget(holidayColor->button(),ii++,1);
802 791 // *********************** What'sNext View
792 topFrame = addPage(i18n("What's Next View"),0,0);
793 // DesktopIcon("viewmag",KIcon::SizeMedium));
794
795 topLayout = new QGridLayout(topFrame,4,1);
796 topLayout->setSpacing(spacingHint());
797 topLayout->setMargin(marginHint());
798 ii = 0;
799 KPrefsDialogWidBool *passwdk =
800 addWidBool(i18n("Show parent To-Do's in What's Next view"),
801 &(KOPrefs::instance()->mWNViewShowsParents),topFrame);
802 topLayout->addWidget(passwdk->checkBox(), ii++,0);
803
804 passwdk =
805 addWidBool(i18n("Show location in What's Next view"),
806 &(KOPrefs::instance()->mWNViewShowLocation),topFrame);
807 topLayout->addWidget(passwdk->checkBox(), ii++,0);
808
809 passwdk =
810 addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"),
811 &(KOPrefs::instance()->mShowSyncEvents),topFrame);
812 topLayout->addWidget(passwdk->checkBox(), ii++,0);
813 passwdk =
814 addWidBool(i18n("Use short date in \nWhat's Next/Event view"),
815 &(KOPrefs::instance()->mShortDateInViewer),topFrame);
816 topLayout->addMultiCellWidget(passwdk->checkBox(), ii,ii,0,1);
817
803 // *********************** Todo View 818 // *********************** Todo View
804 819
805 topFrame = addPage(i18n("Todo View"),0,0); 820 topFrame = addPage(i18n("Todo View"),0,0);
@@ -1336,10 +1351,10 @@ void KOPrefsDialog::usrReadConfig()
1336 mEmailEdit->setText(KOPrefs::instance()->email()); 1351 mEmailEdit->setText(KOPrefs::instance()->email());
1337 1352
1338 mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); 1353 mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval);
1339 QDate current ( 2001, 1,1); 1354 // QDate current ( 2001, 1,1);
1340 mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); 1355 //mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1));
1341 mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); 1356 //mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1));
1342 setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); 1357 //setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId));
1343 //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); 1358 //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset);
1344 mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime); 1359 mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime);
1345 mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration); 1360 mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration);
@@ -1366,10 +1381,10 @@ void KOPrefsDialog::usrReadConfig()
1366 1381
1367 //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); 1382 //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile);
1368 mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); 1383 mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile);
1369 QString dummy = KOPrefs::instance()->mUserDateFormatLong; 1384 //QString dummy = KOPrefs::instance()->mUserDateFormatLong;
1370 mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); 1385 //mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") ));
1371 dummy = KOPrefs::instance()->mUserDateFormatShort; 1386 //dummy = KOPrefs::instance()->mUserDateFormatShort;
1372 mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); 1387 //mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") ));
1373 updateCategories(); 1388 updateCategories();
1374 mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); 1389 mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps );
1375 mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); 1390 mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime );
@@ -1389,27 +1404,27 @@ void KOPrefsDialog::usrWriteConfig()
1389 //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); 1404 //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text();
1390 KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); 1405 KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text();
1391 1406
1392 KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); 1407 //KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") );
1393 KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); 1408 //KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") );
1394 KOPrefs::instance()->setFullName(mNameEdit->text()); 1409 KOPrefs::instance()->setFullName(mNameEdit->text());
1395 KOPrefs::instance()->setEmail(mEmailEdit->text()); 1410 KOPrefs::instance()->setEmail(mEmailEdit->text());
1396 1411
1397 KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); 1412 KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value();
1398 1413
1399 KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); 1414 // KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText();
1400 QDate date; 1415 //QDate date;
1401 date = mStartDateSavingEdit->date(); 1416 //date = mStartDateSavingEdit->date();
1402 int sub = 0; 1417 //int sub = 0;
1403 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) 1418 //if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
1404 sub = 1; 1419 // sub = 1;
1405 KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; 1420// KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub;
1406 date = mEndDateSavingEdit->date(); 1421// date = mEndDateSavingEdit->date();
1407 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) 1422// if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
1408 sub = 1; 1423// sub = 1;
1409 else 1424// else
1410 sub = 0; 1425// sub = 0;
1411 KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; 1426// KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub;
1412 // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); 1427// // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value();
1413 1428
1414 KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); 1429 KOPrefs::instance()->mStartTime = mStartTimeSpin->value();
1415 KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); 1430 KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value();
@@ -1557,6 +1572,7 @@ void KOPrefsDialog::updateTimezoneOffset( int index )
1557 1572
1558void KOPrefsDialog::setupTimeZoneTab() 1573void KOPrefsDialog::setupTimeZoneTab()
1559{ 1574{
1575#if 0
1560 QFrame *topFrame = addPage(i18n("Time Zone"),0,0); 1576 QFrame *topFrame = addPage(i18n("Time Zone"),0,0);
1561 // DesktopIcon("clock",KIcon::SizeMedium)); 1577 // DesktopIcon("clock",KIcon::SizeMedium));
1562 1578
@@ -1615,7 +1631,7 @@ void KOPrefsDialog::setupTimeZoneTab()
1615 QDate current ( 2001, 1,1); 1631 QDate current ( 2001, 1,1);
1616 mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); 1632 mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1));
1617 mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); 1633 mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1));
1618 1634#endif
1619 1635
1620} 1636}
1621 1637