apengine/apsettingshandlerui/src/ApSelPopupList.cpp
branchRCL_3
changeset 23 fc7b30ed2058
parent 18 04408506c6e0
child 24 05bc53fe583b
equal deleted inserted replaced
22:984e13af52c4 23:fc7b30ed2058
   241 iNeedUnlock( EFalse ),
   241 iNeedUnlock( EFalse ),
   242 iReqIpvType( aReqIpvType ),
   242 iReqIpvType( aReqIpvType ),
   243 iVpnFilterType( aVpnFilterType ),
   243 iVpnFilterType( aVpnFilterType ),
   244 iVariant( aHandler.iExt->iVariant ),
   244 iVariant( aHandler.iExt->iVariant ),
   245 iIncludeEasyWlan( EFalse ),
   245 iIncludeEasyWlan( EFalse ),
   246 iNoEdit( aNoEdit )
   246 iNoEdit( aNoEdit ),
       
   247 iFirstEnter( ETrue )
   247     {
   248     {
   248     }
   249     }
   249 
   250 
   250 
   251 
   251 
   252 
   279 iReqIpvType( aReqIpvType ),
   280 iReqIpvType( aReqIpvType ),
   280 iVpnFilterType( aVpnFilterType ),
   281 iVpnFilterType( aVpnFilterType ),
   281 iVariant( aHandler.iExt->iVariant ),
   282 iVariant( aHandler.iExt->iVariant ),
   282 iIncludeEasyWlan( aIncludeEasyWlan ),
   283 iIncludeEasyWlan( aIncludeEasyWlan ),
   283 iInitialised( EFalse ),
   284 iInitialised( EFalse ),
   284 iNoEdit( aNoEdit )
   285 iNoEdit( aNoEdit ),
       
   286 iFirstEnter( ETrue )
   285     {
   287     {
   286     }
   288     }
   287 
   289 
   288 
   290 
   289 
   291 
   835             {
   837             {
   836             if ( ( aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter ) &&
   838             if ( ( aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter ) &&
   837                 ( ( iSelMenuType == EApSettingsSelMenuSelectOnly ) ||
   839                 ( ( iSelMenuType == EApSettingsSelMenuSelectOnly ) ||
   838                     ( iSelMenuType == EApSettingsSelMenuSelectNormal ) ) )
   840                     ( iSelMenuType == EApSettingsSelMenuSelectNormal ) ) )
   839                 { // process only if command is available...
   841                 { // process only if command is available...
   840                 ProcessCommandL( EApSelCmdSelect );
   842                 if ( aKeyEvent.iCode == EKeyEnter  &&  iFirstEnter )
   841                 retval = EKeyWasConsumed;
   843                     {//pressing the enter key at the first time will be changed
       
   844                      //to an up arrow key so the first item in the list will be highlighted
       
   845                     iFirstEnter = EFalse;
       
   846                     iPreferredUid = 0;
       
   847                     SetHighlighted();
       
   848                     TKeyEvent aKeyEventmy = aKeyEvent;
       
   849                     aKeyEventmy.iCode = EKeyUpArrow;
       
   850                     retval = CAknRadioButtonSettingPage::OfferKeyEventL( aKeyEventmy, aType );
       
   851                     }
       
   852                 else
       
   853                     {
       
   854                     iFirstEnter = ETrue; //change back to true for the next session
       
   855                     ProcessCommandL( EApSelCmdSelect );
       
   856                     retval = EKeyWasConsumed;
       
   857                     }
   842                 }
   858                 }
   843             else
   859             else
   844                 {
   860                 {
       
   861                 if ( aKeyEvent.iCode == EKeyUpArrow || aKeyEvent.iCode == EKeyDownArrow )
       
   862                     {//we will have highligt so the following enter key should select the item
       
   863                     iFirstEnter = EFalse;
       
   864                     }
   845                 retval = CAknRadioButtonSettingPage::OfferKeyEventL(
   865                 retval = CAknRadioButtonSettingPage::OfferKeyEventL(
   846                                         aKeyEvent, aType );
   866                                         aKeyEvent, aType );
   847                 }
   867                 }
   848             }
   868             }
   849         }
   869         }