phonebookui/Phonebook2/UIControls/src/CPbk2NamesListControl.cpp
branchRCL_3
changeset 11 2828b4d142c0
parent 9 0d28c1c5b6dd
child 18 d4f567ce2e7c
equal deleted inserted replaced
9:0d28c1c5b6dd 11:2828b4d142c0
   874                 iContactManager( aManager ),
   874                 iContactManager( aManager ),
   875                 iBaseView( &aView ),
   875                 iBaseView( &aView ),
   876                 iContainer( aContainer ),
   876                 iContainer( aContainer ),
   877                 iNameFormatter( aNameFormatter ),
   877                 iNameFormatter( aNameFormatter ),
   878                 iStoreProperties( aStoreProperties ),
   878                 iStoreProperties( aStoreProperties ),
   879                 iAllowPointerEvents( ETrue )
   879                 iAllowPointerEvents( ETrue ),
       
   880                 iOpeningCca( EFalse )
   880     {
   881     {
   881     }
   882     }
   882 
   883 
   883 // --------------------------------------------------------------------------
   884 // --------------------------------------------------------------------------
   884 // CPbk2NamesListControl::CPbk2NamesListControl
   885 // CPbk2NamesListControl::CPbk2NamesListControl
   895                 iBaseView( &aView ),
   896                 iBaseView( &aView ),
   896                 iContainer( aContainer ),
   897                 iContainer( aContainer ),
   897                 iNameFormatter( aNameFormatter ),
   898                 iNameFormatter( aNameFormatter ),
   898                 iStoreProperties( aStoreProperties ),
   899                 iStoreProperties( aStoreProperties ),
   899                 iAllowPointerEvents( ETrue ),                
   900                 iAllowPointerEvents( ETrue ),                
   900                 iThumbManager( aThumbManager )
   901                 iThumbManager( aThumbManager ),
       
   902                 iOpeningCca( EFalse )
   901     {
   903     {
   902     }
   904     }
   903 
   905 
   904 // --------------------------------------------------------------------------
   906 // --------------------------------------------------------------------------
   905 // CPbk2NamesListControl::~CPbk2NamesListControl
   907 // CPbk2NamesListControl::~CPbk2NamesListControl
  2399     // the list box. When find text is reset, the possible filter
  2401     // the list box. When find text is reset, the possible filter
  2400     // result (subset of contacts) of the previous find criteria must be
  2402     // result (subset of contacts) of the previous find criteria must be
  2401     // reset too. So, we reset both the find box and the view stack.
  2403     // reset too. So, we reset both the find box and the view stack.
  2402     TRAPD( res,
  2404     TRAPD( res,
  2403         {
  2405         {
  2404         // This will reset back to base view
  2406         // This will reset back to base view, however retain original view
  2405         iCurrentState->ResetFindL();
  2407 		//when opening CCA
       
  2408         if( !iOpeningCca ) 
       
  2409             {
       
  2410             iCurrentState->ResetFindL(); 
       
  2411             }
  2406         });
  2412         });
  2407     HandleError( res );
  2413     HandleError( res );
  2408 
  2414 
  2409     if( !iCheckMassUpdate->MassUpdateCheckThis() )
  2415     if( !iCheckMassUpdate->MassUpdateCheckThis() )
  2410         {
  2416         {
  2411         Reset();
  2417         // If it is the first time to goto a contat's cca card, then in cca we 
       
  2418         // will set a defualt number to that contact by CmsSetVoiceCallDefault.
       
  2419         // Then db item changed event is notified to ui layer and names list control 
       
  2420         // updated accordingly. But to end user that is not allowed, so use this 
       
  2421         // flag to avoid this reset of ui control.
       
  2422         if( iOpeningCca )
       
  2423             {
       
  2424             if( iCurrentState->NamesListState() == EStateEmpty )
       
  2425                 {
       
  2426                 SelectAndChangeReadyStateL();
       
  2427                 }
       
  2428             }
       
  2429         else
       
  2430             {              
       
  2431             Reset();
       
  2432             }	
  2412         }
  2433         }
  2413 
  2434 
  2414     // Do not handle contact addition here (DoHandleContactAdditionL),
  2435     // Do not handle contact addition here (DoHandleContactAdditionL),
  2415     // ContactAddedToView to notification is sent separately
  2436     // ContactAddedToView to notification is sent separately
  2416     }
  2437     }
  2601             }
  2622             }
  2602         }
  2623         }
  2603     }
  2624     }
  2604 
  2625 
  2605 // ---------------------------------------------------------------------------
  2626 // ---------------------------------------------------------------------------
       
  2627 // CPbk2NamesListControl::SetOpeningCca
       
  2628 // ---------------------------------------------------------------------------
       
  2629 //
       
  2630 EXPORT_C void CPbk2NamesListControl::SetOpeningCca( TBool aIsOpening )
       
  2631 	{
       
  2632 	iOpeningCca = aIsOpening;
       
  2633 	}
       
  2634 
       
  2635 // ---------------------------------------------------------------------------
  2606 // CPbk2NamesListControlBgTask::CPbk2NamesListControlBgTask
  2636 // CPbk2NamesListControlBgTask::CPbk2NamesListControlBgTask
  2607 // ---------------------------------------------------------------------------
  2637 // ---------------------------------------------------------------------------
  2608 //
  2638 //
  2609 CPbk2NamesListControlBgTask::CPbk2NamesListControlBgTask( CPbk2NamesListControl& aControl ) :
  2639 CPbk2NamesListControlBgTask::CPbk2NamesListControlBgTask( CPbk2NamesListControl& aControl ) :
  2610     CActive(CActive::EPriorityStandard),
  2640     CActive(CActive::EPriorityStandard),