author | zautrix <zautrix> | 2005-01-30 01:41:12 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-30 01:41:12 (UTC) |
commit | 949c6e28c83668176fd9c29e12668322c6ae627f (patch) (side-by-side diff) | |
tree | f5b21c9fe6d9f1906a7bca6899b44bcf359f2cc6 /korganizer | |
parent | a8fae20ad7bcb59df9a603c88accf3a10401c2f9 (diff) | |
download | kdepimpi-949c6e28c83668176fd9c29e12668322c6ae627f.zip kdepimpi-949c6e28c83668176fd9c29e12668322c6ae627f.tar.gz kdepimpi-949c6e28c83668176fd9c29e12668322c6ae627f.tar.bz2 |
bugs
-rw-r--r-- | korganizer/koagendaview.cpp | 16 | ||||
-rw-r--r-- | korganizer/koeventviewer.cpp | 5 | ||||
-rw-r--r-- | korganizer/koeventviewerdialog.cpp | 1 |
3 files changed, 17 insertions, 5 deletions
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() - if ( ! todo->hasDueDate() ) continue; // todo shall not be displayed if it has no date + if ( ! todo->hasDueDate() && !todo->hasCompletedDate()) continue; // todo shall not be displayed if it has no date @@ -1158,5 +1158,5 @@ void KOAgendaView::fillAgenda() - if ( ((todo->dtDue().date() == currentDate) && !overdue) || + if ( ((todo->dtDue().date() == currentDate) && !overdue) || ( todo->hasCompletedDate() && todo->completed().date() == currentDate )|| ((currentDate == today) && overdue) ) { - if ( todo->doesFloat() || overdue ) { // Todo has no due-time set or is already overdue + if ( (todo->doesFloat() || overdue ) && !todo->hasCompletedDate() ) { // Todo has no due-time set or is already overdue if ( KOPrefs::instance()->mShowTodoInAgenda ) @@ -1165,4 +1165,10 @@ void KOAgendaView::fillAgenda() else { - - int endY = mAgenda->timeToY(todo->dtDue().time()) - 1; + QDateTime dt; + if ( todo->hasCompletedDate() ) + dt = todo->completed(); + else + dt = todo->dtDue();; + + + int endY = mAgenda->timeToY(dt.time()) - 1; 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 ) + 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())); + } 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() ((Todo*)mIncidence)->setCompleted( true ); + ((Todo*)mIncidence)->setCompleted(QDateTime::currentDateTime() ); hide(); |