-rw-r--r-- | korganizer/kodaymatrix.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 3468657..067c34c 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp @@ -220,14 +220,23 @@ QString KODayMatrix::getWhatsThisText( QPoint p ) } } if (KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { - Journal *j = mCalendar->journal( mDate ); - if ( j ) { - QString mToolTipText = j->description().left(100); - if ( j->description().length() > 100 ) + QPtrList<Journal> j_list = mCalendar->journals4Date( mDate ); + Journal *j = j_list.first(); + while ( j ) { + QString mToolTipText; + if ( !j->summary().isEmpty() ) { + mToolTipText = j->summary().left(30); + if ( j->summary().length() > 30 ) + mToolTipText += " ..."; + } else { + mToolTipText = j->description().left(25); + if ( j->description().length() > 25 ) mToolTipText += " ..."; mToolTipText = deTag( mToolTipText); + } mToolTipText = "<b>" + i18n("Journal: ") + "</b>"+ mToolTipText; mToolTip.append( mToolTipText ); + j = j_list.next(); } } return "<b>"+KGlobal::locale()->formatDate(days[tmp]) + "</b><br>" + mToolTip.join("<br>"); @@ -549,7 +558,9 @@ void KODayMatrix::updateViewTimed() pDays.setBit(i); if ( !holiStr.isEmpty() ) holiStr += "\n"; - holiStr += i18n("Journal"); + holiStr += i18n("Journal: ")+todo->summary().left(25); + if ( todo->summary().length() > 25 ) + holiStr +="..."; bDays.setBit(i); mHolidays[i] =holiStr ; eDays.setBit(i); |