-rw-r--r-- | korganizer/komonthview.cpp | 5 |
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 | |||
@@ -621,49 +621,49 @@ void MonthViewCell::startUpdateCell() | |||
621 | MonthViewItem *item = CurrentAvailItem; | 621 | MonthViewItem *item = CurrentAvailItem; |
622 | CurrentAvailItem = (MonthViewItem *)item->next(); | 622 | CurrentAvailItem = (MonthViewItem *)item->next(); |
623 | mAvailItemList.append( item ); | 623 | mAvailItemList.append( item ); |
624 | takeItem ( item ); | 624 | takeItem ( item ); |
625 | } | 625 | } |
626 | 626 | ||
627 | #ifdef DESKTOP_VERSION | 627 | #ifdef DESKTOP_VERSION |
628 | QToolTip::remove(this); | 628 | QToolTip::remove(this); |
629 | #endif | 629 | #endif |
630 | mToolTip.clear(); | 630 | mToolTip.clear(); |
631 | //qApp->processEvents(); | 631 | //qApp->processEvents(); |
632 | #if 0 | 632 | #if 0 |
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 | ||
642 | int MonthViewCell::insertEvent(Event *event) | 642 | int 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 | ||
658 | if ( event->isHoliday()) { | 658 | if ( event->isHoliday()) { |
659 | setHoliday( true ); | 659 | setHoliday( true ); |
660 | if ( mDate.dayOfWeek() == 7 ) | 660 | if ( mDate.dayOfWeek() == 7 ) |
661 | setLineWidth( 3 ); | 661 | setLineWidth( 3 ); |
662 | } | 662 | } |
663 | QString text; | 663 | QString text; |
664 | int multiday = 0;// 1 = start, 2 = midddle, 3 = end day | 664 | int multiday = 0;// 1 = start, 2 = midddle, 3 = end day |
665 | if (event->isMultiDay()) { | 665 | if (event->isMultiDay()) { |
666 | QString prefix = "<->";multiday = 2; | 666 | QString prefix = "<->";multiday = 2; |
667 | QString time; | 667 | QString time; |
668 | if ( event->doesRecur() ) { | 668 | if ( event->doesRecur() ) { |
669 | if ( event->recursOn( mDate) ) { | 669 | if ( event->recursOn( mDate) ) { |
@@ -753,50 +753,51 @@ int MonthViewCell::insertEvent(Event *event) | |||
753 | if ( me->status() == Attendee::NeedsAction && me->RSVP()) | 753 | if ( me->status() == Attendee::NeedsAction && me->RSVP()) |
754 | item->setReply(true && multiday < 2); | 754 | item->setReply(true && multiday < 2); |
755 | else | 755 | else |
756 | item->setReply(false); | 756 | item->setReply(false); |
757 | } else | 757 | } else |
758 | item->setReply(false); | 758 | item->setReply(false); |
759 | #endif | 759 | #endif |
760 | item->setMultiDay( multiday ); | 760 | item->setMultiDay( multiday ); |
761 | if ( multiday ) { | 761 | if ( multiday ) { |
762 | insertItem( item ,mdayCount); | 762 | insertItem( item ,mdayCount); |
763 | ++mdayCount; | 763 | ++mdayCount; |
764 | } else { | 764 | } else { |
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 | } |
781 | void MonthViewCell::insertTodo(Todo *todo) | 782 | void 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 | } |
791 | text += todo->summary(); | 792 | text += todo->summary(); |
792 | MonthViewItem *item ; | 793 | MonthViewItem *item ; |
793 | if ( mAvailItemList.count() ) { | 794 | if ( mAvailItemList.count() ) { |
794 | item = mAvailItemList.first(); | 795 | item = mAvailItemList.first(); |
795 | mAvailItemList.remove( item ); | 796 | mAvailItemList.remove( item ); |
796 | item->recycle( todo, mDate, text ); | 797 | item->recycle( todo, mDate, text ); |
797 | } else { | 798 | } else { |
798 | item = new MonthViewItem( todo, mDate, text ); | 799 | item = new MonthViewItem( todo, mDate, text ); |
799 | } | 800 | } |
800 | //MonthViewItem *item = new MonthViewItem( todo, mDate, text ); | 801 | //MonthViewItem *item = new MonthViewItem( todo, mDate, text ); |
801 | //item->setPalette( mStandardPalette ); | 802 | //item->setPalette( mStandardPalette ); |
802 | QPalette pal; | 803 | QPalette pal; |