summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.cpp
Unidiff
Diffstat (limited to 'korganizer/komonthview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 65d6acf..b175f9a 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -633,25 +633,25 @@ void MonthViewCell::startUpdateCell()
633 if ( !mHolidayString.isEmpty() ) { 633 if ( !mHolidayString.isEmpty() ) {
634 MonthViewItem *item = new MonthViewItem( 0, mDate, mHolidayString ); 634 MonthViewItem *item = new MonthViewItem( 0, mDate, mHolidayString );
635 item->setPalette( mHolidayPalette ); 635 item->setPalette( mHolidayPalette );
636 insertItem( item ); 636 insertItem( item );
637 mToolTip.append ( mHolidayString ); 637 mToolTip.append ( mHolidayString );
638 } 638 }
639#endif 639#endif
640} 640}
641 641
642int MonthViewCell::insertEvent(Event *event) 642int MonthViewCell::insertEvent(Event *event)
643{ 643{
644 bool useToolTips = true; 644 bool useToolTips = true;
645#ifndef DEKSTOP_VERSION 645#ifndef DESKTOP_VERSION
646 useToolTips = false; 646 useToolTips = false;
647#endif 647#endif
648 QString mToolTipText; 648 QString mToolTipText;
649 setFocusPolicy(WheelFocus); 649 setFocusPolicy(WheelFocus);
650 if ( !(event->doesRecur() == Recurrence::rNone) ) { 650 if ( !(event->doesRecur() == Recurrence::rNone) ) {
651 if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily ) 651 if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily )
652 return mdayCount; 652 return mdayCount;
653 else 653 else
654 if ( !KOPrefs::instance()->mMonthWeeklyRecur && event->doesRecur() == Recurrence::rWeekly ) 654 if ( !KOPrefs::instance()->mMonthWeeklyRecur && event->doesRecur() == Recurrence::rWeekly )
655 return mdayCount; 655 return mdayCount;
656 } 656 }
657 657
@@ -765,26 +765,27 @@ int MonthViewCell::insertEvent(Event *event)
765 uint i; 765 uint i;
766 int pos = mdayCount; 766 int pos = mdayCount;
767 for ( i = mdayCount; i < count();++i ) { 767 for ( i = mdayCount; i < count();++i ) {
768 QListBoxItem* it = this->item ( i ); 768 QListBoxItem* it = this->item ( i );
769 if ( text < it->text() ) { 769 if ( text < it->text() ) {
770 pos = i; 770 pos = i;
771 break; 771 break;
772 } 772 }
773 ++pos; 773 ++pos;
774 } 774 }
775 insertItem( item ,pos); 775 insertItem( item ,pos);
776 } 776 }
777 if ( useToolTips ) 777 if ( useToolTips ) {
778 mToolTip.append( mToolTipText ); 778 mToolTip.append( mToolTipText );
779 }
779 return mdayCount; 780 return mdayCount;
780} 781}
781void MonthViewCell::insertTodo(Todo *todo) 782void MonthViewCell::insertTodo(Todo *todo)
782{ 783{
783 setFocusPolicy(WheelFocus); 784 setFocusPolicy(WheelFocus);
784 QString text; 785 QString text;
785 if (todo->hasDueDate()) { 786 if (todo->hasDueDate()) {
786 if (!todo->doesFloat()) { 787 if (!todo->doesFloat()) {
787 text += KGlobal::locale()->formatTime(todo->dtDue().time()); 788 text += KGlobal::locale()->formatTime(todo->dtDue().time());
788 text += " "; 789 text += " ";
789 } 790 }
790 } 791 }