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 'korganizer/koeventviewer.cpp') diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 36a2947..7dc1880 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp @@ -347,6 +347,16 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) mText += ""; } mMailSubject += i18n( "Todo " )+ event->summary(); + + if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { + mText +=""; + addTag("i", i18n("

Completed on %1

").arg( event->completedStr(KOPrefs::instance()->mShortDateInViewer) ) ); + mText += "
"; + } else { + mText.append(i18n("

%1 % completed

") + .arg(event->percentComplete())); + } + if (event->cancelled ()) { mText +=""; addTag("i",i18n("This todo has been cancelled!")); @@ -379,14 +389,6 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) 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())); - } - formatReadOnly(event); formatAttendees(event); if ( event->relatedTo() ) { -- cgit v0.9.0.2