summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventviewer.cpp94
-rw-r--r--korganizer/komonthview.cpp5
2 files changed, 59 insertions, 40 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);
}
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 65d6acf..b175f9a 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -642,7 +642,7 @@ void MonthViewCell::startUpdateCell()
int MonthViewCell::insertEvent(Event *event)
{
bool useToolTips = true;
-#ifndef DEKSTOP_VERSION
+#ifndef DESKTOP_VERSION
useToolTips = false;
#endif
QString mToolTipText;
@@ -774,8 +774,9 @@ int MonthViewCell::insertEvent(Event *event)
}
insertItem( item ,pos);
}
- if ( useToolTips )
+ if ( useToolTips ) {
mToolTip.append( mToolTipText );
+ }
return mdayCount;
}
void MonthViewCell::insertTodo(Todo *todo)