summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koprefsdialog.cpp14
-rw-r--r--korganizer/koprefsdialog.h1
2 files changed, 11 insertions, 4 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index 7ba1392..ebcff33 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -1428,3 +1428,3 @@ void KOPrefsDialog::usrReadConfig()
mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval );
-
+ mCatDefaultColor = KOPrefs::instance()->mEventColor;
}
@@ -1434,4 +1434,2 @@ void KOPrefsDialog::usrWriteConfig()
{
-
-
KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text();
@@ -1444,3 +1442,11 @@ void KOPrefsDialog::usrWriteConfig()
KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem();
-
+ if ( mCatDefaultColor != KOPrefs::instance()->mEventColor ) {
+ QStringList cat = KOPrefs::instance()->mCustomCategories;
+ int iii = 0;
+ while ( iii < cat.count() ) {
+ if ( *KOPrefs::instance()->categoryColor( cat[ iii ] ) == mCatDefaultColor )
+ KOPrefs::instance()->setCategoryColor( cat[ iii ], KOPrefs::instance()->mEventColor );
+ ++iii;
+ }
+ }
QDictIterator<QColor> it(mCategoryDict);
diff --git a/korganizer/koprefsdialog.h b/korganizer/koprefsdialog.h
index 80d6545..baa6cf9 100644
--- a/korganizer/koprefsdialog.h
+++ b/korganizer/koprefsdialog.h
@@ -92,2 +92,3 @@ class KOPrefsDialog : public KPrefsDialog
private:
+ QColor mCatDefaultColor;
KPrefsDialogWidBool *mEnableGroupScheduling;