presencesettingsui/src/psuigsplugincontainer.cpp
changeset 12 e6a66db4e9d0
parent 0 c8caa15ef882
child 13 b7e70c0792e6
equal deleted inserted replaced
0:c8caa15ef882 12:e6a66db4e9d0
    47 //
    47 //
    48 void CPSUIGSPluginContainer::ConstructL( const TRect& aRect )
    48 void CPSUIGSPluginContainer::ConstructL( const TRect& aRect )
    49     {
    49     {
    50     iListBox = new ( ELeave ) CAknSingleStyleListBox();// base needs the iListBox to be prepared 1st
    50     iListBox = new ( ELeave ) CAknSingleStyleListBox();// base needs the iListBox to be prepared 1st
    51     BaseConstructL( aRect, R_PSUI_MAINVIEW_TITLE, 0 );// last parameter 0, since dynamic listbox
    51     BaseConstructL( aRect, R_PSUI_MAINVIEW_TITLE, 0 );// last parameter 0, since dynamic listbox
    52     
       
    53     iEikMenuBar = new ( ELeave ) CEikMenuBar();
       
    54     iEikMenuBar->ConstructL( this, NULL, R_PSUI_MAINVIEW_MENUBAR );
       
    55     }
    52     }
    56 
    53 
    57 // ---------------------------------------------------------------------------
    54 // ---------------------------------------------------------------------------
    58 // CPSUIGSPluginContainer::~CPSUIGSPluginContainer()
    55 // CPSUIGSPluginContainer::~CPSUIGSPluginContainer()
    59 // Destructor
    56 // Destructor
    60 // ---------------------------------------------------------------------------
    57 // ---------------------------------------------------------------------------
    61 //
    58 //
    62 CPSUIGSPluginContainer::~CPSUIGSPluginContainer()
    59 CPSUIGSPluginContainer::~CPSUIGSPluginContainer()
    63     {
    60     {
    64     delete iEikMenuBar;
       
    65     }
    61     }
    66 
    62 
    67 // ---------------------------------------------------------------------------
    63 // ---------------------------------------------------------------------------
    68 // CPSUIGSPluginContainer::ConstructListBoxL()
    64 // CPSUIGSPluginContainer::ConstructListBoxL()
    69 // See header for details. 
    65 // See header for details. 
   114 TKeyResponse CPSUIGSPluginContainer::OfferKeyEventL( 
   110 TKeyResponse CPSUIGSPluginContainer::OfferKeyEventL( 
   115     const TKeyEvent& aKeyEvent, 
   111     const TKeyEvent& aKeyEvent, 
   116     TEventCode aType )
   112     TEventCode aType )
   117     {
   113     {
   118     if ( iView && aType == EEventKey 
   114     if ( iView && aType == EEventKey 
   119         && aKeyEvent.iCode == EKeyBackspace && 
   115         && aKeyEvent.iCode == EKeyBackspace )
   120         iEikMenuBar->ItemSpecificCommandsEnabled() )
       
   121         {
   116         {
   122         iView->DeleteSettingsL();
   117         iView->DeleteSettingsL();
   123         return EKeyWasConsumed;
   118         return EKeyWasConsumed;
   124         }
   119         }
   125     else
   120     else