summaryrefslogtreecommitdiffabout
path: root/libkcal/kincidenceformatter.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/kincidenceformatter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/kincidenceformatter.cpp18
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
@@ -167,6 +167,14 @@ void KIncidenceFormatter::setTodo(Todo *event )
if ( mColorMode )
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\">";
addTag("i",i18n("This todo has been cancelled!"));
@@ -184,15 +192,7 @@ void KIncidenceFormatter::setTodo(Todo *event )
mText.append(i18n("<p><b>Priority:</b> %2</p>")
.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()) {
addTag("p",i18n("<b>Details: </b>"));