-rw-r--r-- | korganizer/calendarview.cpp | 4 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 2 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 102 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 2 |
4 files changed, 67 insertions, 43 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index bc8625d..3635cfa 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -65,2 +65,3 @@ #include <libkdepim/ksyncprofile.h> +#include <libkdepim/kpimglobalprefs.h> @@ -1888,2 +1889,4 @@ void CalendarView::writeLocale() { + //KPimGlobalPrefs::instance()->setGlobalConfig(); +#if 0 KGlobal::locale()->setHore24Format( !KOPrefs::instance()->mPreferredTime ); @@ -1900,2 +1903,3 @@ void CalendarView::writeLocale() KGlobal::locale()->setTimezone( KOPrefs::instance()->mTimeZoneId ); +#endif } diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index dd978bf..5d7db4f 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -43,2 +43,3 @@ #include <kstaticdeleter.h> +#include <libkdepim/kpimglobalprefs.h> @@ -392,2 +393,3 @@ void KOPrefs::usrReadConfig() { + mPreferredLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; mLocaleDict = 0; diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 7dafcd8..b4b3b27 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -83,6 +83,6 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : setupMainTab(); - setupLocaleTab(); - setupTimeZoneTab(); + // setupLocaleTab(); + //setupTimeZoneTab(); setupTimeTab(); - setupLocaleDateTab(); + //setupLocaleDateTab(); setupFontsTab(); @@ -112,2 +112,3 @@ void KOPrefsDialog::setupLocaleDateTab() { +#if 0 QFrame *topFrame = addPage(i18n("Date Format"),0,0); @@ -161,2 +162,3 @@ QFrame *topFrame = addPage(i18n("Date Format"),0,0); ++iii; +#endif @@ -166,2 +168,3 @@ void KOPrefsDialog::setupLocaleTab() { +#if 0 QFrame *topFrame = addPage(i18n("Locale"),0,0); @@ -225,2 +228,3 @@ void KOPrefsDialog::setupLocaleTab() #endif +#endif } @@ -625,17 +629,2 @@ void KOPrefsDialog::setupViewsTab() } - KPrefsDialogWidBool *passwdk = - addWidBool(i18n("Show parent To-Do's in What's Next view"), - &(KOPrefs::instance()->mWNViewShowsParents),topFrame); - topLayout->addWidget(passwdk->checkBox(), ii++,0); - - passwdk = - addWidBool(i18n("Show location in What's Next view"), - &(KOPrefs::instance()->mWNViewShowLocation),topFrame); - topLayout->addWidget(passwdk->checkBox(), ii++,0); - - passwdk = - addWidBool(i18n("Show Sync Events in WN/Agenda view"), - &(KOPrefs::instance()->mShowSyncEvents),topFrame); - topLayout->addWidget(passwdk->checkBox(), ii++,0); - @@ -801,2 +790,28 @@ void KOPrefsDialog::setupViewsTab() topLayout->addWidget(holidayColor->button(),ii++,1); + // *********************** What'sNext View + topFrame = addPage(i18n("What's Next View"),0,0); + // DesktopIcon("viewmag",KIcon::SizeMedium)); + + topLayout = new QGridLayout(topFrame,4,1); + topLayout->setSpacing(spacingHint()); + topLayout->setMargin(marginHint()); + ii = 0; + KPrefsDialogWidBool *passwdk = + addWidBool(i18n("Show parent To-Do's in What's Next view"), + &(KOPrefs::instance()->mWNViewShowsParents),topFrame); + topLayout->addWidget(passwdk->checkBox(), ii++,0); + + passwdk = + addWidBool(i18n("Show location in What's Next view"), + &(KOPrefs::instance()->mWNViewShowLocation),topFrame); + topLayout->addWidget(passwdk->checkBox(), ii++,0); + + passwdk = + addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"), + &(KOPrefs::instance()->mShowSyncEvents),topFrame); + topLayout->addWidget(passwdk->checkBox(), ii++,0); + passwdk = + addWidBool(i18n("Use short date in \nWhat's Next/Event view"), + &(KOPrefs::instance()->mShortDateInViewer),topFrame); + topLayout->addMultiCellWidget(passwdk->checkBox(), ii,ii,0,1); @@ -1338,6 +1353,6 @@ void KOPrefsDialog::usrReadConfig() mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); - QDate current ( 2001, 1,1); - mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); - mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); - setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); + // QDate current ( 2001, 1,1); + //mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); + //mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); + //setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); @@ -1368,6 +1383,6 @@ void KOPrefsDialog::usrReadConfig() mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); - QString dummy = KOPrefs::instance()->mUserDateFormatLong; - mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); - dummy = KOPrefs::instance()->mUserDateFormatShort; - mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); + //QString dummy = KOPrefs::instance()->mUserDateFormatLong; + //mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); + //dummy = KOPrefs::instance()->mUserDateFormatShort; + //mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); updateCategories(); @@ -1391,4 +1406,4 @@ void KOPrefsDialog::usrWriteConfig() - KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); - KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); + //KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); + //KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); KOPrefs::instance()->setFullName(mNameEdit->text()); @@ -1398,16 +1413,16 @@ void KOPrefsDialog::usrWriteConfig() - KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); - QDate date; - date = mStartDateSavingEdit->date(); - int sub = 0; - if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) - sub = 1; - KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; - date = mEndDateSavingEdit->date(); - if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) - sub = 1; - else - sub = 0; - KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; - // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); + // KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); + //QDate date; + //date = mStartDateSavingEdit->date(); + //int sub = 0; + //if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) + // sub = 1; +// KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; +// date = mEndDateSavingEdit->date(); +// if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) +// sub = 1; +// else +// sub = 0; +// KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; +// // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); @@ -1559,2 +1574,3 @@ void KOPrefsDialog::setupTimeZoneTab() { +#if 0 QFrame *topFrame = addPage(i18n("Time Zone"),0,0); @@ -1617,3 +1633,3 @@ void KOPrefsDialog::setupTimeZoneTab() mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); - +#endif diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index b597a6a..1c4a186 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -36,2 +36,3 @@ #include <libkcal/kincidenceformatter.h> +#include <libkdepim/kpimglobalprefs.h> @@ -83,2 +84,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : KOPrefs *p = KOPrefs::instance(); + KPimGlobalPrefs::instance()->setGlobalConfig(); // if ( QApplication::desktop()->height() > 480 ) { |