summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/komonthview.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 610aae6..85e9166 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -732,22 +732,30 @@ int MonthViewCell::insertEvent(Event *event)
if ( !event->doesFloat() ) {
if ( mDate == event->dtStart().date () )
time = KGlobal::locale()->formatTime(event->dtStart().time())+" ";
else if ( mDate == event->dtEnd().date () )
time = KGlobal::locale()->formatTime(event->dtEnd().time())+" ";
}
text = time + event->summary();
- if ( useToolTips ) {
- mToolTipText += prefix + text;
+
+ int dur = 0;
if ( event->doesFloat() ) {
- mToolTipText += i18n(" (Duration: %1 days)" ).arg ( event->dtStart().daysTo(event->dtEnd())+1);
+ dur = event->dtStart().daysTo(event->dtEnd())+1;
}
+ if ( useToolTips ) {
+ mToolTipText += prefix + text;
+ if ( dur ) {
+ mToolTipText += i18n(" (Duration: %1 days)" ).arg ( dur );
+ }
+ }
+ if ( dur ) {
+ text += " ("+ QString::number( dur ) + i18n(" days" ) + ")";
}
} else {
if (event->doesFloat()) {
text = event->summary();
if ( useToolTips )
mToolTipText += text;
}
else {