30 #include <MPbk2ViewExplorer.h> |
30 #include <MPbk2ViewExplorer.h> |
31 #include <TPbk2ContactEditorParams.h> |
31 #include <TPbk2ContactEditorParams.h> |
32 #include <CPbk2ContactEditorDlg.h> |
32 #include <CPbk2ContactEditorDlg.h> |
33 #include <CPbk2FieldPropertyArray.h> |
33 #include <CPbk2FieldPropertyArray.h> |
34 #include <MPbk2FieldProperty.h> |
34 #include <MPbk2FieldProperty.h> |
35 #include <pbk2usimuires.rsg> |
35 #include <Pbk2USimUIRes.rsg> |
36 #include <pbk2uicontrols.rsg> |
36 #include <Pbk2UIControls.rsg> |
37 #include <CPbk2NamesListControl.h> |
37 #include <CPbk2NamesListControl.h> |
38 #include <CPbk2ControlContainer.h> |
38 #include <CPbk2ControlContainer.h> |
39 #include <CPbk2ViewState.h> |
39 #include <CPbk2ViewState.h> |
40 #include <MPbk2CommandHandler.h> |
40 #include <MPbk2CommandHandler.h> |
41 #include <MPbk2ApplicationServices.h> |
41 #include <MPbk2ApplicationServices.h> |
147 // |
147 // |
148 CPsu2FixedDialingView::CPsu2FixedDialingView( |
148 CPsu2FixedDialingView::CPsu2FixedDialingView( |
149 CPbk2UIExtensionView& aExtensionView, |
149 CPbk2UIExtensionView& aExtensionView, |
150 CPsu2ViewManager& aViewManager ) : |
150 CPsu2ViewManager& aViewManager ) : |
151 CPsu2NameListViewBase( aExtensionView, aViewManager ), |
151 CPsu2NameListViewBase( aExtensionView, aViewManager ), |
152 iShowFdnNotActiveNote( ETrue ), |
152 iShowFdnNotActiveNote( ETrue ) |
153 iMarkingModeOn( EFalse ) |
|
154 { |
153 { |
155 } |
154 } |
156 |
155 |
157 // -------------------------------------------------------------------------- |
156 // -------------------------------------------------------------------------- |
158 // CPsu2FixedDialingView::~CPsu2FixedDialingView |
157 // CPsu2FixedDialingView::~CPsu2FixedDialingView |
523 { |
522 { |
524 if( marked ) |
523 if( marked ) |
525 { |
524 { |
526 aMenuPane->SetItemDimmed( EPsu2CmdNewContact , ETrue ); |
525 aMenuPane->SetItemDimmed( EPsu2CmdNewContact , ETrue ); |
527 aMenuPane->SetItemDimmed( EPbk2CmdEditMe , ETrue ); |
526 aMenuPane->SetItemDimmed( EPbk2CmdEditMe , ETrue ); |
|
527 aMenuPane->SetItemSpecific( EPbk2CmdDeleteMe, EFalse ); |
|
528 } |
|
529 else |
|
530 { |
|
531 aMenuPane->SetItemSpecific( EPbk2CmdDeleteMe, ETrue ); |
528 } |
532 } |
529 } |
533 } |
530 break; |
534 break; |
531 } |
535 } |
532 case R_PSU2_FIXED_DIALING_COPY_MENUPANE: // FALLTHROUGH |
536 case R_PSU2_FIXED_DIALING_COPY_MENUPANE: // FALLTHROUGH |
534 { |
538 { |
535 if ( count <= 0 ) |
539 if ( count <= 0 ) |
536 { |
540 { |
537 aMenuPane->SetItemDimmed( EPbk2CmdCopy, ETrue ); |
541 aMenuPane->SetItemDimmed( EPbk2CmdCopy, ETrue ); |
538 } |
542 } |
|
543 if ( marked ) |
|
544 { |
|
545 aMenuPane->SetItemSpecific( EPbk2CmdCopy, EFalse ); |
|
546 aMenuPane->SetItemDimmed( EPsu2CmdCopyFromContacts, ETrue ); |
|
547 } |
|
548 else |
|
549 { |
|
550 aMenuPane->SetItemSpecific( EPbk2CmdCopy, ETrue); |
|
551 } |
539 break; |
552 break; |
540 } |
|
541 case R_AVKON_MENUPANE_MARK_MULTIPLE: |
|
542 { |
|
543 TInt markedContactCount = 0; |
|
544 |
|
545 CCoeControl* ctrl = iControl->ComponentControl(0); |
|
546 CEikListBox* listbox = static_cast <CEikListBox*> (ctrl); |
|
547 if ( listbox ) |
|
548 { |
|
549 markedContactCount = listbox->SelectionIndexes()->Count(); |
|
550 } |
|
551 // dim the makr all item if all contacts are marked. |
|
552 if ( markedContactCount > 0 && markedContactCount == iControl->NumberOfContacts() ) |
|
553 { |
|
554 aMenuPane->SetItemDimmed( EAknCmdMarkingModeMarkAll, ETrue ); |
|
555 } |
|
556 |
|
557 break; |
|
558 } |
553 } |
559 case R_PSU2_FIXED_DIALING_DELETE_MENUPANE: |
554 case R_PSU2_FIXED_DIALING_DELETE_MENUPANE: |
560 { |
555 { |
561 if ( count <= 0 ) |
556 if ( count <= 0 ) |
562 { |
557 { |
729 TBool /*aErrorNotified*/ ) |
724 TBool /*aErrorNotified*/ ) |
730 { |
725 { |
731 CCoeEnv::Static()->HandleError(aErrorCode); |
726 CCoeEnv::Static()->HandleError(aErrorCode); |
732 } |
727 } |
733 |
728 |
734 // ----------------------------------------------------------------------------- |
|
735 // CPsu2FixedDialingView::MarkingModeStatusChanged |
|
736 // ----------------------------------------------------------------------------- |
|
737 // |
|
738 void CPsu2FixedDialingView::MarkingModeStatusChanged( TBool aActivated ) |
|
739 { |
|
740 iMarkingModeOn = aActivated; |
|
741 } |
|
742 |
|
743 // ----------------------------------------------------------------------------- |
|
744 // CPsu2FixedDialingView::ExitMarkingMode |
|
745 // Called by avkon, if the return value is ETrue, |
|
746 // the Marking mode will be canceled after any operation, |
|
747 // otherwise the Marking mode keep active. |
|
748 // ----------------------------------------------------------------------------- |
|
749 // |
|
750 TBool CPsu2FixedDialingView::ExitMarkingMode() const |
|
751 { |
|
752 return ETrue; |
|
753 } |
|
754 |
|
755 |
|
756 |
|
757 // -------------------------------------------------------------------------- |
729 // -------------------------------------------------------------------------- |
758 // CPsu2FixedDialingView::UpdateNaviPaneTextL |
730 // CPsu2FixedDialingView::UpdateNaviPaneTextL |
759 // -------------------------------------------------------------------------- |
731 // -------------------------------------------------------------------------- |
760 // |
732 // |
761 void CPsu2FixedDialingView::UpdateNaviPaneTextL() |
733 void CPsu2FixedDialingView::UpdateNaviPaneTextL() |