phonebookui/Phonebook2/MMCExtension/src/CPmuUIExtensionPlugin.cpp
branchRCL_3
changeset 21 9da50d567e3c
parent 0 e686773b3f54
equal deleted inserted replaced
20:f4a778e096c2 21:9da50d567e3c
    25 #include "PmuCommands.hrh"
    25 #include "PmuCommands.hrh"
    26 #include <CPbk2AppUiBase.h>
    26 #include <CPbk2AppUiBase.h>
    27 #include <Pbk2Commands.hrh>
    27 #include <Pbk2Commands.hrh>
    28 #include <MPbk2ContactUiControl.h>
    28 #include <MPbk2ContactUiControl.h>
    29 #include <CPbk2AppViewBase.h>
    29 #include <CPbk2AppViewBase.h>
    30 #include <Pbk2Commands.rsg>
    30 #include <pbk2commands.rsg>
    31 #include <Pbk2MmcUIRes.rsg>
    31 #include <pbk2mmcuires.rsg>
    32 
    32 
    33 // System includes
    33 // System includes
    34 #include <coemain.h>
    34 #include <coemain.h>
    35 #include <eikmenub.h>
    35 #include <eikmenub.h>
    36 
    36 
    80     switch (aResourceId)
    80     switch (aResourceId)
    81         {
    81         {
    82         case R_PMU_CASCADING_COPY_CONTACT_CARD_MENU :
    82         case R_PMU_CASCADING_COPY_CONTACT_CARD_MENU :
    83             {
    83             {
    84             TBool marked = aControl.ContactsMarked();
    84             TBool marked = aControl.ContactsMarked();
    85             if ( !marked)  
    85             // Menu item "To other memory" is not displayed if there is no marked item in the Names List
       
    86             // Menu item "From other memory" is not displayed if there is marked item in the Names List
       
    87             TInt pos = 0;
       
    88             if ( marked )  
    86                 {
    89                 {
    87 				//Not displayed if no marked items in the Names List.                
    90                 if ( aMenuPane->MenuItemExists( EPmuCmdImportFromMemoryCard, pos ) )
    88                 TInt pos;
    91                     {
       
    92                     aMenuPane->SetItemDimmed( EPmuCmdImportFromMemoryCard, ETrue );
       
    93                     }
       
    94                 }
       
    95             else
       
    96                 {
    89                 if ( aMenuPane->MenuItemExists( EPmuCmdExportToMemoryCard, pos ) )
    97                 if ( aMenuPane->MenuItemExists( EPmuCmdExportToMemoryCard, pos ) )
    90                 	{
    98                     {
    91                 	aMenuPane->SetItemDimmed( EPmuCmdExportToMemoryCard, ETrue );
    99                     aMenuPane->SetItemDimmed( EPmuCmdExportToMemoryCard, ETrue );
    92                 	}
   100                     }
    93                 }
   101                 }
    94             break;
   102             break;
    95             }
   103             }
    96             
   104             
    97         default:
   105         default: