notepad/notepad1/LibSrc/NpdListDialog.cpp
branchRCL_3
changeset 20 9c5b1510919f
parent 18 d68a4b5d5885
child 25 bf573002ff72
equal deleted inserted replaced
18:d68a4b5d5885 20:9c5b1510919f
   948             TInt currIndex = iListBox->CurrentItemIndex();
   948             TInt currIndex = iListBox->CurrentItemIndex();
   949             TKeyArrayFix itemKey(0,ECmpTUint);
   949             TKeyArrayFix itemKey(0,ECmpTUint);
   950             TInt ignore;
   950             TInt ignore;
   951             TInt itemMarked = iListBox->SelectionIndexes()->Find( currIndex, itemKey, ignore );
   951             TInt itemMarked = iListBox->SelectionIndexes()->Find( currIndex, itemKey, ignore );
   952             if ( memoCount > 0 && 
   952             if ( memoCount > 0 && 
   953                 ( markCount == 0 || IsNotepad() ) )
   953                 ( markCount == 0 || IsNotepad() || IsTemplates()) )
   954                 {
   954                 {
   955                 // this must preceed DeleteMenuItem(ENotepadCmdOpen)
   955                 // this must preceed DeleteMenuItem(ENotepadCmdOpen)
   956                 InsertSendMenuItemAfterL( *iSendUi, *aMenuPane, 
   956                 InsertSendMenuItemAfterL( *iSendUi, *aMenuPane, 
   957                     ENotepadCmdOpen );
   957                     ENotepadCmdOpen );
   958                 }
   958                 }
   963             if ( (memoCount == 0) ||  ( markCount >= 1  ) )
   963             if ( (memoCount == 0) ||  ( markCount >= 1  ) )
   964                 {
   964                 {
   965                 // this must after InsertSendMenuItemAfterL
   965                 // this must after InsertSendMenuItemAfterL
   966                 aMenuPane->DeleteMenuItem(ENotepadCmdOpen);
   966                 aMenuPane->DeleteMenuItem(ENotepadCmdOpen);
   967                 }
   967                 }
   968             if ( markCount >= 1  )
   968             if ( markCount >= 1 && IsNoteListDialog() )
   969                 {
   969                 {
   970                 aMenuPane->SetItemSpecific( ENotepadCmdSend, EFalse );
   970                 aMenuPane->SetItemSpecific( ENotepadCmdSend, EFalse );
   971                 aMenuPane->SetItemSpecific( ENotepadCmdDelete, EFalse );
   971                 aMenuPane->SetItemSpecific( ENotepadCmdDelete, EFalse );
   972                 }
   972                 }
   973             if ( iListBox->CurrentItemIndex() == 0 && IsNotepad() && memoCount > 0)
   973             
       
   974             if ( IsTemplateListDialog() )
       
   975                 {
       
   976                 aMenuPane->SetItemSpecific( ENotepadCmdSend, ETrue );
       
   977                 if ( markCount >= 1 )
       
   978                     {
       
   979                     aMenuPane->SetItemDimmed( ENotepadCmdSend, ETrue );
       
   980                     }
       
   981                  }
       
   982             
       
   983             if ( iListBox->CurrentItemIndex() == 0 && IsNotepad() && memoCount > 0 && markCount == 0 )
   974 				{                    
   984 				{                    
   975 				aMenuPane->SetItemDimmed( ENotepadCmdDelete, ETrue );				 
   985 				aMenuPane->SetItemDimmed( ENotepadCmdDelete, ETrue );				 
   976 				aMenuPane->SetItemDimmed( ENotepadCmdSend, ETrue );				 
   986 				aMenuPane->SetItemDimmed( ENotepadCmdSend, ETrue );				 
   977 				}
   987 				}
   978 			}
   988 			}