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