Diffstat (limited to 'libkcal/kincidenceformatter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libkcal/kincidenceformatter.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp index c52f2b3..6d07d4c 100644 --- a/libkcal/kincidenceformatter.cpp +++ b/libkcal/kincidenceformatter.cpp @@ -168,4 +168,12 @@ void KIncidenceFormatter::setTodo(Todo *event ) mText += "</font>"; } + if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { + mText +="<font color=\"#B00000\">"; + addTag("i", i18n("<p><i>Completed on %1</i></p>").arg( event->completedStr(shortDate) ) ); + mText += "</font>"; + } else { + mText.append(i18n("<p><i>%1 % completed</i></p>") + .arg(event->percentComplete())); + } if (event->cancelled ()) { mText +="<font color=\"#B00000\">"; @@ -185,13 +193,5 @@ void KIncidenceFormatter::setTodo(Todo *event ) .arg(QString::number(event->priority()))); - if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { - mText.append(i18n("<p><i>Completed on %1</i></p>") - .arg( event->completedStr() )); - } else { - mText.append(i18n("<p><i>%1 % completed</i></p>") - .arg(event->percentComplete())); - } - - addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() ); + addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() ); formatCategories(event); if (!event->description().isEmpty()) { |