summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-10-18 22:08:36 (UTC)
committer zautrix <zautrix>2004-10-18 22:08:36 (UTC)
commit9fd09e806dfe3df5abdf70991b6ec170fed51078 (patch) (unidiff)
treedc708d0baa4ddb5773531750bcca6000fc7297f4
parentc051fdcc1e7abac87f74430a7fcf3e7099f3b062 (diff)
downloadkdepimpi-9fd09e806dfe3df5abdf70991b6ec170fed51078.zip
kdepimpi-9fd09e806dfe3df5abdf70991b6ec170fed51078.tar.gz
kdepimpi-9fd09e806dfe3df5abdf70991b6ec170fed51078.tar.bz2
added 30min plus to timezone setting
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp5
-rw-r--r--libkdepim/kpimglobalprefs.cpp3
-rw-r--r--libkdepim/kpimglobalprefs.h1
-rw-r--r--microkde/kdecore/klocale.cpp4
-rw-r--r--microkde/kdecore/klocale.h2
5 files changed, 12 insertions, 3 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
@@ -320,12 +320,17 @@ void KDEPIMConfigWidget::setupTimeZoneTab()
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);
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp
index 5081b26..04e2072 100644
--- a/libkdepim/kpimglobalprefs.cpp
+++ b/libkdepim/kpimglobalprefs.cpp
@@ -56,12 +56,13 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name )
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 );
@@ -115,13 +116,13 @@ void KPimGlobalPrefs::setGlobalConfig()
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}
124KPimGlobalPrefs::~KPimGlobalPrefs() 125KPimGlobalPrefs::~KPimGlobalPrefs()
125{ 126{
126 //qDebug("KPimGlobalPrefs::~KPimGlobalPrefs() "); 127 //qDebug("KPimGlobalPrefs::~KPimGlobalPrefs() ");
127 writeConfig(); 128 writeConfig();
diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h
index f6b6628..7c55099 100644
--- a/libkdepim/kpimglobalprefs.h
+++ b/libkdepim/kpimglobalprefs.h
@@ -93,12 +93,13 @@ class KPimGlobalPrefs : public KPrefs
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;
diff --git a/microkde/kdecore/klocale.cpp b/microkde/kdecore/klocale.cpp
index 27acfec..673d845 100644
--- a/microkde/kdecore/klocale.cpp
+++ b/microkde/kdecore/klocale.cpp
@@ -816,15 +816,17 @@ int KLocale::timezoneOffset( QString timeZone )
816} 816}
817 817
818QStringList KLocale::timeZoneList() const 818QStringList KLocale::timeZoneList() const
819{ 819{
820 return mTimeZoneList; 820 return mTimeZoneList;
821} 821}
822void KLocale::setTimezone( const QString &timeZone ) 822void KLocale::setTimezone( const QString &timeZone, bool oddTZ )
823{ 823{
824 mTimeZoneOffset = timezoneOffset( timeZone ); 824 mTimeZoneOffset = timezoneOffset( timeZone );
825 if ( oddTZ )
826 mTimeZoneOffset += 30;
825} 827}
826 828
827void KLocale::setDaylightSaving( bool b, int start , int end ) 829void KLocale::setDaylightSaving( bool b, int start , int end )
828{ 830{
829 daylightEnabled = b; 831 daylightEnabled = b;
830 daylightStart = start; 832 daylightStart = start;
diff --git a/microkde/kdecore/klocale.h b/microkde/kdecore/klocale.h
index 5783530..be9442c 100644
--- a/microkde/kdecore/klocale.h
+++ b/microkde/kdecore/klocale.h
@@ -92,13 +92,13 @@ class KLocale
92 QString m_negativeSign; 92 QString m_negativeSign;
93 93
94 int timezoneOffset( QString ); 94 int timezoneOffset( QString );
95 QStringList timeZoneList() const; 95 QStringList timeZoneList() const;
96 void setDaylightSaving( bool, int , int ); 96 void setDaylightSaving( bool, int , int );
97 int localTimeOffset(const QDateTime &); 97 int localTimeOffset(const QDateTime &);
98 void setTimezone( const QString &timeZone ); 98 void setTimezone( const QString &timeZone , bool oddTZ);
99 private: 99 private:
100 QTime readTime(const QString &str, bool seconds, bool *ok) const; 100 QTime readTime(const QString &str, bool seconds, bool *ok) const;
101 QDate readDate(const QString &str, bool shortFormat, bool *ok) const; 101 QDate readDate(const QString &str, bool shortFormat, bool *ok) const;
102 KCalendarSystem *mCalendarSystem; 102 KCalendarSystem *mCalendarSystem;
103 bool mWeekStartsMonday; 103 bool mWeekStartsMonday;
104 bool mHourF24Format; 104 bool mHourF24Format;