phoneapp/phoneuivoipextension/src/cphonecustomizationvoip.cpp
changeset 50 377c906a8701
parent 37 ba76fc04e6c2
child 60 1eef62f5c541
equal deleted inserted replaced
46:bc5a64e5bc3c 50:377c906a8701
   186 
   186 
   187     // Menu items to array
   187     // Menu items to array
   188     TInt menuItemCount = menuPane->NumberOfItemsInPane();
   188     TInt menuItemCount = menuPane->NumberOfItemsInPane();
   189     for ( TInt i( 0 ); i < menuItemCount; i++ )
   189     for ( TInt i( 0 ); i < menuItemCount; i++ )
   190         {
   190         {
   191         menuItemArray.Append( menuPane->MenuItemCommandId( i ) );
   191         menuItemArray.AppendL( menuPane->MenuItemCommandId( i ) );
   192         }
   192         }
   193 
   193 
   194     // Menu items to be deleted 
   194     // Menu items to be deleted 
   195     for ( TInt i( 0 ); i < menuItemArray.Count(); i++ )
   195     for ( TInt i( 0 ); i < menuItemArray.Count(); i++ )
   196         {
   196         {
   770 // -----------------------------------------------------------
   770 // -----------------------------------------------------------
   771 // CPhoneCustomizationVoip::InsertTextInputModeChangeMenuItemL
   771 // CPhoneCustomizationVoip::InsertTextInputModeChangeMenuItemL
   772 // -----------------------------------------------------------
   772 // -----------------------------------------------------------
   773 //
   773 //
   774 void CPhoneCustomizationVoip::InsertTextInputModeChangeMenuItemL( 
   774 void CPhoneCustomizationVoip::InsertTextInputModeChangeMenuItemL( 
   775         CEikMenuPane& aMenuPane )
   775         CEikMenuPane& /*aMenuPane*/ )
   776     {
   776     {
   777     __LOGMETHODSTARTEND( PhoneUIVoIPExtension, 
   777     __LOGMETHODSTARTEND( PhoneUIVoIPExtension, 
   778         "CPhoneCustomizationVoip::InsertTextInputModeChangeMenuItemL" );
   778         "CPhoneCustomizationVoip::InsertTextInputModeChangeMenuItemL" );
   779     
   779 
   780     TInt modeChangeOptionIndex = KErrNotFound;
       
   781     if ( aMenuPane.MenuItemExists( 
       
   782              EPhoneNumberAcqCmdToggleNeAlphaMode, modeChangeOptionIndex ) ||
       
   783          aMenuPane.MenuItemExists( 
       
   784              EPhoneNumberAcqCmdToggleNeNumericMode, modeChangeOptionIndex ) )
       
   785         {
       
   786         __PHONELOG( EBasic, PhoneUIVoIPExtension,
       
   787             "InsertTextInputModeChangeMenuItemL, MENU ITEM ALREADY EXISTS" );
       
   788         __ASSERT_DEBUG( EFalse, Panic( EPhoneCtrlInvariant ) );
       
   789         }
       
   790     
       
   791     CEikMenuPaneItem* menuItem = NULL;
       
   792     TBool numberEntryInNumericMode = iViewCommandHandle.HandleCommandL( 
       
   793         EPhoneViewIsNumberEntryNumericMode ) == EPhoneViewResponseSuccess;
       
   794     if ( numberEntryInNumericMode )
       
   795         {
       
   796         menuItem = CreateMenuPaneItemLC( 
       
   797             EPhoneNumberAcqCmdToggleNeAlphaMode,
       
   798             R_PHONEUI_NUMBERACQ_OPTIONS_MENU_ITEM_ALPHA_MODE );
       
   799         }
       
   800     else
       
   801         {
       
   802         menuItem = CreateMenuPaneItemLC( 
       
   803             EPhoneNumberAcqCmdToggleNeNumericMode,
       
   804             R_PHONEUI_NUMBERACQ_OPTIONS_MENU_ITEM_NUMERIC_MODE );
       
   805         }
       
   806     
       
   807     // alpha/numeric mode option is always second item in number entry menu
       
   808     const TInt KTextInputModeChangeMenuItemIndex = 1;
       
   809     aMenuPane.InsertMenuItemL( 
       
   810         menuItem->iData, KTextInputModeChangeMenuItemIndex );
       
   811     CleanupStack::PopAndDestroy( menuItem );
       
   812     }
   780     }
   813 
   781 
   814 
   782 
   815 // -----------------------------------------------------------
   783 // -----------------------------------------------------------
   816 // CPhoneCustomizationVoip::GetActiveCallArrayL
   784 // CPhoneCustomizationVoip::GetActiveCallArrayL
   898                 break;
   866                 break;
   899             }
   867             }
   900 
   868 
   901         if( callInfo.iCallState != CTelMenuExtension::ENone )
   869         if( callInfo.iCallState != CTelMenuExtension::ENone )
   902             {
   870             {
   903             aArray.Append( callInfo );                                   
   871             aArray.AppendL( callInfo );                                   
   904             }
   872             }
   905 
   873 
   906         }
   874         }
   907     }
   875     }
   908 
   876