-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 | |||
@@ -305,48 +305,50 @@ void KOEventViewer::appendEvent(Event *event, int mode ) | |||
305 | if ( mode == 1 ) { | 305 | if ( mode == 1 ) { |
306 | addTag("h2",i18n( "Local: " ) +deTag(event->summary())); | 306 | addTag("h2",i18n( "Local: " ) +deTag(event->summary())); |
307 | } else { | 307 | } else { |
308 | addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); | 308 | addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); |
309 | } | 309 | } |
310 | formatReadOnly(event); | 310 | formatReadOnly(event); |
311 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); | 311 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); |
312 | if ( mColorMode ) | 312 | if ( mColorMode ) |
313 | mText += "</font>"; | 313 | mText += "</font>"; |
314 | } | 314 | } |
315 | mMailSubject += i18n( "Meeting " )+ event->summary(); | 315 | mMailSubject += i18n( "Meeting " )+ event->summary(); |
316 | if (event->cancelled ()) { | 316 | if (event->cancelled ()) { |
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()) |
341 | .arg(event->dtEndTimeStr())); | 343 | .arg(event->dtEndTimeStr())); |
342 | mText.append(i18n("<p><b>On:</b> %1</p> ") | 344 | mText.append(i18n("<p><b>On:</b> %1</p> ") |
343 | .arg(event->dtStartDateStr( shortDate ))); | 345 | .arg(event->dtStartDateStr( shortDate ))); |
344 | } | 346 | } |
345 | } | 347 | } |
346 | if (!event->location().isEmpty()) { | 348 | if (!event->location().isEmpty()) { |
347 | addTag("p","<b>"+i18n("Location: ")+"</b>"+ deTag(event->location() ) ); | 349 | addTag("p","<b>"+i18n("Location: ")+"</b>"+ deTag(event->location() ) ); |
348 | mMailSubject += i18n(" at ") + event->location(); | 350 | mMailSubject += i18n(" at ") + event->location(); |
349 | } | 351 | } |
350 | if (event->doesRecur()) { | 352 | if (event->doesRecur()) { |
351 | 353 | ||
352 | QString recurText = event->recurrenceText(); | 354 | QString recurText = event->recurrenceText(); |
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 8d06040..610aae6 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -716,50 +716,55 @@ int MonthViewCell::insertEvent(Event *event) | |||
716 | prefix ="->" ;multiday = 1; | 716 | prefix ="->" ;multiday = 1; |
717 | } | 717 | } |
718 | else { | 718 | else { |
719 | int days = event->dtStart().date().daysTo ( event->dtEnd().date() ); | 719 | int days = event->dtStart().date().daysTo ( event->dtEnd().date() ); |
720 | if ( event->recursOn( mDate.addDays( -days)) ) { | 720 | if ( event->recursOn( mDate.addDays( -days)) ) { |
721 | prefix ="<-" ;multiday = 3; | 721 | prefix ="<-" ;multiday = 3; |
722 | } | 722 | } |
723 | } | 723 | } |
724 | 724 | ||
725 | } else { | 725 | } else { |
726 | if (mDate == event->dtStart().date()) { | 726 | if (mDate == event->dtStart().date()) { |
727 | prefix ="->" ;multiday = 1; | 727 | prefix ="->" ;multiday = 1; |
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 | } |
754 | } | 759 | } |
755 | if ( useToolTips && ! event->location().isEmpty() ) { | 760 | if ( useToolTips && ! event->location().isEmpty() ) { |
756 | mToolTipText += " (" + event->location() +")"; | 761 | mToolTipText += " (" + event->location() +")"; |
757 | } | 762 | } |
758 | MonthViewItem *item ; | 763 | MonthViewItem *item ; |
759 | 764 | ||
760 | if ( mAvailItemList.count() ) { | 765 | if ( mAvailItemList.count() ) { |
761 | item = mAvailItemList.first(); | 766 | item = mAvailItemList.first(); |
762 | mAvailItemList.remove( item ); | 767 | mAvailItemList.remove( item ); |
763 | item->recycle( event, text ); | 768 | item->recycle( event, text ); |
764 | } else { | 769 | } else { |
765 | item = new MonthViewItem( event, text ); | 770 | item = new MonthViewItem( event, text ); |