-rw-r--r-- | korganizer/koeventviewer.cpp | 2 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index db695f5..976ee2c 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -317,24 +317,26 @@ void KOEventViewer::appendEvent(Event *event, int mode ) | |||
317 | mText +="<font color=\"#B00000\">"; | 317 | mText +="<font color=\"#B00000\">"; |
318 | addTag("i",i18n("This event has been cancelled!")); | 318 | addTag("i",i18n("This event has been cancelled!")); |
319 | mText.append("<br>"); | 319 | mText.append("<br>"); |
320 | mText += "</font>"; | 320 | mText += "</font>"; |
321 | mMailSubject += i18n("(cancelled)"); | 321 | mMailSubject += i18n("(cancelled)"); |
322 | } | 322 | } |
323 | 323 | ||
324 | if (event->doesFloat()) { | 324 | if (event->doesFloat()) { |
325 | if (event->isMultiDay()) { | 325 | if (event->isMultiDay()) { |
326 | mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") | 326 | mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") |
327 | .arg(event->dtStartDateStr(shortDate)) | 327 | .arg(event->dtStartDateStr(shortDate)) |
328 | .arg(event->dtEndDateStr(shortDate))); | 328 | .arg(event->dtEndDateStr(shortDate))); |
329 | mText.append(i18n("<p><b>Duration:</b> %1 days</p>") | ||
330 | .arg(event->dtStart().daysTo(event->dtEnd())+1)); | ||
329 | } else { | 331 | } else { |
330 | mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); | 332 | mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); |
331 | } | 333 | } |
332 | } else { | 334 | } else { |
333 | if (event->isMultiDay()) { | 335 | if (event->isMultiDay()) { |
334 | mText.append(i18n("<p><b>From:</b> %1</p> ") | 336 | mText.append(i18n("<p><b>From:</b> %1</p> ") |
335 | .arg(event->dtStartStr( shortDate))); | 337 | .arg(event->dtStartStr( shortDate))); |
336 | mText.append(i18n("<p><b>To:</b> %1</p>") | 338 | mText.append(i18n("<p><b>To:</b> %1</p>") |
337 | .arg(event->dtEndStr(shortDate))); | 339 | .arg(event->dtEndStr(shortDate))); |
338 | } else { | 340 | } else { |
339 | mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") | 341 | mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") |
340 | .arg(event->dtStartTimeStr()) | 342 | .arg(event->dtStartTimeStr()) |
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 8d06040..610aae6 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -728,26 +728,31 @@ int MonthViewCell::insertEvent(Event *event) | |||
728 | } else if (mDate == event->dtEnd().date()) { | 728 | } else if (mDate == event->dtEnd().date()) { |
729 | prefix ="<-" ;multiday = 3; | 729 | prefix ="<-" ;multiday = 3; |
730 | } | 730 | } |
731 | } | 731 | } |
732 | if ( !event->doesFloat() ) { | 732 | if ( !event->doesFloat() ) { |
733 | if ( mDate == event->dtStart().date () ) | 733 | if ( mDate == event->dtStart().date () ) |
734 | time = KGlobal::locale()->formatTime(event->dtStart().time())+" "; | 734 | time = KGlobal::locale()->formatTime(event->dtStart().time())+" "; |
735 | else if ( mDate == event->dtEnd().date () ) | 735 | else if ( mDate == event->dtEnd().date () ) |
736 | time = KGlobal::locale()->formatTime(event->dtEnd().time())+" "; | 736 | time = KGlobal::locale()->formatTime(event->dtEnd().time())+" "; |
737 | 737 | ||
738 | } | 738 | } |
739 | text = time + event->summary(); | 739 | text = time + event->summary(); |
740 | if ( useToolTips ) | 740 | if ( useToolTips ) { |
741 | mToolTipText += prefix + text; | 741 | mToolTipText += prefix + text; |
742 | if ( event->doesFloat() ) { | ||
743 | mToolTipText += i18n(" (Duration: %1 days)" ).arg ( event->dtStart().daysTo(event->dtEnd())+1); | ||
744 | |||
745 | } | ||
746 | } | ||
742 | } else { | 747 | } else { |
743 | if (event->doesFloat()) { | 748 | if (event->doesFloat()) { |
744 | text = event->summary(); | 749 | text = event->summary(); |
745 | if ( useToolTips ) | 750 | if ( useToolTips ) |
746 | mToolTipText += text; | 751 | mToolTipText += text; |
747 | } | 752 | } |
748 | else { | 753 | else { |
749 | text = KGlobal::locale()->formatTime(event->dtStart().time()); | 754 | text = KGlobal::locale()->formatTime(event->dtStart().time()); |
750 | text += " " + event->summary(); | 755 | text += " " + event->summary(); |
751 | if ( useToolTips ) | 756 | if ( useToolTips ) |
752 | mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); | 757 | mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); |
753 | } | 758 | } |