diff -r b8fae6b8a148 -r d05a55b217df idlehomescreen/widgetmanager/src/wmmaincontainerview.cpp --- a/idlehomescreen/widgetmanager/src/wmmaincontainerview.cpp Wed Mar 31 21:17:19 2010 +0300 +++ b/idlehomescreen/widgetmanager/src/wmmaincontainerview.cpp Wed Apr 14 15:47:59 2010 +0300 @@ -28,14 +28,14 @@ #include #include #include +#include #include "wmplugin.h" #include "widgetmanager.hrh" #include "wmmaincontainerview.h" #include "wmresourceloader.h" #include "wmmaincontainer.h" -#include - +#include "wmspbgcleaner.h" // --------------------------------------------------------- // CWmMainContainerView::CWmMainContainerView() @@ -46,6 +46,7 @@ iWmPlugin( aWmPlugin ) { iWmMainContainer = NULL; + iWmSpBgCleaner = NULL; } // --------------------------------------------------------- @@ -61,6 +62,13 @@ delete iWmMainContainer; iWmMainContainer = NULL; } + + if ( iWmSpBgCleaner != NULL ) + { + AppUi()->RemoveFromStack( iWmSpBgCleaner ); + delete iWmSpBgCleaner; + iWmSpBgCleaner = NULL; + } } // --------------------------------------------------------- @@ -180,20 +188,25 @@ { // setup status pane layout StatusPane()->SwitchLayoutL( - R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT ); - StatusPane()->ApplyCurrentSettingsL(); - + R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT ); // disable transparancy - if ( StatusPane()->IsTransparent() ) + StatusPane()->EnableTransparent( EFalse ); + // apply changes + StatusPane()->ApplyCurrentSettingsL(); + + // create container + if ( iWmSpBgCleaner == NULL ) { - StatusPane()->EnableTransparent( EFalse ); + iWmSpBgCleaner = CWmSpBgCleaner::NewL(); + iWmSpBgCleaner->SetMopParent( this ); + AppUi()->AddToStackL( *this, iWmSpBgCleaner ); } // title in status pane SetTitleL(); - + StatusPane()->DrawNow(); - + // update cba CEikButtonGroupContainer* bgc( Cba() ); CEikCba* cba = static_cast< CEikCba* >( bgc->ButtonGroup() ); @@ -232,27 +245,13 @@ iWmMainContainer = NULL; iWmPlugin.MainViewDeactivated(); } - } -// --------------------------------------------------------- -// CWmMainContainerView::HandleStatusPaneSizeChange -// --------------------------------------------------------- -// -void CWmMainContainerView::HandleStatusPaneSizeChange() - { - CAknView::HandleStatusPaneSizeChange(); - - // this may fail, but we're not able to propagate exceptions here - TVwsViewId view; - AppUi()->GetActiveViewId( view ); - if ( view.iViewUid == Id() ) - { - if ( iWmMainContainer ) - { - iWmMainContainer->SetRect( AppUi()->ClientRect() ); - } - } - + if ( iWmSpBgCleaner != NULL ) + { + AppUi()->RemoveFromStack( iWmSpBgCleaner ); + delete iWmSpBgCleaner; + iWmSpBgCleaner = NULL; + } } // --------------------------------------------------------- @@ -429,7 +428,7 @@ TBool CWmMainContainerView::HandleDeactivateFindPaneL() { if ( iWmMainContainer ) - { + { iWmMainContainer->DeactivateFindPaneL(); } return ETrue;