equal
deleted
inserted
replaced
703 inline void CPbk2CommandHandler::PerformStoreSpecificFilteringL( |
703 inline void CPbk2CommandHandler::PerformStoreSpecificFilteringL( |
704 TInt aResourceId, |
704 TInt aResourceId, |
705 CEikMenuPane* aMenuPane, |
705 CEikMenuPane* aMenuPane, |
706 MPbk2ContactUiControl& aControl ) |
706 MPbk2ContactUiControl& aControl ) |
707 { |
707 { |
708 // ETrue if all selected contacts are read-only |
|
709 TBool readOnly = AreSelectedContactsFromReadOnlyStoreL( aControl ); |
|
710 |
|
711 switch (aResourceId) |
708 switch (aResourceId) |
712 { |
709 { |
713 case R_PHONEBOOK2_NAMESLIST_CONTEXT_MENU_MARKED_ITEMS: // FALLTHROUGH |
710 case R_PHONEBOOK2_NAMESLIST_CONTEXT_MENU_MARKED_ITEMS: // FALLTHROUGH |
714 case R_PHONEBOOK2_NAMESLIST_DELETE_MENU: |
711 case R_PHONEBOOK2_NAMESLIST_DELETE_MENU: |
715 { |
712 { |
716 // Weed out commands not meant to be used with read only stores |
713 // Weed out commands not meant to be used with read only stores |
717 if (readOnly) |
714 if (AreSelectedContactsFromReadOnlyStoreL( aControl )) |
718 { |
715 { |
719 aMenuPane->SetItemDimmed(EPbk2CmdDeleteMe, ETrue); |
716 aMenuPane->SetItemDimmed(EPbk2CmdDeleteMe, ETrue); |
720 } |
717 } |
721 break; |
718 break; |
722 } |
719 } |
725 { |
722 { |
726 TBool phoneMemoryInConfiguration = |
723 TBool phoneMemoryInConfiguration = |
727 iContactRelocator->IsPhoneMemoryInConfigurationL(); |
724 iContactRelocator->IsPhoneMemoryInConfigurationL(); |
728 |
725 |
729 // Weed out commands not meant to be used with read only stores |
726 // Weed out commands not meant to be used with read only stores |
730 if (readOnly) |
727 if (AreSelectedContactsFromReadOnlyStoreL( aControl )) |
731 { |
728 { |
732 aMenuPane->SetItemDimmed(EPbk2CmdDeleteMe, ETrue); |
729 aMenuPane->SetItemDimmed(EPbk2CmdDeleteMe, ETrue); |
733 aMenuPane->SetItemDimmed(EPbk2CmdEditMe, ETrue); |
730 aMenuPane->SetItemDimmed(EPbk2CmdEditMe, ETrue); |
734 } |
731 } |
735 |
732 |
768 } |
765 } |
769 |
766 |
770 case R_PHONEBOOK2_CONTACTINFO_CONTEXT_MENU: |
767 case R_PHONEBOOK2_CONTACTINFO_CONTEXT_MENU: |
771 { |
768 { |
772 // Weed out commands not meant to be used with read only stores |
769 // Weed out commands not meant to be used with read only stores |
773 if (readOnly) |
770 if (AreSelectedContactsFromReadOnlyStoreL( aControl )) |
774 { |
771 { |
775 aMenuPane->SetItemDimmed(EPbk2CmdEditMe, ETrue); |
772 aMenuPane->SetItemDimmed(EPbk2CmdEditMe, ETrue); |
776 } |
773 } |
777 break; |
774 break; |
778 } |
775 } |