summaryrefslogtreecommitdiffabout
path: root/libkdepim
Side-by-side diff
Diffstat (limited to 'libkdepim') (more/less context) (show whitespace changes)
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp11
-rw-r--r--libkdepim/kpimglobalprefs.cpp5
-rw-r--r--libkdepim/kpimglobalprefs.h1
3 files changed, 17 insertions, 0 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
index d62d9f9..759b29d 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
@@ -114,12 +114,23 @@ KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent,
void KDEPIMConfigWidget::showTimeZoneTab()
{
tabWidget->setCurrentPage ( 3 ) ;
}
void KDEPIMConfigWidget::setupStoreTab()
{
+ QVBox *colorPage = new QVBox( this );
+ tabWidget->addTab( colorPage, i18n( "Colors" ) );
+ QWidget* cw = new QWidget( colorPage );
+ KPrefsWidColor *holidayColor =
+ addWidColor(i18n("Alternate background"),
+ &(KPimGlobalPrefs::instance()->mAlternateColor),cw);
+ QHBoxLayout *topLayout = new QHBoxLayout(cw);
+ topLayout->addWidget(holidayColor->label());
+ topLayout->addWidget( (QWidget* )holidayColor->button());
+
+
QVBox *storePage = new QVBox( this );
new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage );
new QLabel( i18n("<b>New data storage dir:</b>"), storePage );
mStoreUrl = new KURLRequester( storePage );
mStoreUrl->setURL( KGlobal::dirs()->localkdedir() );
#ifdef DESKTOP_VERSION
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp
index a09b278..873f0eb 100644
--- a/libkdepim/kpimglobalprefs.cpp
+++ b/libkdepim/kpimglobalprefs.cpp
@@ -57,12 +57,16 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name )
addItemInt("PreferredTime",&mPreferredTime,0);
addItemInt("PreferredDate",&mPreferredDate,0);
addItemBool("WeekStartsOnSunday",&mWeekStartsOnSunday,false);
addItemString("UserDateFormatLong", &mUserDateFormatLong, "%AK %d. %b %y");
addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y");
+ KPrefs::setCurrentGroup("Colors");
+ addItemColor("AlternateBGcolor",&mAlternateColor,KGlobalSettings::alternateBackgroundColor());
+
+
KPrefs::setCurrentGroup("Time & Date");
addItemString("TimeZoneName",&mTimeZoneId, ("+01:00 Europe/Oslo(CET)") );
addItemBool("UseDaylightsaving",&mUseDaylightsaving,true);
addItemBool("TimeZoneAdd30min",&mTimeZoneAdd30min,false);
addItemInt("DaylightsavingStart",&mDaylightsavingStart,90);
@@ -185,12 +189,13 @@ void KPimGlobalPrefs::setGlobalConfig()
dummy = mUserDateFormatShort;
KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") ));
KGlobal::locale()->setDaylightSaving( mUseDaylightsaving,
mDaylightsavingStart,
mDaylightsavingEnd );
KGlobal::locale()->setTimezone( mTimeZoneId, mTimeZoneAdd30min );
+ KGlobalSettings::setAlternateBackgroundColor(mAlternateColor);
}
KPimGlobalPrefs::~KPimGlobalPrefs()
{
if (sInstance == this)
sInstance = staticDeleterGP.setObject(0);
diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h
index bf17338..36cc25a 100644
--- a/libkdepim/kpimglobalprefs.h
+++ b/libkdepim/kpimglobalprefs.h
@@ -99,12 +99,13 @@ class KPimGlobalPrefs : public KPrefs
QString mTimeZoneId;
bool mUseDaylightsaving;
int mDaylightsavingStart;
int mDaylightsavingEnd;
bool mTimeZoneAdd30min;
QFont mApplicationFont;
+ QColor mAlternateColor;
int mEmailClient;
QString mEmailOtherChannel;
QString mEmailOtherMessage;
QString mEmailOtherMessageParameters;
QString mEmailOtherMessage2;