From cbda16d4966c7483d20d1b6b5a64c8af367ea732 Mon Sep 17 00:00:00 2001 From: zautrix Date: Thu, 27 Oct 2005 23:22:36 +0000 Subject: us fix --- (limited to 'korganizer') diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 610aae6..85e9166 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -737,13 +737,21 @@ int MonthViewCell::insertEvent(Event *event) } text = time + event->summary(); + + int dur = 0; + if ( event->doesFloat() ) { + dur = event->dtStart().daysTo(event->dtEnd())+1; + + } if ( useToolTips ) { mToolTipText += prefix + text; - if ( event->doesFloat() ) { - mToolTipText += i18n(" (Duration: %1 days)" ).arg ( event->dtStart().daysTo(event->dtEnd())+1); - + if ( dur ) { + mToolTipText += i18n(" (Duration: %1 days)" ).arg ( dur ); } } + if ( dur ) { + text += " ("+ QString::number( dur ) + i18n(" days" ) + ")"; + } } else { if (event->doesFloat()) { text = event->summary(); -- cgit v0.9.0.2