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
@@ -78,6 +78,2 @@ void KIncidenceFormatter::setEvent(Event *event)
}
- if (!event->location().isEmpty()) {
- addTag("b",i18n("Location: "));
- mText.append(deTag(event->location())+"<br>");
- }
if (event->doesFloat()) {
@@ -97,4 +93,2 @@ void KIncidenceFormatter::setEvent(Event *event)
} 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>")
@@ -102,4 +96,10 @@ void KIncidenceFormatter::setEvent(Event *event)
.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>");
+ }
@@ -144,8 +144,2 @@ void KIncidenceFormatter::setEvent(Event *event)
formatCategories(event);
- if ( mDetails ) {
- if (!event->description().isEmpty()) {
- addTag("p",i18n("<b>Details: </b>"));
- addTag("p",deTag(event->description()));
- }
- }
@@ -155,4 +149,8 @@ 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
@@ -160,6 +158,16 @@ void KIncidenceFormatter::setEvent(Event *event)
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()));
+ }
+ }
@@ -205,6 +213,2 @@ void KIncidenceFormatter::setTodo(Todo *event )
- if (!event->location().isEmpty()) {
- addTag("b",i18n("Location: "));
- mText.append(deTag(event->location())+"<br>");
- }
@@ -224,2 +228,8 @@ void KIncidenceFormatter::setTodo(Todo *event )
}
+
+ if (!event->location().isEmpty()) {
+ addTag("b",i18n("Location: "));
+ mText.append(deTag(event->location())+"<br>");
+ }
+
mText.append(i18n("<p><b>Priority:</b> %2</p>")
@@ -238,8 +248,3 @@ void KIncidenceFormatter::setTodo(Todo *event )
formatCategories(event);
- if ( mDetails ) {
- if (!event->description().isEmpty()) {
- addTag("p",i18n("<b>Details: </b>"));
- addTag("p",deTag(event->description()));
- }
- }
+
formatReadOnly(event);
@@ -247,4 +252,8 @@ void KIncidenceFormatter::setTodo(Todo *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
@@ -252,6 +261,16 @@ void KIncidenceFormatter::setTodo(Todo *event )
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()));
+ }
+ }
}