summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.cpp
Unidiff
Diffstat (limited to 'korganizer/komonthview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp21
1 files changed, 17 insertions, 4 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()
641 641
642int MonthViewCell::insertEvent(Event *event) 642int 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);
646 if ( !(event->doesRecur() == Recurrence::rNone) ) { 650 if ( !(event->doesRecur() == Recurrence::rNone) ) {
@@ -687,18 +691,24 @@ int MonthViewCell::insertEvent(Event *event)
687 691
688 } 692 }
689 text = time + event->summary(); 693 text = time + event->summary();
690 mToolTipText += prefix + text; 694 if ( useToolTips )
695 mToolTipText += prefix + text;
691 } else { 696 } else {
692 if (event->doesFloat()) { 697 if (event->doesFloat()) {
693 text = event->summary(); 698 text = event->summary();
694 mToolTipText += text; 699 if ( useToolTips )
700 mToolTipText += text;
695 } 701 }
696 else { 702 else {
697 text = KGlobal::locale()->formatTime(event->dtStart().time()); 703 text = KGlobal::locale()->formatTime(event->dtStart().time());
698 text += " " + event->summary(); 704 text += " " + event->summary();
699 mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); 705 if ( useToolTips )
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
704 if ( mAvailItemList.count() ) { 714 if ( mAvailItemList.count() ) {
@@ -764,7 +774,8 @@ int MonthViewCell::insertEvent(Event *event)
764 } 774 }
765 insertItem( item ,pos); 775 insertItem( item ,pos);
766 } 776 }
767 mToolTip.append( mToolTipText ); 777 if ( useToolTips )
778 mToolTip.append( mToolTipText );
768 return mdayCount; 779 return mdayCount;
769} 780}
770void MonthViewCell::insertTodo(Todo *todo) 781void MonthViewCell::insertTodo(Todo *todo)
@@ -816,7 +827,9 @@ void MonthViewCell::insertTodo(Todo *todo)
816 item->setAlarm( todo->isAlarmEnabled() ); 827 item->setAlarm( todo->isAlarmEnabled() );
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}
821void MonthViewCell::repaintfinishUpdateCell() 834void MonthViewCell::repaintfinishUpdateCell()
822{ 835{