-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 16 | ||||
-rw-r--r-- | korganizer/koeventviewer.cpp | 5 | ||||
-rw-r--r-- | korganizer/koeventviewerdialog.cpp | 1 | ||||
-rw-r--r-- | libkcal/kincidenceformatter.cpp | 16 | ||||
-rw-r--r-- | libkcal/todo.cpp | 7 |
6 files changed, 37 insertions, 10 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 0538511..eec0b38 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1205,3 +1205,3 @@ | |||
1205 | { "Display all flat","Zeige alle flach" }, | 1205 | { "Display all flat","Zeige alle flach" }, |
1206 | { "","" }, | 1206 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, |
1207 | { "","" }, | 1207 | { "","" }, |
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index e0a1a21..1864e22 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -1151,3 +1151,3 @@ void KOAgendaView::fillAgenda() | |||
1151 | 1151 | ||
1152 | if ( ! todo->hasDueDate() ) continue; // todo shall not be displayed if it has no date | 1152 | if ( ! todo->hasDueDate() && !todo->hasCompletedDate()) continue; // todo shall not be displayed if it has no date |
1153 | 1153 | ||
@@ -1158,5 +1158,5 @@ void KOAgendaView::fillAgenda() | |||
1158 | 1158 | ||
1159 | if ( ((todo->dtDue().date() == currentDate) && !overdue) || | 1159 | if ( ((todo->dtDue().date() == currentDate) && !overdue) || ( todo->hasCompletedDate() && todo->completed().date() == currentDate )|| |
1160 | ((currentDate == today) && overdue) ) { | 1160 | ((currentDate == today) && overdue) ) { |
1161 | if ( todo->doesFloat() || overdue ) { // Todo has no due-time set or is already overdue | 1161 | if ( (todo->doesFloat() || overdue ) && !todo->hasCompletedDate() ) { // Todo has no due-time set or is already overdue |
1162 | if ( KOPrefs::instance()->mShowTodoInAgenda ) | 1162 | if ( KOPrefs::instance()->mShowTodoInAgenda ) |
@@ -1165,4 +1165,10 @@ void KOAgendaView::fillAgenda() | |||
1165 | else { | 1165 | else { |
1166 | 1166 | QDateTime dt; | |
1167 | int endY = mAgenda->timeToY(todo->dtDue().time()) - 1; | 1167 | if ( todo->hasCompletedDate() ) |
1168 | dt = todo->completed(); | ||
1169 | else | ||
1170 | dt = todo->dtDue();; | ||
1171 | |||
1172 | |||
1173 | int endY = mAgenda->timeToY(dt.time()) - 1; | ||
1168 | int hi = (18/KOPrefs::instance()->mHourSize); | 1174 | int hi = (18/KOPrefs::instance()->mHourSize); |
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 2f0fa9e..36a2947 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -381,4 +381,9 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) | |||
381 | 381 | ||
382 | if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { | ||
383 | mText.append(i18n("<p><i>Completed on %1</i></p>") | ||
384 | .arg( event->completedStr() )); | ||
385 | } else { | ||
382 | mText.append(i18n("<p><i>%1 % completed</i></p>") | 386 | mText.append(i18n("<p><i>%1 % completed</i></p>") |
383 | .arg(event->percentComplete())); | 387 | .arg(event->percentComplete())); |
388 | } | ||
384 | 389 | ||
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index 3979ed2..f6f7258 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp | |||
@@ -223,2 +223,3 @@ void KOEventViewerDialog::showIncidence() | |||
223 | ((Todo*)mIncidence)->setCompleted( true ); | 223 | ((Todo*)mIncidence)->setCompleted( true ); |
224 | ((Todo*)mIncidence)->setCompleted(QDateTime::currentDateTime() ); | ||
224 | hide(); | 225 | hide(); |
diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp index 2c45f21..c52f2b3 100644 --- a/libkcal/kincidenceformatter.cpp +++ b/libkcal/kincidenceformatter.cpp | |||
@@ -185,5 +185,11 @@ void KIncidenceFormatter::setTodo(Todo *event ) | |||
185 | .arg(QString::number(event->priority()))); | 185 | .arg(QString::number(event->priority()))); |
186 | 186 | ||
187 | if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { | ||
188 | mText.append(i18n("<p><i>Completed on %1</i></p>") | ||
189 | .arg( event->completedStr() )); | ||
190 | } else { | ||
187 | mText.append(i18n("<p><i>%1 % completed</i></p>") | 191 | mText.append(i18n("<p><i>%1 % completed</i></p>") |
188 | .arg(event->percentComplete())); | 192 | .arg(event->percentComplete())); |
193 | } | ||
194 | |||
189 | addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() ); | 195 | addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() ); |
@@ -248,2 +254,3 @@ void KIncidenceFormatter::formatAttendees(Incidence *event) | |||
248 | QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); | 254 | QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); |
255 | QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small); | ||
249 | addTag("h3",i18n("Organizer")); | 256 | addTag("h3",i18n("Organizer")); |
@@ -308,4 +315,7 @@ void KIncidenceFormatter::formatAttendees(Incidence *event) | |||
308 | if (iconPath) { | 315 | if (iconPath) { |
309 | mText += "<a href=\"mailto:" + a->name() +" "+ "<" + a->email() + ">" + "\">"; | 316 | mText += "<a href=\"mailto:" + a->name() +" "+ "<" + a->email() + ">" + "\">"; |
310 | mText += "<IMG src=\"" + iconPath + "\">"; | 317 | if ( a->RSVP() ) |
318 | mText += "<IMG src=\"" + iconPath + "\">"; | ||
319 | else | ||
320 | mText += "<IMG src=\"" + NOiconPath + "\">"; | ||
311 | mText += "</a>\n"; | 321 | 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) | |||
290 | if (completed) mPercentComplete = 100; | 290 | if (completed) mPercentComplete = 100; |
291 | else mPercentComplete = 0; | 291 | else { |
292 | mPercentComplete = 0; | ||
293 | mHasCompletedDate = false; | ||
294 | } | ||
292 | updated(); | 295 | updated(); |
@@ -325,2 +328,4 @@ void Todo::setPercentComplete(int v) | |||
325 | mPercentComplete = v; | 328 | mPercentComplete = v; |
329 | if ( v != 100 ) | ||
330 | mHasCompletedDate = false; | ||
326 | updated(); | 331 | updated(); |