phonebookui/Phonebook2/USIMExtension/src/CPsu2FixedDialingView.cpp
branchRCL_3
changeset 74 6b5524b4f673
parent 68 9da50d567e3c
child 85 38bb213f60ba
equal deleted inserted replaced
68:9da50d567e3c 74:6b5524b4f673
   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 )
   153     {
   154     {
   154     }
   155     }
   155 
   156 
   156 // --------------------------------------------------------------------------
   157 // --------------------------------------------------------------------------
   157 // CPsu2FixedDialingView::~CPsu2FixedDialingView
   158 // CPsu2FixedDialingView::~CPsu2FixedDialingView
   522                 {
   523                 {
   523                 if( marked )
   524                 if( marked )
   524                     {
   525                     {
   525                     aMenuPane->SetItemDimmed( EPsu2CmdNewContact , ETrue );
   526                     aMenuPane->SetItemDimmed( EPsu2CmdNewContact , ETrue );
   526                     aMenuPane->SetItemDimmed( EPbk2CmdEditMe , ETrue );
   527                     aMenuPane->SetItemDimmed( EPbk2CmdEditMe , ETrue );
   527                     aMenuPane->SetItemSpecific( EPbk2CmdDeleteMe, EFalse );
       
   528                     }
       
   529                 else
       
   530                     {
       
   531                     aMenuPane->SetItemSpecific( EPbk2CmdDeleteMe, ETrue );
       
   532                     }
   528                     }
   533                 }
   529                 }
   534             break;
   530             break;
   535             }
   531             }
   536         case R_PSU2_FIXED_DIALING_COPY_MENUPANE:        // FALLTHROUGH
   532         case R_PSU2_FIXED_DIALING_COPY_MENUPANE:        // FALLTHROUGH
   538             {
   534             {
   539             if ( count <= 0 )
   535             if ( count <= 0 )
   540                 {
   536                 {
   541                 aMenuPane->SetItemDimmed( EPbk2CmdCopy, ETrue );
   537                 aMenuPane->SetItemDimmed( EPbk2CmdCopy, ETrue );
   542                 }
   538                 }
   543             if ( marked )
       
   544                 {
       
   545                 aMenuPane->SetItemSpecific( EPbk2CmdCopy, EFalse );
       
   546                 aMenuPane->SetItemDimmed( EPsu2CmdCopyFromContacts, ETrue );
       
   547                 }
       
   548             else
       
   549                 {
       
   550                 aMenuPane->SetItemSpecific( EPbk2CmdCopy, ETrue);
       
   551                 }
       
   552             break;
   539             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;
   553             }
   558             }
   554         case R_PSU2_FIXED_DIALING_DELETE_MENUPANE:
   559         case R_PSU2_FIXED_DIALING_DELETE_MENUPANE:
   555             {
   560             {
   556             if ( count <= 0 )
   561             if ( count <= 0 )
   557                 {
   562                 {
   724         TBool /*aErrorNotified*/ )
   729         TBool /*aErrorNotified*/ )
   725     {
   730     {
   726     CCoeEnv::Static()->HandleError(aErrorCode);
   731     CCoeEnv::Static()->HandleError(aErrorCode);
   727     }    
   732     }    
   728 
   733 
       
   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 
   729 // --------------------------------------------------------------------------
   757 // --------------------------------------------------------------------------
   730 // CPsu2FixedDialingView::UpdateNaviPaneTextL
   758 // CPsu2FixedDialingView::UpdateNaviPaneTextL
   731 // --------------------------------------------------------------------------
   759 // --------------------------------------------------------------------------
   732 //
   760 //
   733 void CPsu2FixedDialingView::UpdateNaviPaneTextL()
   761 void CPsu2FixedDialingView::UpdateNaviPaneTextL()