summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt2
-rw-r--r--korganizer/koagendaitem.cpp10
-rw-r--r--korganizer/koprefs.cpp1
-rw-r--r--korganizer/koprefs.h1
-rw-r--r--korganizer/koprefsdialog.cpp6
5 files changed, 18 insertions, 2 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index eec0b38..00f5c28 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1204,7 +1204,7 @@
{ "Display all closed","Zeige alle geschlossen" },
{ "Display all flat","Zeige alle flach" },
{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" },
-{ "","" },
+{ "Default todo done color:","Standard Todo erledigt Farbe" },
{ "","" },
{ "","" },
{ "","" },
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index ee9f39a..a05c60e 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -94,10 +94,18 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd )
QStringList categories = mIncidence->categories();
QString cat = categories.first();
if (cat.isEmpty()) {
- mBackgroundColor =KOPrefs::instance()->mEventColor;
+ if ( (incidence->type() == "Todo") &&((static_cast<Todo*>(incidence))->isCompleted()) )
+ mBackgroundColor =KOPrefs::instance()->mTodoDoneColor;
+ else
+ mBackgroundColor =KOPrefs::instance()->mEventColor;
} else {
mBackgroundColor = *KOPrefs::instance()->categoryColor(cat);
+ if ( (incidence->type() == "Todo") &&((static_cast<Todo*>(incidence))->isCompleted()) ) {
+ if ( mBackgroundColor == KOPrefs::instance()->mEventColor )
+ mBackgroundColor =KOPrefs::instance()->mTodoDoneColor;
+ }
}
+
}
mColorGroup = QColorGroup( mBackgroundColor.light(),
mBackgroundColor.dark(),mBackgroundColor.light(),
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 32cc291..0548f14 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -197,6 +197,7 @@ KOPrefs::KOPrefs() :
addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor);
addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor);
addItemColor("Event Color",&mEventColor,mDefaultCategoryColor);
+ addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) );
addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor);
addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor);
addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor);
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index b3acda7..8b849fa 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -123,6 +123,7 @@ class KOPrefs : public KPimPrefs
QColor mHolidayColor;
QColor mHighlightColor;
QColor mEventColor;
+ QColor mTodoDoneColor;
QColor mAgendaBgColor;
QColor mWorkingHoursColor;
QColor mTodoDueTodayColor;
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index 1b24f56..580dff2 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -1176,6 +1176,12 @@ void KOPrefsDialog::setupColorsTab()
&(KOPrefs::instance()->mEventColor),topFrame);
topLayout->addWidget(eventColor->label(),ii,0);
topLayout->addWidget(eventColor->button(),ii++,1);
+ eventColor =
+ addWidColor(i18n("Default todo done color:"),
+ &(KOPrefs::instance()->mTodoDoneColor),topFrame);
+ topLayout->addWidget(eventColor->label(),ii,0);
+ topLayout->addWidget(eventColor->button(),ii++,1);
+
// agenda view background color
KPrefsDialogWidColor *agendaBgColor =