-rw-r--r-- | kaddressbook/mainembedded.cpp | 15 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/genericwrapper.cpp | 18 | ||||
-rw-r--r-- | kmicromail/opiemail.cpp | 2 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 6 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 2 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 106 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 2 | ||||
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 2 | ||||
-rw-r--r-- | libkdepim/kpimglobalprefs.cpp | 17 | ||||
-rw-r--r-- | libkdepim/kpimglobalprefs.h | 4 |
10 files changed, 93 insertions, 81 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index 10b1013..965fb06 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp | |||
@@ -17,2 +17,3 @@ | |||
17 | #include "externalapphandler.h" | 17 | #include "externalapphandler.h" |
18 | #include <libkdepim/kpimglobalprefs.h> | ||
18 | 19 | ||
@@ -75,15 +76,3 @@ int main( int argc, char **argv ) | |||
75 | { | 76 | { |
76 | KConfig kon ( locateLocal( "config", "korganizerrc" ) ); | 77 | KPimGlobalPrefs::instance()->setGlobalConfig(); |
77 | kon.setGroup("Locale"); | ||
78 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)kon.readNumEntry( "PreferredDate",0) ); | ||
79 | QString dummy = kon.readEntry( "UserDateFormatShort","%aK %d.%m.%y" );// kon.readEntry( ""); | ||
80 | KGlobal::locale()->setHore24Format( !kon.readNumEntry( "PreferredTime",0 ) ); | ||
81 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); | ||
82 | dummy = kon.readEntry( "UserDateFormatLong","%A %d %b %y" ); | ||
83 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); | ||
84 | kon.setGroup("Time & Date"); | ||
85 | KGlobal::locale()->setDaylightSaving( kon.readBoolEntry( "UseDaylightsaving", true ), | ||
86 | kon.readNumEntry( "DaylightsavingStart", 90), | ||
87 | kon.readNumEntry( "DaylightsavingEnd",304) ); | ||
88 | KGlobal::locale()->setTimezone( kon.readEntry( "TimeZoneName" ," 00:00 Europe/London(UTC)") ); | ||
89 | } | 78 | } |
diff --git a/kmicromail/libmailwrapper/genericwrapper.cpp b/kmicromail/libmailwrapper/genericwrapper.cpp index 09a6447..e691082 100644 --- a/kmicromail/libmailwrapper/genericwrapper.cpp +++ b/kmicromail/libmailwrapper/genericwrapper.cpp | |||
@@ -31,21 +31,3 @@ const QDateTime Genericwrapper::parseDateTime( mailimf_date_time *date ) | |||
31 | { | 31 | { |
32 | static bool init = false ; | ||
33 | if ( ! init ) { | ||
34 | KConfig kon ( locateLocal( "config", "korganizerrc" ) ); | ||
35 | kon.setGroup("Locale"); | ||
36 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)kon.readNumEntry( "PreferredDate",0) ); | ||
37 | QString dummy = kon.readEntry( "UserDateFormatShort","%aK %d.%m.%y" );// kon.readEntry( ""); | ||
38 | KGlobal::locale()->setHore24Format( !kon.readNumEntry( "PreferredTime",0 ) ); | ||
39 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); | ||
40 | dummy = kon.readEntry( "UserDateFormatLong","%A %d %b %y" ); | ||
41 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); | ||
42 | kon.setGroup("Time & Date"); | ||
43 | KGlobal::locale()->setDaylightSaving( kon.readBoolEntry( "UseDaylightsaving", true ), | ||
44 | kon.readNumEntry( "DaylightsavingStart", 90), | ||
45 | kon.readNumEntry( "DaylightsavingEnd",304) ); | ||
46 | KGlobal::locale()->setTimezone( kon.readEntry( "TimeZoneName" ," 00:00 Europe/London(UTC)") ); | ||
47 | |||
48 | init = true; | ||
49 | 32 | ||
50 | } | ||
51 | QDate da (date->dt_year,date->dt_month, date->dt_day ); | 33 | QDate da (date->dt_year,date->dt_month, date->dt_day ); |
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index 9a1a750..164988c 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp | |||
@@ -17,2 +17,3 @@ | |||
17 | #include <libkdepim/externalapphandler.h> | 17 | #include <libkdepim/externalapphandler.h> |
18 | #include <libkdepim/kpimglobalprefs.h> | ||
18 | 19 | ||
@@ -34,2 +35,3 @@ OpieMail::OpieMail( QWidget *parent, const char *name ) | |||
34 | settings = new Settings(); | 35 | settings = new Settings(); |
36 | KPimGlobalPrefs::instance()->setGlobalConfig(); | ||
35 | 37 | ||
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 @@ | |||
65 | #include <libkdepim/ksyncprofile.h> | 65 | #include <libkdepim/ksyncprofile.h> |
66 | #include <libkdepim/kpimglobalprefs.h> | ||
66 | 67 | ||
@@ -1886,4 +1887,6 @@ void CalendarView::goPreviousMonth() | |||
1886 | } | 1887 | } |
1887 | void CalendarView::writeLocale() | 1888 | void CalendarView::writeLocale() |
1888 | { | 1889 | { |
1890 | //KPimGlobalPrefs::instance()->setGlobalConfig(); | ||
1891 | #if 0 | ||
1889 | KGlobal::locale()->setHore24Format( !KOPrefs::instance()->mPreferredTime ); | 1892 | KGlobal::locale()->setHore24Format( !KOPrefs::instance()->mPreferredTime ); |
@@ -1900,2 +1903,3 @@ void CalendarView::writeLocale() | |||
1900 | KGlobal::locale()->setTimezone( KOPrefs::instance()->mTimeZoneId ); | 1903 | KGlobal::locale()->setTimezone( KOPrefs::instance()->mTimeZoneId ); |
1904 | #endif | ||
1901 | } | 1905 | } |
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 @@ | |||
43 | #include <kstaticdeleter.h> | 43 | #include <kstaticdeleter.h> |
44 | #include <libkdepim/kpimglobalprefs.h> | ||
44 | 45 | ||
@@ -392,2 +393,3 @@ void KOPrefs::usrReadConfig() | |||
392 | { | 393 | { |
394 | mPreferredLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; | ||
393 | mLocaleDict = 0; | 395 | 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) : | |||
83 | setupMainTab(); | 83 | setupMainTab(); |
84 | setupLocaleTab(); | 84 | // setupLocaleTab(); |
85 | setupTimeZoneTab(); | 85 | //setupTimeZoneTab(); |
86 | setupTimeTab(); | 86 | setupTimeTab(); |
87 | setupLocaleDateTab(); | 87 | //setupLocaleDateTab(); |
88 | setupFontsTab(); | 88 | setupFontsTab(); |
@@ -112,2 +112,3 @@ void KOPrefsDialog::setupLocaleDateTab() | |||
112 | { | 112 | { |
113 | #if 0 | ||
113 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 114 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); |
@@ -161,2 +162,3 @@ QFrame *topFrame = addPage(i18n("Date Format"),0,0); | |||
161 | ++iii; | 162 | ++iii; |
163 | #endif | ||
162 | 164 | ||
@@ -166,2 +168,3 @@ void KOPrefsDialog::setupLocaleTab() | |||
166 | { | 168 | { |
169 | #if 0 | ||
167 | QFrame *topFrame = addPage(i18n("Locale"),0,0); | 170 | QFrame *topFrame = addPage(i18n("Locale"),0,0); |
@@ -225,2 +228,3 @@ void KOPrefsDialog::setupLocaleTab() | |||
225 | #endif | 228 | #endif |
229 | #endif | ||
226 | } | 230 | } |
@@ -625,18 +629,3 @@ void KOPrefsDialog::setupViewsTab() | |||
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 = |
@@ -801,3 +790,29 @@ void KOPrefsDialog::setupViewsTab() | |||
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 |
@@ -1338,6 +1353,6 @@ void KOPrefsDialog::usrReadConfig() | |||
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); |
@@ -1368,6 +1383,6 @@ void KOPrefsDialog::usrReadConfig() | |||
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(); |
@@ -1391,4 +1406,4 @@ void KOPrefsDialog::usrWriteConfig() | |||
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()); |
@@ -1398,16 +1413,16 @@ void KOPrefsDialog::usrWriteConfig() | |||
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 | ||
@@ -1559,2 +1574,3 @@ void 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); |
@@ -1617,3 +1633,3 @@ void KOPrefsDialog::setupTimeZoneTab() | |||
1617 | mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); | 1633 | mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); |
1618 | 1634 | #endif | |
1619 | 1635 | ||
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 @@ | |||
36 | #include <libkcal/kincidenceformatter.h> | 36 | #include <libkcal/kincidenceformatter.h> |
37 | #include <libkdepim/kpimglobalprefs.h> | ||
37 | 38 | ||
@@ -83,2 +84,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | |||
83 | KOPrefs *p = KOPrefs::instance(); | 84 | KOPrefs *p = KOPrefs::instance(); |
85 | KPimGlobalPrefs::instance()->setGlobalConfig(); | ||
84 | // if ( QApplication::desktop()->height() > 480 ) { | 86 | // if ( QApplication::desktop()->height() > 480 ) { |
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index 00a07d9..2819ab1 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp | |||
@@ -746,3 +746,3 @@ void KDEPIMConfigWidget::usrWriteConfig() | |||
746 | ExternalAppHandler::instance()->loadConfig(); | 746 | ExternalAppHandler::instance()->loadConfig(); |
747 | 747 | KPimGlobalPrefs::instance()->setGlobalConfig(); | |
748 | } | 748 | } |
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp index 12a503d..a896a0f 100644 --- a/libkdepim/kpimglobalprefs.cpp +++ b/libkdepim/kpimglobalprefs.cpp | |||
@@ -102,2 +102,19 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) | |||
102 | 102 | ||
103 | void KPimGlobalPrefs::setGlobalConfig() | ||
104 | { | ||
105 | |||
106 | KGlobal::locale()->setHore24Format( !mPreferredTime ); | ||
107 | KGlobal::locale()->setWeekStartMonday( !mWeekStartsOnSunday ); | ||
108 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)mPreferredDate ); | ||
109 | KGlobal::locale()->setLanguage( mPreferredLanguage ); | ||
110 | QString dummy = mUserDateFormatLong; | ||
111 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); | ||
112 | dummy = mUserDateFormatShort; | ||
113 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); | ||
114 | KGlobal::locale()->setDaylightSaving( mUseDaylightsaving, | ||
115 | mDaylightsavingStart, | ||
116 | mDaylightsavingEnd ); | ||
117 | KGlobal::locale()->setTimezone( mTimeZoneId ); | ||
118 | |||
119 | } | ||
103 | KPimGlobalPrefs::~KPimGlobalPrefs() | 120 | KPimGlobalPrefs::~KPimGlobalPrefs() |
diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h index dad78e6..84ba689 100644 --- a/libkdepim/kpimglobalprefs.h +++ b/libkdepim/kpimglobalprefs.h | |||
@@ -39,2 +39,3 @@ class KPimGlobalPrefs : public KPrefs | |||
39 | 39 | ||
40 | void setGlobalConfig(); | ||
40 | static KPimGlobalPrefs *instance(); | 41 | static KPimGlobalPrefs *instance(); |
@@ -98,5 +99,2 @@ class KPimGlobalPrefs : public KPrefs | |||
98 | 99 | ||
99 | |||
100 | |||
101 | |||
102 | int mEmailClient; | 100 | int mEmailClient; |