From 446ea98a9f6550c4a3e64bcfc6aab8e8b58776e8 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sun, 30 Jan 2005 10:57:34 +0000 Subject: bugs from last commit fixed --- (limited to 'libkcal/kincidenceformatter.cpp') 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 += ""; } + if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { + mText +=""; + addTag("i", i18n("

Completed on %1

").arg( event->completedStr(shortDate) ) ); + mText += "
"; + } else { + mText.append(i18n("

%1 % completed

") + .arg(event->percentComplete())); + } if (event->cancelled ()) { mText +=""; addTag("i",i18n("This todo has been cancelled!")); @@ -184,15 +192,7 @@ void KIncidenceFormatter::setTodo(Todo *event ) mText.append(i18n("

Priority: %2

") .arg(QString::number(event->priority()))); - if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { - mText.append(i18n("

Completed on %1

") - .arg( event->completedStr() )); - } else { - mText.append(i18n("

%1 % completed

") - .arg(event->percentComplete())); - } - - addTag("p",i18n("Access: ") +event->secrecyStr() ); + addTag("p",i18n("Access: ") +event->secrecyStr() ); formatCategories(event); if (!event->description().isEmpty()) { addTag("p",i18n("Details: ")); -- cgit v0.9.0.2