author | Michael Krelin <hacker@klever.net> | 2008-01-28 23:33:00 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2008-01-28 23:33:00 (UTC) |
commit | 64a94e6b6ee261c21c68709134631a16b39a0256 (patch) (unidiff) | |
tree | 12e7693f1b665711c3487ae2779b2469ea8e1499 | |
parent | 1c5369f3785b118ff4d18c4940913b800dd201fb (diff) | |
download | kdepimpi-64a94e6b6ee261c21c68709134631a16b39a0256.zip kdepimpi-64a94e6b6ee261c21c68709134631a16b39a0256.tar.gz kdepimpi-64a94e6b6ee261c21c68709134631a16b39a0256.tar.bz2 |
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | korganizer/koagendaitem.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 0f9a38f..d38cb00 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp | |||
@@ -111,25 +111,26 @@ QString KOAgendaItem::getWhatsThisText() | |||
111 | void KOAgendaItem::initColor () | 111 | void KOAgendaItem::initColor () |
112 | { | 112 | { |
113 | if ( (mIncidence->typeID() == todoID ) && | 113 | if ( (mIncidence->typeID() == todoID ) && |
114 | ( !((static_cast<Todo*>(mIncidence))->isCompleted()) && | 114 | ( !((static_cast<Todo*>(mIncidence))->isCompleted()) && |
115 | ((static_cast<Todo*>(mIncidence))->dtDue().date() <= QDate::currentDate()) ) ) { | 115 | ((static_cast<Todo*>(mIncidence))->dtDue().date() <= QDate::currentDate()) ) ) { |
116 | if ( (static_cast<Todo*>(mIncidence))->dtDue() < (QDateTime)QDateTime::currentDateTime().date()) | 116 | if ( (static_cast<Todo*>(mIncidence))->dtDue() < (QDateTime)QDateTime::currentDateTime().date()) |
117 | mBackgroundColor = KOPrefs::instance()->mTodoOverdueColor ; | 117 | mBackgroundColor = KOPrefs::instance()->mTodoOverdueColor ; |
118 | else | 118 | else |
119 | mBackgroundColor = KOPrefs::instance()->mTodoDueTodayColor; | 119 | mBackgroundColor = KOPrefs::instance()->mTodoDueTodayColor; |
120 | } | 120 | } |
121 | else { | 121 | else { |
122 | QStringList categories = mIncidence->categories(); | 122 | QStringList categories = mIncidence->categories(); |
123 | QString cat = categories.first(); | 123 | QString cat; |
124 | if(!categories.isEmpty()) cat = categories.first(); | ||
124 | if (cat.isEmpty()) { | 125 | if (cat.isEmpty()) { |
125 | if ( (mIncidence->typeID() == todoID ) &&((static_cast<Todo*>(mIncidence))->isCompleted()) ) | 126 | if ( (mIncidence->typeID() == todoID ) &&((static_cast<Todo*>(mIncidence))->isCompleted()) ) |
126 | mBackgroundColor =KOPrefs::instance()->mTodoDoneColor; | 127 | mBackgroundColor =KOPrefs::instance()->mTodoDoneColor; |
127 | else | 128 | else |
128 | mBackgroundColor =KOPrefs::instance()->defaultColor( mIncidence->calID() ); | 129 | mBackgroundColor =KOPrefs::instance()->defaultColor( mIncidence->calID() ); |
129 | } else { | 130 | } else { |
130 | mBackgroundColor = *KOPrefs::instance()->categoryColor(cat); | 131 | mBackgroundColor = *KOPrefs::instance()->categoryColor(cat); |
131 | if ( (mIncidence->typeID() == todoID ) &&((static_cast<Todo*>(mIncidence))->isCompleted()) ) { | 132 | if ( (mIncidence->typeID() == todoID ) &&((static_cast<Todo*>(mIncidence))->isCompleted()) ) { |
132 | if ( mBackgroundColor == KOPrefs::instance()->mEventColor ) | 133 | if ( mBackgroundColor == KOPrefs::instance()->mEventColor ) |
133 | mBackgroundColor = KOPrefs::instance()->mTodoDoneColor; | 134 | mBackgroundColor = KOPrefs::instance()->mTodoDoneColor; |
134 | } | 135 | } |
135 | } | 136 | } |