From a423c235d0cbc39292102042ed8f4a953e0e37f9 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sat, 15 Jan 2005 01:19:32 +0000 Subject: better todo info --- diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index da33d12..ccebf58 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt @@ -7,6 +7,7 @@ Fixed that tooltips were not updated after moving an item in agenda view. Fixed a bug in sorting start date for recurring events in list view. Changed the left button in todo viewer from "Agenda" to "Set completed". This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View. +Added more info in the todo viewer: Startdate, parent/sub todos. KA/Pi: diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 1fcc977..cee0466 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp @@ -360,6 +360,9 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) mText.append(event->location()+"
"); mMailSubject += i18n(" at ") + event->location(); } + if (event->hasStartDate()) { + mText.append(i18n("

Start on: %1

").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer))); + } if (event->hasDueDate()) { mText.append(i18n("

Due on: %1

").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); mMailSubject += i18n(" - " )+event->dtDueStr( true ); @@ -381,7 +384,18 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) formatReadOnly(event); formatAttendees(event); - + if ( event->relatedTo() ) { + addTag("b",i18n("Parent todo: ")); + mText.append(event->relatedTo()->summary()+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%]
"); + } + QPtrList Relations = event->relations(); + Incidence *to; + if ( Relations.first() ) + addTag("b",i18n("Sub todos:
")); + for (to=Relations.first();to;to=Relations.next()) { + mText.append( to->summary()+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]
"); + + } setText(mText); } diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index 772fd95..3979ed2 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp @@ -121,6 +121,9 @@ void KOEventViewerDialog::setEvent(Event *event) mEventViewer->setEvent(event); mIncidence = event; findButton( Close )->setFocus(); + if ( !mSyncMode ) { + findButton( User1 )->setText( i18n("Agenda")); + } } void KOEventViewerDialog::setIncidence(Incidence *in ) { -- cgit v0.9.0.2