equal
deleted
inserted
replaced
40 #include <MPbk2StartupMonitor.h> |
40 #include <MPbk2StartupMonitor.h> |
41 #include <CPbk2StorePropertyArray.h> |
41 #include <CPbk2StorePropertyArray.h> |
42 #include <CPbk2StoreProperty.h> |
42 #include <CPbk2StoreProperty.h> |
43 #include <MPbk2ApplicationServices.h> |
43 #include <MPbk2ApplicationServices.h> |
44 #include <MPbk2ContactViewSupplier.h> |
44 #include <MPbk2ContactViewSupplier.h> |
|
45 #include <CPbk2ApplicationServices.h> |
|
46 #include <MPbk2StoreValidityInformer.h> |
45 |
47 |
46 // Virtual Phonebook |
48 // Virtual Phonebook |
47 #include <MVPbkContactStoreList.h> |
49 #include <MVPbkContactStoreList.h> |
48 #include <CVPbkContactStoreUriArray.h> |
50 #include <CVPbkContactStoreUriArray.h> |
49 #include <MVPbkContactStore.h> |
51 #include <MVPbkContactStore.h> |
507 } |
509 } |
508 break; |
510 break; |
509 } |
511 } |
510 case R_PHONEBOOK2_INFO_MENU: |
512 case R_PHONEBOOK2_INFO_MENU: |
511 { |
513 { |
512 // menu always visible in group view |
514 // If there are no available stores, "memory details" should not be shown in Options menu |
|
515 if( !CurrentStoreIsAvailableL() ) |
|
516 { |
|
517 aMenuPane->SetItemDimmed( EPbk2CmdPhonebook2Info, ETrue ); |
|
518 } |
513 break; |
519 break; |
514 } |
520 } |
515 default: |
521 default: |
516 { |
522 { |
517 // Phonebook 2 menu filtering happens in Commands |
523 // Phonebook 2 menu filtering happens in Commands |
656 } |
662 } |
657 } |
663 } |
658 |
664 |
659 CleanupStack::PopAndDestroy( uris ); |
665 CleanupStack::PopAndDestroy( uris ); |
660 return ret; |
666 return ret; |
|
667 } |
|
668 |
|
669 // -------------------------------------------------------------------------- |
|
670 // CPguGroupView::CurrentStoreIsAvailable |
|
671 // -------------------------------------------------------------------------- |
|
672 // |
|
673 TBool CPguGroupView::CurrentStoreIsAvailableL() const |
|
674 { |
|
675 TBool ret = ETrue; |
|
676 CPbk2ApplicationServices* appServices = CPbk2ApplicationServices::InstanceLC(); |
|
677 |
|
678 // Returns the stores that are currently available and open(selected by user in Settings). |
|
679 CVPbkContactStoreUriArray* aValidStores = appServices->StoreValidityInformer().CurrentlyValidStoresL(); |
|
680 CleanupStack::PushL( aValidStores ); |
|
681 if( 0 == aValidStores->Count() ) |
|
682 { |
|
683 ret = EFalse; |
|
684 } |
|
685 CleanupStack::PopAndDestroy(); // aValidStores |
|
686 CleanupStack::PopAndDestroy(); // appServices |
|
687 return ret; |
661 } |
688 } |
662 |
689 |
663 // -------------------------------------------------------------------------- |
690 // -------------------------------------------------------------------------- |
664 // CPguGroupView::CreateControlsL |
691 // CPguGroupView::CreateControlsL |
665 // -------------------------------------------------------------------------- |
692 // -------------------------------------------------------------------------- |