summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventviewer.cpp16
-rw-r--r--korganizer/koeventviewerdialog.cpp3
2 files changed, 18 insertions, 1 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index 1fcc977..cee0466 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -357,12 +357,15 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
if (!event->location().isEmpty()) {
addTag("b",i18n("Location: "));
mText.append(event->location()+"<br>");
mMailSubject += i18n(" at ") + event->location();
}
+ if (event->hasStartDate()) {
+ mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer)));
+ }
if (event->hasDueDate()) {
mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer)));
mMailSubject += i18n(" - " )+event->dtDueStr( true );
}
addTag("b",i18n("Access: "));
mText.append(event->secrecyStr()+"<br>");
@@ -378,13 +381,24 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
mText.append(i18n("<p><i>%1 % completed</i></p>")
.arg(event->percentComplete()));
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())+"%] <br>");
+ }
+ QPtrList<Incidence> Relations = event->relations();
+ Incidence *to;
+ if ( Relations.first() )
+ addTag("b",i18n("Sub todos:<br>"));
+ for (to=Relations.first();to;to=Relations.next()) {
+ mText.append( to->summary()+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>");
+
+ }
setText(mText);
}
void KOEventViewer::formatCategories(Incidence *event)
{
if (!event->categoriesStr().isEmpty()) {
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp
index 772fd95..3979ed2 100644
--- a/korganizer/koeventviewerdialog.cpp
+++ b/korganizer/koeventviewerdialog.cpp
@@ -118,12 +118,15 @@ void KOEventViewerDialog::updateConfig()
}
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 )
{
if ( in->type() == "Event" )
setEvent( (Event*) in );
else if ( in->type() =="Todo" )