From ab47475f1b03a8c82f9b0388549a2618743f2a69 Mon Sep 17 00:00:00 2001 From: zautrix Date: Fri, 15 Apr 2005 09:18:49 +0000 Subject: fixxx --- (limited to 'libkcal/kincidenceformatter.cpp') diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp index d67ad52..8ae5b46 100644 --- a/libkcal/kincidenceformatter.cpp +++ b/libkcal/kincidenceformatter.cpp @@ -76,10 +76,6 @@ void KIncidenceFormatter::setEvent(Event *event) mText.append("
"); mText += ""; } - if (!event->location().isEmpty()) { - addTag("b",i18n("Location: ")); - mText.append(deTag(event->location())+"
"); - } if (event->doesFloat()) { if (event->isMultiDay()) { mText.append(i18n("

From: %1

To: %2

") @@ -95,13 +91,17 @@ void KIncidenceFormatter::setEvent(Event *event) mText.append(i18n("

To: %1

") .arg(event->dtEndStr(shortDate))); } else { - mText.append(i18n("

On: %1

") - .arg(event->dtStartDateStr( shortDate ))); mText.append(i18n("

From: %1 To: %2

") .arg(event->dtStartTimeStr()) .arg(event->dtEndTimeStr())); + mText.append(i18n("

On: %1

") + .arg(event->dtStartDateStr( shortDate ))); } } + if (!event->location().isEmpty()) { + addTag("b",i18n("Location: ")); + mText.append(deTag(event->location())+"
"); + } if (event->recurrence()->doesRecur()) { @@ -142,26 +142,34 @@ void KIncidenceFormatter::setEvent(Event *event) addTag("p",i18n("Access: ") +event->secrecyStr() ); // mText.append(event->secrecyStr()+"
"); formatCategories(event); - if ( mDetails ) { - if (!event->description().isEmpty()) { - addTag("p",i18n("Details: ")); - addTag("p",deTag(event->description())); - } - } formatReadOnly(event); formatAttendees(event); if ( mCreated ) { +#ifdef DESKTOP_VERSION + addTag("p",i18n("Created: ") +" "+KGlobal::locale()->formatDateTime( event->created(), shortDate )); +#else addTag("p",i18n("Created: ") +" "); addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); +#endif } if ( mModified ) { +#ifdef DESKTOP_VERSION + addTag("p",i18n("Last modified: ") +" "+KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); +#else addTag("p",i18n("Last modified: ") +" "); addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); +#endif } + if ( mDetails ) { + if (!event->description().isEmpty()) { + addTag("p",i18n("Details: ")); + addTag("p",deTag(event->description())); + } + } } @@ -203,11 +211,7 @@ void KIncidenceFormatter::setTodo(Todo *event ) mText += ""; } - if (!event->location().isEmpty()) { - addTag("b",i18n("Location: ")); - mText.append(deTag(event->location())+"
"); - } - + if (event->recurrence()->doesRecur()) { QString recurText = event->recurrence()->recurrenceText(); @@ -222,6 +226,12 @@ void KIncidenceFormatter::setTodo(Todo *event ) if (event->hasDueDate()) { mText.append(i18n("

Due on: %1

").arg(event->dtDueStr(shortDate))); } + + if (!event->location().isEmpty()) { + addTag("b",i18n("Location: ")); + mText.append(deTag(event->location())+"
"); + } + mText.append(i18n("

Priority: %2

") .arg(QString::number(event->priority()))); @@ -236,24 +246,33 @@ void KIncidenceFormatter::setTodo(Todo *event ) addTag("p",i18n("Access: ") +event->secrecyStr() ); formatCategories(event); - if ( mDetails ) { - if (!event->description().isEmpty()) { - addTag("p",i18n("Details: ")); - addTag("p",deTag(event->description())); - } - } + formatReadOnly(event); formatAttendees(event); if ( mCreated ) { +#ifdef DESKTOP_VERSION + addTag("p",i18n("Created: ") +" "+KGlobal::locale()->formatDateTime( event->created(), shortDate )); +#else addTag("p",i18n("Created: ") +" "); addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); +#endif } if ( mModified ) { +#ifdef DESKTOP_VERSION + addTag("p",i18n("Last modified: ") +" "+KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); +#else addTag("p",i18n("Last modified: ") +" "); addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); +#endif } + if ( mDetails ) { + if (!event->description().isEmpty()) { + addTag("p",i18n("Details: ")); + addTag("p",deTag(event->description())); + } + } } void KIncidenceFormatter::setJournal(Journal* ) -- cgit v0.9.0.2