author | zautrix <zautrix> | 2005-10-24 20:42:26 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-10-24 20:42:26 (UTC) |
commit | f696b904526567d45cd01a5b607644f8aa3bfe6b (patch) (side-by-side diff) | |
tree | 938cad6f52461b54969da1933cae232c5c4da6f5 | |
parent | 9b626f37040b4da2a23cdce2d9241218b84d3d88 (diff) | |
download | kdepimpi-f696b904526567d45cd01a5b607644f8aa3bfe6b.zip kdepimpi-f696b904526567d45cd01a5b607644f8aa3bfe6b.tar.gz kdepimpi-f696b904526567d45cd01a5b607644f8aa3bfe6b.tar.bz2 |
fixx
-rw-r--r-- | korganizer/koagendaitem.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index b416115..407424d 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -578,14 +578,18 @@ void KOAgendaItem::computeText() mDisplayedText += ": " +KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtStart().time()) + " - " + KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtEnd().time()) ; if ( mAllDay ) { - if ( mIncidence->dtStart().date().addDays(3) < mIncidence->dtEnd().date() ) { - if ( mIncidence->doesRecur() ) { - mDisplayedText += " (" + mIncidence->recurrence()->recurrenceText() + ")"; - } else { - int dur = 1+ (static_cast<Event*>(mIncidence))->dtStart().date().daysTo( (static_cast<Event*>(mIncidence))->dtEnd().date() ); - mDisplayedText += ": " +KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtStart().date(), true) + " - " + KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtEnd().date(), true) + " ("+QString::number( dur )+i18n(" days") +")" ; - } - } + if ( (static_cast<Event*>(mIncidence))->isMultiDay() ) { + int dur = 1+ (static_cast<Event*>(mIncidence))->dtStart().date().daysTo( (static_cast<Event*>(mIncidence))->dtEnd().date() ); + mDisplayedText += " ("+QString::number( dur )+i18n(" days") +")" ; + + if ( mIncidence->dtStart().date().addDays(3) < mIncidence->dtEnd().date() ) { + if ( mIncidence->doesRecur() ) { + mDisplayedText += " (" + mIncidence->recurrence()->recurrenceText() + ")"; + } else { + mDisplayedText += ": " +KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtStart().date(), true) + " - " + KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtEnd().date(), true); + } + } + } } } if ( !mIncidence->location().isEmpty() ) { |