phonebookui/Phonebook2/UIControls/src/CPbk2SelectFieldDlg.cpp
branchRCL_3
changeset 68 9da50d567e3c
parent 0 e686773b3f54
child 85 38bb213f60ba
equal deleted inserted replaced
63:f4a778e096c2 68:9da50d567e3c
    24 #include <CPbk2IconArray.h>
    24 #include <CPbk2IconArray.h>
    25 #include <CPbk2PresentationContactFieldCollection.h>
    25 #include <CPbk2PresentationContactFieldCollection.h>
    26 #include <CPbk2StorePropertyArray.h>
    26 #include <CPbk2StorePropertyArray.h>
    27 #include <CPbk2UIExtensionManager.h>
    27 #include <CPbk2UIExtensionManager.h>
    28 #include <MPbk2UIExtensionIconSupport.h>
    28 #include <MPbk2UIExtensionIconSupport.h>
    29 #include <Pbk2UIControls.rsg>
    29 #include <pbk2uicontrols.rsg>
    30 #include <CPbk2PresenceIconInfo.h>
    30 #include <CPbk2PresenceIconInfo.h>
    31 #include "CPbk2FieldAnalyzer.h"
    31 #include "CPbk2FieldAnalyzer.h"
    32 #include <CPbk2ApplicationServices.h>
    32 #include <CPbk2ApplicationServices.h>
    33 
    33 
    34 // Virtual Phonebook
    34 // Virtual Phonebook
   334 // --------------------------------------------------------------------------
   334 // --------------------------------------------------------------------------
   335 //
   335 //
   336 TKeyResponse CPbk2SelectFieldDlg::CPopupList::OfferKeyEventL
   336 TKeyResponse CPbk2SelectFieldDlg::CPopupList::OfferKeyEventL
   337         (const TKeyEvent& aKeyEvent, TEventCode aType)
   337         (const TKeyEvent& aKeyEvent, TEventCode aType)
   338     {
   338     {
   339     // The focus can display after clicking on navigation key and MSK key.
   339     if ( aKeyEvent.iCode == EKeyEscape )
   340     // Then, both LSK and RSK should be visible.
   340         {
   341     // Check whether LSK is hidden, if yes, make it visible
   341         // When the popup list is prompting for selection, if the user closes Phonebook application from FSW, 
   342     if ( !ButtonGroupContainer()->IsCommandVisible( EAknSoftkeySelect ) )
   342         // the dialog is to be closed otherwise re-enter Phonebook would result in wrong UI behavior.
   343     	{
   343         AttemptExitL( EFalse);
   344         // Whether navigation key or MSK key is pressed.
   344         }
   345     	if ( aKeyEvent.iCode == EKeyUpArrow  
   345     else
   346           || aKeyEvent.iCode == EKeyDownArrow 
   346         {
   347           || aKeyEvent.iCode == EKeyDevice3 )
   347         // The focus can display after clicking on navigation key and MSK key.
   348             {
   348         // Then, both LSK and RSK should be visible.
   349             ButtonGroupContainer()->MakeCommandVisible( EAknSoftkeySelect, ETrue );
   349         // Check whether LSK is hidden, if yes, make it visible
   350             }
   350         if ( !ButtonGroupContainer()->IsCommandVisible( EAknSoftkeySelect ) )
   351     	}
   351             {
       
   352             // Whether navigation key or MSK key is pressed.
       
   353             if ( aKeyEvent.iCode == EKeyUpArrow || aKeyEvent.iCode
       
   354                 == EKeyDownArrow || aKeyEvent.iCode == EKeyDevice3 )
       
   355                 {
       
   356                 ButtonGroupContainer()->MakeCommandVisible(
       
   357                     EAknSoftkeySelect, ETrue );
       
   358                 }
       
   359             }
       
   360         }
   352     TKeyResponse response = ListBox()->OfferKeyEventL( aKeyEvent, aType );
   361     TKeyResponse response = ListBox()->OfferKeyEventL( aKeyEvent, aType );
   353     return response;
   362     return response;
   354     }
   363     }
   355 
   364 
   356 // --------------------------------------------------------------------------
   365 // --------------------------------------------------------------------------