21 #include "APSettingsHandlerUIVariant.hrh" |
21 #include "APSettingsHandlerUIVariant.hrh" |
22 |
22 |
23 #include <ApListItem.h> |
23 #include <ApListItem.h> |
24 #include <apsetui.rsg> |
24 #include <apsetui.rsg> |
25 #include <featmgr.h> |
25 #include <featmgr.h> |
|
26 |
|
27 #include <csxhelp/cp.hlp.hrh> |
|
28 |
26 |
29 |
27 #include "ApSelectorListBoxModel.h" |
30 #include "ApSelectorListBoxModel.h" |
28 #include "ApSettingsModel.h" |
31 #include "ApSettingsModel.h" |
29 #include "ApSettingsHandlerUI.hrh" |
32 #include "ApSettingsHandlerUI.hrh" |
30 #include "ApSelPopupList.h" |
33 #include "ApSelPopupList.h" |
238 iNeedUnlock( EFalse ), |
241 iNeedUnlock( EFalse ), |
239 iReqIpvType( aReqIpvType ), |
242 iReqIpvType( aReqIpvType ), |
240 iVpnFilterType( aVpnFilterType ), |
243 iVpnFilterType( aVpnFilterType ), |
241 iVariant( aHandler.iExt->iVariant ), |
244 iVariant( aHandler.iExt->iVariant ), |
242 iIncludeEasyWlan( EFalse ), |
245 iIncludeEasyWlan( EFalse ), |
243 iNoEdit( aNoEdit ) |
246 iNoEdit( aNoEdit ), |
|
247 iFirstEnter( ETrue ) |
244 { |
248 { |
245 } |
249 } |
246 |
250 |
247 |
251 |
248 |
252 |
276 iReqIpvType( aReqIpvType ), |
280 iReqIpvType( aReqIpvType ), |
277 iVpnFilterType( aVpnFilterType ), |
281 iVpnFilterType( aVpnFilterType ), |
278 iVariant( aHandler.iExt->iVariant ), |
282 iVariant( aHandler.iExt->iVariant ), |
279 iIncludeEasyWlan( aIncludeEasyWlan ), |
283 iIncludeEasyWlan( aIncludeEasyWlan ), |
280 iInitialised( EFalse ), |
284 iInitialised( EFalse ), |
281 iNoEdit( aNoEdit ) |
285 iNoEdit( aNoEdit ), |
|
286 iFirstEnter( ETrue ) |
282 { |
287 { |
283 } |
288 } |
284 |
289 |
285 |
290 |
286 |
291 |
311 void CApSelPopupList::GetHelpContext(TCoeHelpContext& aContext) const |
316 void CApSelPopupList::GetHelpContext(TCoeHelpContext& aContext) const |
312 { |
317 { |
313 APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::GetHelpContext") |
318 APSETUILOGGER_ENTERFN( EListbox,"SelPopupList::GetHelpContext") |
314 |
319 |
315 aContext.iMajor = iHandler->iHelpMajor; |
320 aContext.iMajor = iHandler->iHelpMajor; |
|
321 // help no longer available for user, use dummy ID |
|
322 aContext.iContext = KSET_HLP_AP_SETTING_GPRS; |
316 |
323 |
317 APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::GetHelpContext") |
324 APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::GetHelpContext") |
318 } |
325 } |
319 |
326 |
320 |
327 |
481 CleanupStack::PopAndDestroy(); // buf, as item has copied it... |
488 CleanupStack::PopAndDestroy(); // buf, as item has copied it... |
482 } |
489 } |
483 |
490 |
484 iList->HandleItemAdditionL(); |
491 iList->HandleItemAdditionL(); |
485 |
492 |
486 iList->View()->SetDisableRedraw( EFalse ); |
|
487 iList->HandleItemAdditionL(); |
|
488 |
|
489 SetSelectedL(); |
493 SetSelectedL(); |
490 iPreferredUid = *iSelected; |
494 iPreferredUid = *iSelected; |
491 |
495 |
492 SetHighlighted(); |
496 SetHighlighted(); |
493 |
497 |
|
498 iList->View()->SetDisableRedraw( EFalse ); |
|
499 |
494 SizeChanged(); |
500 SizeChanged(); |
495 DrawNow(); |
|
496 |
501 |
497 CheckAndSetDataValidity(); |
502 CheckAndSetDataValidity(); |
498 UpdateCbaL(); |
503 UpdateCbaL(); |
499 |
504 |
500 APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::FillListBoxWithDataL") |
505 APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::FillListBoxWithDataL") |
831 { |
837 { |
832 if ( ( aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter ) && |
838 if ( ( aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter ) && |
833 ( ( iSelMenuType == EApSettingsSelMenuSelectOnly ) || |
839 ( ( iSelMenuType == EApSettingsSelMenuSelectOnly ) || |
834 ( iSelMenuType == EApSettingsSelMenuSelectNormal ) ) ) |
840 ( iSelMenuType == EApSettingsSelMenuSelectNormal ) ) ) |
835 { // process only if command is available... |
841 { // process only if command is available... |
836 ProcessCommandL( EApSelCmdSelect ); |
842 if ( aKeyEvent.iCode == EKeyEnter && iFirstEnter ) |
837 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 } |
838 } |
858 } |
839 else |
859 else |
840 { |
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 } |
841 retval = CAknRadioButtonSettingPage::OfferKeyEventL( |
865 retval = CAknRadioButtonSettingPage::OfferKeyEventL( |
842 aKeyEvent, aType ); |
866 aKeyEvent, aType ); |
843 } |
867 } |
844 } |
868 } |
845 } |
869 } |