-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 5 | ||||
-rw-r--r-- | libkdepim/kpimglobalprefs.cpp | 3 | ||||
-rw-r--r-- | libkdepim/kpimglobalprefs.h | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index 1eef150..332f975 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp | |||
@@ -314,24 +314,29 @@ void KDEPIMConfigWidget::setupTimeZoneTab() | |||
314 | int nCurrentlySet = 11; | 314 | int nCurrentlySet = 11; |
315 | for (int i = 0; i < mTimeZoneCombo->count(); i++) | 315 | for (int i = 0; i < mTimeZoneCombo->count(); i++) |
316 | { | 316 | { |
317 | if (mTimeZoneCombo->text(i) == sCurrentlySet) | 317 | if (mTimeZoneCombo->text(i) == sCurrentlySet) |
318 | { | 318 | { |
319 | nCurrentlySet = i; | 319 | nCurrentlySet = i; |
320 | break; | 320 | break; |
321 | } | 321 | } |
322 | } | 322 | } |
323 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); | 323 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); |
324 | int iii = 1; | 324 | int iii = 1; |
325 | KPrefsWidBool *sb = | 325 | KPrefsWidBool *sb = |
326 | addWidBool(i18n("Add 30 min (+00:30) to selected Timezone"), | ||
327 | &(KPimGlobalPrefs::instance()->mTimeZoneAdd30min),topFrame); | ||
328 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); | ||
329 | ++iii; | ||
330 | sb = | ||
326 | addWidBool(i18n("Timezone has daylight saving"), | 331 | addWidBool(i18n("Timezone has daylight saving"), |
327 | &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame); | 332 | &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame); |
328 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); | 333 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); |
329 | ++iii; | 334 | ++iii; |
330 | QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); | 335 | QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); |
331 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 336 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
332 | ++iii; | 337 | ++iii; |
333 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); | 338 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); |
334 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 339 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
335 | ++iii; | 340 | ++iii; |
336 | lab = new QLabel( i18n("Daylight start:"), topFrame ); | 341 | lab = new QLabel( i18n("Daylight start:"), topFrame ); |
337 | topLayout->addWidget(lab, iii,0); | 342 | topLayout->addWidget(lab, iii,0); |
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp index 5081b26..04e2072 100644 --- a/libkdepim/kpimglobalprefs.cpp +++ b/libkdepim/kpimglobalprefs.cpp | |||
@@ -50,24 +50,25 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) | |||
50 | addItemInt("PreferredTime",&mPreferredTime,0); | 50 | addItemInt("PreferredTime",&mPreferredTime,0); |
51 | addItemInt("PreferredDate",&mPreferredDate,0); | 51 | addItemInt("PreferredDate",&mPreferredDate,0); |
52 | addItemBool("WeekStartsOnSunday",&mWeekStartsOnSunday,false); | 52 | addItemBool("WeekStartsOnSunday",&mWeekStartsOnSunday,false); |
53 | //addItemBool("QuickSavingWOUnicode",&mUseQuicksave,false); | 53 | //addItemBool("QuickSavingWOUnicode",&mUseQuicksave,false); |
54 | // addItemBool("ShortDateInViewer",&mShortDateInViewer,false); | 54 | // addItemBool("ShortDateInViewer",&mShortDateInViewer,false); |
55 | addItemString("UserDateFormatLong", &mUserDateFormatLong, "%A %d %b %y"); | 55 | addItemString("UserDateFormatLong", &mUserDateFormatLong, "%A %d %b %y"); |
56 | addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y"); | 56 | addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y"); |
57 | 57 | ||
58 | KPrefs::setCurrentGroup("Time & Date"); | 58 | KPrefs::setCurrentGroup("Time & Date"); |
59 | 59 | ||
60 | addItemString("TimeZoneName",&mTimeZoneId,i18n ("+01:00 Europe/Oslo(CET)") ); | 60 | addItemString("TimeZoneName",&mTimeZoneId,i18n ("+01:00 Europe/Oslo(CET)") ); |
61 | addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); | 61 | addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); |
62 | addItemBool("TimeZoneAdd30min",&mTimeZoneAdd30min,false); | ||
62 | addItemInt("DaylightsavingStart",&mDaylightsavingStart,90); | 63 | addItemInt("DaylightsavingStart",&mDaylightsavingStart,90); |
63 | addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304); | 64 | addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304); |
64 | 65 | ||
65 | KPrefs::setCurrentGroup( "ExternalApplications" ); | 66 | KPrefs::setCurrentGroup( "ExternalApplications" ); |
66 | 67 | ||
67 | addItemInt( "EmailChannelType", &mEmailClient, OMPI_EMC ); | 68 | addItemInt( "EmailChannelType", &mEmailClient, OMPI_EMC ); |
68 | addItemString( "EmailChannel", &mEmailOtherChannel, "" ); | 69 | addItemString( "EmailChannel", &mEmailOtherChannel, "" ); |
69 | addItemString( "EmailChannelMessage", &mEmailOtherMessage, "" ); | 70 | addItemString( "EmailChannelMessage", &mEmailOtherMessage, "" ); |
70 | addItemString( "EmailChannelParameters", &mEmailOtherMessageParameters, "" ); | 71 | addItemString( "EmailChannelParameters", &mEmailOtherMessageParameters, "" ); |
71 | addItemString( "EmailChannelMessage2", &mEmailOtherMessage2, "" ); | 72 | addItemString( "EmailChannelMessage2", &mEmailOtherMessage2, "" ); |
72 | addItemString( "EmailChannelParameters2", &mEmailOtherMessageParameters2, "" ); | 73 | addItemString( "EmailChannelParameters2", &mEmailOtherMessageParameters2, "" ); |
73 | 74 | ||
@@ -109,25 +110,25 @@ void KPimGlobalPrefs::setGlobalConfig() | |||
109 | 110 | ||
110 | KGlobal::locale()->setHore24Format( !mPreferredTime ); | 111 | KGlobal::locale()->setHore24Format( !mPreferredTime ); |
111 | KGlobal::locale()->setWeekStartMonday( !mWeekStartsOnSunday ); | 112 | KGlobal::locale()->setWeekStartMonday( !mWeekStartsOnSunday ); |
112 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)mPreferredDate ); | 113 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)mPreferredDate ); |
113 | KGlobal::locale()->setLanguage( mPreferredLanguage ); | 114 | KGlobal::locale()->setLanguage( mPreferredLanguage ); |
114 | QString dummy = mUserDateFormatLong; | 115 | QString dummy = mUserDateFormatLong; |
115 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); | 116 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); |
116 | dummy = mUserDateFormatShort; | 117 | dummy = mUserDateFormatShort; |
117 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); | 118 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); |
118 | KGlobal::locale()->setDaylightSaving( mUseDaylightsaving, | 119 | KGlobal::locale()->setDaylightSaving( mUseDaylightsaving, |
119 | mDaylightsavingStart, | 120 | mDaylightsavingStart, |
120 | mDaylightsavingEnd ); | 121 | mDaylightsavingEnd ); |
121 | KGlobal::locale()->setTimezone( mTimeZoneId ); | 122 | KGlobal::locale()->setTimezone( mTimeZoneId, mTimeZoneAdd30min ); |
122 | 123 | ||
123 | } | 124 | } |
124 | KPimGlobalPrefs::~KPimGlobalPrefs() | 125 | KPimGlobalPrefs::~KPimGlobalPrefs() |
125 | { | 126 | { |
126 | //qDebug("KPimGlobalPrefs::~KPimGlobalPrefs() "); | 127 | //qDebug("KPimGlobalPrefs::~KPimGlobalPrefs() "); |
127 | writeConfig(); | 128 | writeConfig(); |
128 | } | 129 | } |
129 | 130 | ||
130 | KPimGlobalPrefs *KPimGlobalPrefs::instance() | 131 | KPimGlobalPrefs *KPimGlobalPrefs::instance() |
131 | { | 132 | { |
132 | if ( !sInstance ) { | 133 | if ( !sInstance ) { |
133 | sInstance = staticDeleter.setObject( new KPimGlobalPrefs() ); | 134 | sInstance = staticDeleter.setObject( new KPimGlobalPrefs() ); |
diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h index f6b6628..7c55099 100644 --- a/libkdepim/kpimglobalprefs.h +++ b/libkdepim/kpimglobalprefs.h | |||
@@ -87,24 +87,25 @@ class KPimGlobalPrefs : public KPrefs | |||
87 | public: | 87 | public: |
88 | //US I copied the following "locale" settings from KOPrefs | 88 | //US I copied the following "locale" settings from KOPrefs |
89 | int mPreferredDate; | 89 | int mPreferredDate; |
90 | QString mUserDateFormatLong; | 90 | QString mUserDateFormatLong; |
91 | QString mUserDateFormatShort; | 91 | QString mUserDateFormatShort; |
92 | int mPreferredLanguage; | 92 | int mPreferredLanguage; |
93 | int mPreferredTime; | 93 | int mPreferredTime; |
94 | bool mWeekStartsOnSunday; | 94 | bool mWeekStartsOnSunday; |
95 | QString mTimeZoneId; | 95 | QString mTimeZoneId; |
96 | bool mUseDaylightsaving; | 96 | bool mUseDaylightsaving; |
97 | int mDaylightsavingStart; | 97 | int mDaylightsavingStart; |
98 | int mDaylightsavingEnd; | 98 | int mDaylightsavingEnd; |
99 | bool mTimeZoneAdd30min; | ||
99 | 100 | ||
100 | int mEmailClient; | 101 | int mEmailClient; |
101 | QString mEmailOtherChannel; | 102 | QString mEmailOtherChannel; |
102 | QString mEmailOtherMessage; | 103 | QString mEmailOtherMessage; |
103 | QString mEmailOtherMessageParameters; | 104 | QString mEmailOtherMessageParameters; |
104 | QString mEmailOtherMessage2; | 105 | QString mEmailOtherMessage2; |
105 | QString mEmailOtherMessageParameters2; | 106 | QString mEmailOtherMessageParameters2; |
106 | 107 | ||
107 | int mPhoneClient; | 108 | int mPhoneClient; |
108 | QString mPhoneOtherChannel; | 109 | QString mPhoneOtherChannel; |
109 | QString mPhoneOtherMessage; | 110 | QString mPhoneOtherMessage; |
110 | QString mPhoneOtherMessageParameters; | 111 | QString mPhoneOtherMessageParameters; |