-rw-r--r-- | korganizer/kodaymatrix.cpp | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 3468657..067c34c 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp @@ -217,20 +217,29 @@ QString KODayMatrix::getWhatsThisText( QPoint p ) mToolTipText = deTag( mToolTipText); mToolTipText = "<b>" + i18n("Todo: ") + "</b>"+ mToolTipText; mToolTip.append( mToolTipText ); } } 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 ) - mToolTipText += " ..."; - mToolTipText = deTag( mToolTipText); + 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 ); + mToolTip.append( mToolTipText ); + j = j_list.next(); } } return "<b>"+KGlobal::locale()->formatDate(days[tmp]) + "</b><br>" + mToolTip.join("<br>"); } @@ -546,13 +555,15 @@ void KODayMatrix::updateViewTimed() if ( day >= 0 && day < timeSpan + 1) { int i = day; QString holiStr = mHolidays[i]; 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); } } |