-rw-r--r-- | korganizer/komonthview.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 4dfb9df..65d6acf 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -641,6 +641,10 @@ void MonthViewCell::startUpdateCell() int MonthViewCell::insertEvent(Event *event) { + bool useToolTips = true; +#ifndef DEKSTOP_VERSION + useToolTips = false; +#endif QString mToolTipText; setFocusPolicy(WheelFocus); if ( !(event->doesRecur() == Recurrence::rNone) ) { @@ -687,18 +691,24 @@ int MonthViewCell::insertEvent(Event *event) } text = time + event->summary(); + if ( useToolTips ) mToolTipText += prefix + text; } else { if (event->doesFloat()) { text = event->summary(); + if ( useToolTips ) mToolTipText += text; } else { text = KGlobal::locale()->formatTime(event->dtStart().time()); text += " " + event->summary(); + if ( useToolTips ) mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); } } + if ( useToolTips && ! event->location().isEmpty() ) { + mToolTipText += " (" + event->location() +")"; + } MonthViewItem *item ; if ( mAvailItemList.count() ) { @@ -764,6 +774,7 @@ int MonthViewCell::insertEvent(Event *event) } insertItem( item ,pos); } + if ( useToolTips ) mToolTip.append( mToolTipText ); return mdayCount; } @@ -816,7 +827,9 @@ void MonthViewCell::insertTodo(Todo *todo) item->setAlarm( todo->isAlarmEnabled() ); item->setMoreInfo( todo->description().length() > 0 ); insertItem( item , count()); +#ifdef DESKTOP_VERSION mToolTip.append( text ); +#endif } void MonthViewCell::repaintfinishUpdateCell() { |