presencesettingsui/src/psuigsplugincontainer.cpp
changeset 13 b7e70c0792e6
parent 12 e6a66db4e9d0
--- a/presencesettingsui/src/psuigsplugincontainer.cpp	Fri Mar 19 09:37:41 2010 +0200
+++ b/presencesettingsui/src/psuigsplugincontainer.cpp	Fri Apr 16 15:21:55 2010 +0300
@@ -21,7 +21,6 @@
 // INCLUDE FILES
 #include <psuigspluginrsc.rsg>
 #include <aknlists.h>
-#include <gsbasecontainer.h>
 #include "psuigsplugincontainer.h"
 #include "psuigspluginmodel.h"
 #include "psuigsplugin.h"
@@ -45,10 +44,8 @@
 // Symbian OS phase 2 constructor
 // ---------------------------------------------------------------------------
 //
-void CPSUIGSPluginContainer::ConstructL( const TRect& aRect )
+void CPSUIGSPluginContainer::ConstructL( const TRect& /*aRect*/ )
     {
-    iListBox = new ( ELeave ) CAknSingleStyleListBox();// base needs the iListBox to be prepared 1st
-    BaseConstructL( aRect, R_PSUI_MAINVIEW_TITLE, 0 );// last parameter 0, since dynamic listbox
     }
 
 // ---------------------------------------------------------------------------
@@ -61,66 +58,12 @@
     }
 
 // ---------------------------------------------------------------------------
-// CPSUIGSPluginContainer::ConstructListBoxL()
-// See header for details. 
-// ---------------------------------------------------------------------------
-//
-void CPSUIGSPluginContainer::ConstructListBoxL( TInt /*aResLbxId*/ )
-    {
-    // listbox creation and initialization
-    iListBox->SetContainerWindowL( *this );
-    iListBox->ConstructL( this, EAknListBoxLoopScrolling );
-    iListBox->CreateScrollBarFrameL( ETrue );
-    iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
-        CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto );
-
-    SetEmptyTextsToListboxL();
-    
-    CPSUIGSPluginModel* psuiModel = iView->PSModel();// not owned
-    CTextListBoxModel* model = iListBox->Model();
-    model->SetItemTextArray( psuiModel );
-    model->SetOwnershipType( ELbmDoesNotOwnItemArray );
-    }
-
-// ---------------------------------------------------------------------------
 // CPSUIGSPluginContainer::SetEmptyTextsToListboxL()
 // See header for details. 
 // ---------------------------------------------------------------------------
 //
 void CPSUIGSPluginContainer::SetEmptyTextsToListboxL()
     {
-    // empty texts
-    _LIT ( KPSUIEmptyStringHeader, "%S\n%S" );
-    HBufC* emptyText = iEikonEnv->AllocReadResourceLC( 
-        R_QTN_PRESENCE_SETTINGS_EMPTY_PRIMARY );
-    HBufC* emptyText2 = iEikonEnv->AllocReadResourceLC( 
-        R_QTN_PRESENCE_SETTINGS_EMPTY_SECONDARY );   
-    HBufC* emptyFinal = HBufC::NewLC( 
-        emptyText->Length() + emptyText2->Length() + 2 );// 2 is length of "\n" 
-    emptyFinal->Des().Format( KPSUIEmptyStringHeader, emptyText, emptyText2 );
-    iListBox->View()->SetListEmptyTextL( *emptyFinal );
-    CleanupStack::PopAndDestroy( 3, emptyText );// emptyText, emptyText2, emptyFinal
-    }
-    
-// ---------------------------------------------------------------------------
-// CPSUIGSPluginContainer::OfferKeyEventL()
-// See header for details. 
-// ---------------------------------------------------------------------------
-//
-TKeyResponse CPSUIGSPluginContainer::OfferKeyEventL( 
-    const TKeyEvent& aKeyEvent, 
-    TEventCode aType )
-    {
-    if ( iView && aType == EEventKey 
-        && aKeyEvent.iCode == EKeyBackspace )
-        {
-        iView->DeleteSettingsL();
-        return EKeyWasConsumed;
-        }
-    else
-        {
-        return iListBox->OfferKeyEventL( aKeyEvent, aType );
-        }
     }
 
 // -----------------------------------------------------------------------------