summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/kincidenceformatter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp
index f8f40f1..4dfe16a 100644
--- a/libkcal/kincidenceformatter.cpp
+++ b/libkcal/kincidenceformatter.cpp
@@ -61,49 +61,51 @@ void KIncidenceFormatter::setEvent(Event *event)
61 if ( mColorMode == 2 ) { 61 if ( mColorMode == 2 ) {
62 mText +="<font color=\"#C00000\">"; 62 mText +="<font color=\"#C00000\">";
63 } 63 }
64 // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; 64 // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>";
65 if ( mode == 1 ) { 65 if ( mode == 1 ) {
66 addTag("h2",i18n( "Local: " ) +deTag(event->summary())); 66 addTag("h2",i18n( "Local: " ) +deTag(event->summary()));
67 } else { 67 } else {
68 addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); 68 addTag("h2",i18n( "Remote: " ) +deTag(event->summary()));
69 } 69 }
70 formatReadOnly(event); 70 formatReadOnly(event);
71 addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); 71 addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) );
72 if ( mColorMode ) 72 if ( mColorMode )
73 mText += "</font>"; 73 mText += "</font>";
74 } 74 }
75 if (event->cancelled ()) { 75 if (event->cancelled ()) {
76 mText +="<font color=\"#B00000\">"; 76 mText +="<font color=\"#B00000\">";
77 addTag("i",i18n("This event has been cancelled!")); 77 addTag("i",i18n("This event has been cancelled!"));
78 mText.append("<br>"); 78 mText.append("<br>");
79 mText += "</font>"; 79 mText += "</font>";
80 } 80 }
81 if (event->doesFloat()) { 81 if (event->doesFloat()) {
82 if (event->isMultiDay()) { 82 if (event->isMultiDay()) {
83 mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") 83 mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>")
84 .arg(event->dtStartDateStr(shortDate)) 84 .arg(event->dtStartDateStr(shortDate))
85 .arg(event->dtEndDateStr(shortDate))); 85 .arg(event->dtEndDateStr(shortDate)));
86 mText.append(i18n("<p><b>Duration:</b> %1 days</p>")
87 .arg(event->dtStart().daysTo(event->dtEnd())+1));
86 } else { 88 } else {
87 mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); 89 mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate )));
88 } 90 }
89 } else { 91 } else {
90 if (event->isMultiDay()) { 92 if (event->isMultiDay()) {
91 mText.append(i18n("<p><b>From:</b> %1</p> ") 93 mText.append(i18n("<p><b>From:</b> %1</p> ")
92 .arg(event->dtStartStr( shortDate))); 94 .arg(event->dtStartStr( shortDate)));
93 mText.append(i18n("<p><b>To:</b> %1</p>") 95 mText.append(i18n("<p><b>To:</b> %1</p>")
94 .arg(event->dtEndStr(shortDate))); 96 .arg(event->dtEndStr(shortDate)));
95 } else { 97 } else {
96 mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") 98 mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>")
97 .arg(event->dtStartTimeStr()) 99 .arg(event->dtStartTimeStr())
98 .arg(event->dtEndTimeStr())); 100 .arg(event->dtEndTimeStr()));
99 mText.append(i18n("<p><b>On:</b> %1</p> ") 101 mText.append(i18n("<p><b>On:</b> %1</p> ")
100 .arg(event->dtStartDateStr( shortDate ))); 102 .arg(event->dtStartDateStr( shortDate )));
101 } 103 }
102 } 104 }
103 if (!event->location().isEmpty()) { 105 if (!event->location().isEmpty()) {
104 addTag("b",i18n("Location: ")); 106 addTag("b",i18n("Location: "));
105 mText.append(deTag(event->location())+"<br>"); 107 mText.append(deTag(event->location())+"<br>");
106 } 108 }
107 109
108 if (event->doesRecur()) { 110 if (event->doesRecur()) {
109 111