582 } |
582 } |
583 else |
583 else |
584 { |
584 { |
585 if( Container()->MarkedCount() ) |
585 if( Container()->MarkedCount() ) |
586 { |
586 { |
587 aMenuPane->SetItemSpecific( ECalenDeleteCurrentEntry, EFalse ); |
587 aMenuPane->SetItemSpecific( ECalenDeleteCurrentEntry, ETrue ); |
588 if(Container()->IsCurrentItemSelected()) // If focused list item is marked |
588 if(Container()->IsCurrentItemSelected()) // If focused list item is marked |
589 { |
589 { |
590 aMenuPane->DeleteMenuItem( ECalenViewCurrentEntry ); |
590 aMenuPane->DeleteMenuItem( ECalenViewCurrentEntry ); |
591 } |
591 } |
592 aMenuPane->DeleteMenuItem( ECalenNewMeeting ); |
592 aMenuPane->DeleteMenuItem( ECalenNewMeeting ); |
593 aMenuPane->DeleteMenuItem( ECalenCompleteTodo ); |
593 aMenuPane->DeleteMenuItem( ECalenCompleteTodo ); |
594 aMenuPane->DeleteMenuItem( ECalenRestoreTodo ); |
594 aMenuPane->DeleteMenuItem( ECalenRestoreTodo ); |
595 aMenuPane->DeleteMenuItem( ECalenSend ); |
595 aMenuPane->DeleteMenuItem( ECalenSend ); |
596 |
596 aMenuPane->DeleteMenuItem(ECalenCopyToCalendars); |
|
597 |
|
598 TBool crossout( EFalse ); |
|
599 //When mark as done, crossout is ETrue. |
|
600 crossout = CheckMarkedItemCompletedL(); |
|
601 if( crossout ) |
|
602 { |
|
603 aMenuPane->SetItemSpecific(ECalenMarkUnDone, ETrue); |
|
604 } |
|
605 else |
|
606 { |
|
607 aMenuPane->SetItemSpecific(ECalenMarkDone, ETrue); |
|
608 } |
|
609 |
597 if(Container()->MarkedCount() == 1) |
610 if(Container()->MarkedCount() == 1) |
598 { |
611 { |
599 aMenuPane->DeleteMenuItem( ECalenCmdComplete ); |
612 aMenuPane->DeleteMenuItem( ECalenCmdComplete ); |
600 TBool crossout( EFalse ); |
|
601 crossout = CheckMarkedItemCompletedL(); |
|
602 if( crossout ) |
|
603 { |
|
604 aMenuPane->DeleteMenuItem( ECalenMarkDone ); |
|
605 } |
|
606 else |
|
607 { |
|
608 aMenuPane->DeleteMenuItem( ECalenMarkUnDone ); |
|
609 } |
|
610 } |
613 } |
611 else |
|
612 { |
|
613 aMenuPane->DeleteMenuItem( ECalenMarkDone ); |
|
614 aMenuPane->DeleteMenuItem( ECalenMarkUnDone ); |
|
615 } |
|
616 if(Container()->MarkedCount() > 1) |
|
617 { |
|
618 aMenuPane->DeleteMenuItem( ECalenCopyToCalendars ); |
|
619 } |
|
620 } |
614 } |
621 else |
615 else |
622 { |
616 { |
623 aMenuPane->SetItemSpecific( ECalenDeleteCurrentEntry, ETrue ); |
617 aMenuPane->SetItemSpecific( ECalenDeleteCurrentEntry, ETrue ); |
624 TBool crossout( EFalse ); |
618 TBool crossout( EFalse ); |
733 { |
727 { |
734 TRACE_ENTRY_POINT; |
728 TRACE_ENTRY_POINT; |
735 |
729 |
736 RedrawStatusPaneL(); // Set a text to title pane. |
730 RedrawStatusPaneL(); // Set a text to title pane. |
737 |
731 |
738 /*MCalenToolbar* toolbarImpl = iServices.ToolbarOrNull(); |
732 MCalenToolbar* toolbarImpl = iServices.ToolbarOrNull(); |
739 if(toolbarImpl) |
733 if(toolbarImpl) |
740 { |
734 { |
741 CAknToolbar& toolbar = toolbarImpl->Toolbar(); |
735 CAknToolbar& toolbar = toolbarImpl->Toolbar(); |
742 |
736 |
743 // dim clear and clear all toolbar buttons |
737 // dim clear and clear all toolbar buttons |
744 toolbar.SetItemDimmed(ECalenGotoToday,ETrue,ETrue); |
738 toolbar.SetItemDimmed(ECalenGotoToday,ETrue,ETrue); |
745 }*/ |
739 } |
746 iEventViewCommandHandled = EFalse; |
740 iEventViewCommandHandled = EFalse; |
747 |
741 |
748 TRACE_EXIT_POINT; |
742 TRACE_EXIT_POINT; |
749 } |
743 } |
750 |
744 |
755 // |
749 // |
756 void CCalenTodoView::DoDeactivateImpl() |
750 void CCalenTodoView::DoDeactivateImpl() |
757 { |
751 { |
758 TRACE_ENTRY_POINT; |
752 TRACE_ENTRY_POINT; |
759 |
753 |
760 /*MCalenToolbar* toolbarImpl = iServices.ToolbarOrNull(); |
754 MCalenToolbar* toolbarImpl = iServices.ToolbarOrNull(); |
761 if(toolbarImpl) |
755 if(toolbarImpl) |
762 { |
756 { |
763 CAknToolbar& toolbar = toolbarImpl->Toolbar(); |
757 CAknToolbar& toolbar = toolbarImpl->Toolbar(); |
764 |
758 |
765 if(&toolbar) |
759 if(&toolbar) |
766 { |
760 { |
767 // dim clear and clear all toolbar buttons |
761 // dim clear and clear all toolbar buttons |
768 toolbar.SetItemDimmed(ECalenGotoToday,EFalse,ETrue); |
762 toolbar.SetItemDimmed(ECalenGotoToday,EFalse,ETrue); |
769 } |
763 } |
770 }*/ |
764 } |
771 |
765 |
772 // Remove all markings when the view is deactivated. |
766 // Remove all markings when the view is deactivated. |
773 static_cast< CCalenTodoContainer* > ( iContainer )->MarkAllL( |
767 static_cast< CCalenTodoContainer* > ( iContainer )->MarkAllL( |
774 EFalse ); |
768 EFalse ); |
775 |
769 |