summaryrefslogtreecommitdiffabout
path: root/libkcal
Side-by-side diff
Diffstat (limited to 'libkcal') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/kincidenceformatter.cpp63
1 files changed, 41 insertions, 22 deletions
diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp
index d67ad52..8ae5b46 100644
--- a/libkcal/kincidenceformatter.cpp
+++ b/libkcal/kincidenceformatter.cpp
@@ -77,8 +77,4 @@ void KIncidenceFormatter::setEvent(Event *event)
mText += "</font>";
}
- if (!event->location().isEmpty()) {
- addTag("b",i18n("Location: "));
- mText.append(deTag(event->location())+"<br>");
- }
if (event->doesFloat()) {
if (event->isMultiDay()) {
@@ -96,11 +92,15 @@ void KIncidenceFormatter::setEvent(Event *event)
.arg(event->dtEndStr(shortDate)));
} else {
- mText.append(i18n("<p><b>On:</b> %1</p> ")
- .arg(event->dtStartDateStr( shortDate )));
mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>")
.arg(event->dtStartTimeStr())
.arg(event->dtEndTimeStr()));
+ mText.append(i18n("<p><b>On:</b> %1</p> ")
+ .arg(event->dtStartDateStr( shortDate )));
}
}
+ if (!event->location().isEmpty()) {
+ addTag("b",i18n("Location: "));
+ mText.append(deTag(event->location())+"<br>");
+ }
if (event->recurrence()->doesRecur()) {
@@ -143,10 +143,4 @@ void KIncidenceFormatter::setEvent(Event *event)
// mText.append(event->secrecyStr()+"<br>");
formatCategories(event);
- if ( mDetails ) {
- if (!event->description().isEmpty()) {
- addTag("p",i18n("<b>Details: </b>"));
- addTag("p",deTag(event->description()));
- }
- }
formatReadOnly(event);
@@ -154,13 +148,27 @@ void KIncidenceFormatter::setEvent(Event *event)
if ( mCreated ) {
+#ifdef DESKTOP_VERSION
+ addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate ));
+#else
addTag("p",i18n("<b>Created: ") +" </b>");
addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate ));
+#endif
}
if ( mModified ) {
+#ifdef DESKTOP_VERSION
+ addTag("p",i18n("<b>Last modified: ") +" </b>"+KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ));
+#else
addTag("p",i18n("<b>Last modified: ") +" </b>");
addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ));
+#endif
}
+ if ( mDetails ) {
+ if (!event->description().isEmpty()) {
+ addTag("p",i18n("<b>Details: </b>"));
+ addTag("p",deTag(event->description()));
+ }
+ }
}
@@ -204,8 +212,4 @@ void KIncidenceFormatter::setTodo(Todo *event )
}
- if (!event->location().isEmpty()) {
- addTag("b",i18n("Location: "));
- mText.append(deTag(event->location())+"<br>");
- }
if (event->recurrence()->doesRecur()) {
@@ -223,4 +227,10 @@ void KIncidenceFormatter::setTodo(Todo *event )
mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(shortDate)));
}
+
+ if (!event->location().isEmpty()) {
+ addTag("b",i18n("Location: "));
+ mText.append(deTag(event->location())+"<br>");
+ }
+
mText.append(i18n("<p><b>Priority:</b> %2</p>")
.arg(QString::number(event->priority())));
@@ -237,22 +247,31 @@ void KIncidenceFormatter::setTodo(Todo *event )
addTag("p",i18n("<b>Access: </b>") +event->secrecyStr() );
formatCategories(event);
- if ( mDetails ) {
- if (!event->description().isEmpty()) {
- addTag("p",i18n("<b>Details: </b>"));
- addTag("p",deTag(event->description()));
- }
- }
+
formatReadOnly(event);
formatAttendees(event);
if ( mCreated ) {
+#ifdef DESKTOP_VERSION
+ addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate ));
+#else
addTag("p",i18n("<b>Created: ") +" </b>");
addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate ));
+#endif
}
if ( mModified ) {
+#ifdef DESKTOP_VERSION
+ addTag("p",i18n("<b>Last modified: ") +" </b>"+KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ));
+#else
addTag("p",i18n("<b>Last modified: ") +" </b>");
addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ));
+#endif
}
+ if ( mDetails ) {
+ if (!event->description().isEmpty()) {
+ addTag("p",i18n("<b>Details: </b>"));
+ addTag("p",deTag(event->description()));
+ }
+ }
}