-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 | |||
@@ -642,4 +642,8 @@ void MonthViewCell::startUpdateCell() | |||
642 | int MonthViewCell::insertEvent(Event *event) | 642 | int MonthViewCell::insertEvent(Event *event) |
643 | { | 643 | { |
644 | bool useToolTips = true; | ||
645 | #ifndef DEKSTOP_VERSION | ||
646 | useToolTips = false; | ||
647 | #endif | ||
644 | QString mToolTipText; | 648 | QString mToolTipText; |
645 | setFocusPolicy(WheelFocus); | 649 | setFocusPolicy(WheelFocus); |
@@ -688,8 +692,10 @@ int MonthViewCell::insertEvent(Event *event) | |||
688 | } | 692 | } |
689 | text = time + event->summary(); | 693 | text = time + event->summary(); |
694 | if ( useToolTips ) | ||
690 | mToolTipText += prefix + text; | 695 | mToolTipText += prefix + text; |
691 | } else { | 696 | } else { |
692 | if (event->doesFloat()) { | 697 | if (event->doesFloat()) { |
693 | text = event->summary(); | 698 | text = event->summary(); |
699 | if ( useToolTips ) | ||
694 | mToolTipText += text; | 700 | mToolTipText += text; |
695 | } | 701 | } |
@@ -697,7 +703,11 @@ int MonthViewCell::insertEvent(Event *event) | |||
697 | text = KGlobal::locale()->formatTime(event->dtStart().time()); | 703 | text = KGlobal::locale()->formatTime(event->dtStart().time()); |
698 | text += " " + event->summary(); | 704 | text += " " + event->summary(); |
705 | if ( useToolTips ) | ||
699 | mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); | 706 | mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); |
700 | } | 707 | } |
701 | } | 708 | } |
709 | if ( useToolTips && ! event->location().isEmpty() ) { | ||
710 | mToolTipText += " (" + event->location() +")"; | ||
711 | } | ||
702 | MonthViewItem *item ; | 712 | MonthViewItem *item ; |
703 | 713 | ||
@@ -765,4 +775,5 @@ int MonthViewCell::insertEvent(Event *event) | |||
765 | insertItem( item ,pos); | 775 | insertItem( item ,pos); |
766 | } | 776 | } |
777 | if ( useToolTips ) | ||
767 | mToolTip.append( mToolTipText ); | 778 | mToolTip.append( mToolTipText ); |
768 | return mdayCount; | 779 | return mdayCount; |
@@ -817,5 +828,7 @@ void MonthViewCell::insertTodo(Todo *todo) | |||
817 | item->setMoreInfo( todo->description().length() > 0 ); | 828 | item->setMoreInfo( todo->description().length() > 0 ); |
818 | insertItem( item , count()); | 829 | insertItem( item , count()); |
830 | #ifdef DESKTOP_VERSION | ||
819 | mToolTip.append( text ); | 831 | mToolTip.append( text ); |
832 | #endif | ||
820 | } | 833 | } |
821 | void MonthViewCell::repaintfinishUpdateCell() | 834 | void MonthViewCell::repaintfinishUpdateCell() |