summaryrefslogtreecommitdiffabout
path: root/korganizer/koeventviewer.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koeventviewer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventviewer.cpp94
1 files changed, 56 insertions, 38 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index bdad248..fefc778 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -312,9 +312,5 @@ void KOEventViewer::appendEvent(Event *event, int mode )
mMailSubject += i18n("(cancelled)");
}
- if (!event->location().isEmpty()) {
- addTag("b",i18n("Location: "));
- mText.append(deTag(event->location())+"<br>");
- mMailSubject += i18n(" at ") + event->location();
- }
+
if (event->doesFloat()) {
if (event->isMultiDay()) {
@@ -332,12 +328,16 @@ void KOEventViewer::appendEvent(Event *event, int mode )
.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>");
+ mMailSubject += i18n(" at ") + event->location();
+ }
if (event->recurrence()->doesRecur()) {
@@ -381,10 +381,5 @@ void KOEventViewer::appendEvent(Event *event, int mode )
- if ( KOPrefs::instance()->mEVshowDetails ) {
- if (!event->description().isEmpty()) {
- addTag("p",i18n("<b>Details: </b>"));
- addTag("p",deTag(event->description()));
- }
- }
+
formatCategories(event);
@@ -393,12 +388,26 @@ void KOEventViewer::appendEvent(Event *event, int mode )
if ( KOPrefs::instance()->mEVshowCreated ) {
+#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 ( KOPrefs::instance()->mEVshowChanged ) {
+#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 ( KOPrefs::instance()->mEVshowDetails ) {
+ if (!event->description().isEmpty()) {
+ addTag("p",i18n("<b>Details: </b>"));
+ addTag("p",deTag(event->description()));
+ }
}
setText(mText);
@@ -450,9 +459,5 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
}
- if (!event->location().isEmpty()) {
- addTag("b",i18n("Location: "));
- mText.append(deTag(event->location())+"<br>");
- mMailSubject += i18n(" at ") + event->location();
- }
+
if (event->recurrence()->doesRecur()) {
@@ -469,5 +474,11 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
mMailSubject += i18n(" - " )+event->dtDueStr( true );
}
-
+ if (!event->location().isEmpty()) {
+ addTag("b",i18n("Location: "));
+ mText.append(deTag(event->location())+"<br>");
+ mMailSubject += i18n(" at ") + event->location();
+ }
+ mText.append(i18n("<p><b>Priority:</b> %2</p>")
+ .arg(QString::number(event->priority())));
if (event->isAlarmEnabled()) {
@@ -482,18 +493,28 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
addTag("b",i18n("Access: "));
mText.append(event->secrecyStr()+"<br>");
- if ( KOPrefs::instance()->mEVshowDetails ) {
- if (!event->description().isEmpty()) {
- addTag("p",i18n("<b>Details: </b>"));
- addTag("p",deTag(event->description()));
- }
- }
formatCategories(event);
- mText.append(i18n("<p><b>Priority:</b> %2</p>")
- .arg(QString::number(event->priority())));
-
formatReadOnly(event);
formatAttendees(event);
+
+ if ( KOPrefs::instance()->mEVshowCreated ) {
+#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 ( KOPrefs::instance()->mEVshowChanged ) {
+#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 ( event->relatedTo() ) {
addTag("b",i18n("Parent todo:<br>"));
@@ -508,13 +529,10 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
}
- if ( KOPrefs::instance()->mEVshowCreated ) {
- addTag("p",i18n("<b>Created: ") +" </b>");
- addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate ));
-
- }
- if ( KOPrefs::instance()->mEVshowChanged ) {
- addTag("p",i18n("<b>Last modified: ") +" </b>");
- addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ));
-
+
+ if ( KOPrefs::instance()->mEVshowDetails ) {
+ if (!event->description().isEmpty()) {
+ addTag("p",i18n("<b>Details: </b>"));
+ addTag("p",deTag(event->description()));
+ }
}
setText(mText);