summaryrefslogtreecommitdiffabout
path: root/korganizer/koeventviewer.cpp
authorzautrix <zautrix>2005-04-15 09:18:49 (UTC)
committer zautrix <zautrix>2005-04-15 09:18:49 (UTC)
commitab47475f1b03a8c82f9b0388549a2618743f2a69 (patch) (side-by-side diff)
tree381622b3ceb94daf771a2697ee10f0cd6572e947 /korganizer/koeventviewer.cpp
parentacb5803cdda97ef1369388eb15eb669e2835c06a (diff)
downloadkdepimpi-ab47475f1b03a8c82f9b0388549a2618743f2a69.zip
kdepimpi-ab47475f1b03a8c82f9b0388549a2618743f2a69.tar.gz
kdepimpi-ab47475f1b03a8c82f9b0388549a2618743f2a69.tar.bz2
fixxx
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
@@ -311,11 +311,7 @@ void KOEventViewer::appendEvent(Event *event, int mode )
mText += "</font>";
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()) {
mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>")
@@ -331,14 +327,18 @@ void KOEventViewer::appendEvent(Event *event, int mode )
mText.append(i18n("<p><b>To:</b> %1</p>")
.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()) {
QString recurText = event->recurrence()->recurrenceText();
@@ -380,26 +380,35 @@ void KOEventViewer::appendEvent(Event *event, int mode )
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);
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 ( KOPrefs::instance()->mEVshowDetails ) {
+ if (!event->description().isEmpty()) {
+ addTag("p",i18n("<b>Details: </b>"));
+ addTag("p",deTag(event->description()));
+ }
}
setText(mText);
//QWhatsThis::add(this,mText);
@@ -449,11 +458,7 @@ void KOEventViewer::appendTodo(Todo *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->recurrence()->doesRecur()) {
@@ -468,7 +473,13 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer)));
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()) {
Alarm *alarm =event->alarms().first() ;
@@ -481,20 +492,30 @@ 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>"));
mText.append(deTag(event->relatedTo()->summary())+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>");
@@ -507,15 +528,12 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
mText.append( deTag(to->summary())+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>");
}
- 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);
}