summaryrefslogtreecommitdiffabout
path: root/libkcal
Side-by-side diff
Diffstat (limited to 'libkcal') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/kincidenceformatter.cpp10
-rw-r--r--libkcal/todo.cpp7
2 files changed, 16 insertions, 1 deletions
diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp
index 2c45f21..c52f2b3 100644
--- a/libkcal/kincidenceformatter.cpp
+++ b/libkcal/kincidenceformatter.cpp
@@ -186,4 +186,10 @@ void KIncidenceFormatter::setTodo(Todo *event )
+ 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() );
@@ -248,2 +254,3 @@ void KIncidenceFormatter::formatAttendees(Incidence *event)
QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small);
+ QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small);
addTag("h3",i18n("Organizer"));
@@ -309,3 +316,6 @@ void KIncidenceFormatter::formatAttendees(Incidence *event)
mText += "<a href=\"mailto:" + a->name() +" "+ "<" + a->email() + ">" + "\">";
+ if ( a->RSVP() )
mText += "<IMG src=\"" + iconPath + "\">";
+ else
+ mText += "<IMG src=\"" + NOiconPath + "\">";
mText += "</a>\n";
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index 3d2de61..7362bdf 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -290,3 +290,6 @@ void Todo::setCompleted(bool completed)
if (completed) mPercentComplete = 100;
- else mPercentComplete = 0;
+ else {
+ mPercentComplete = 0;
+ mHasCompletedDate = false;
+ }
updated();
@@ -325,2 +328,4 @@ void Todo::setPercentComplete(int v)
mPercentComplete = v;
+ if ( v != 100 )
+ mHasCompletedDate = false;
updated();