gssettingsuis/Gs/GSFramework/src/GSParentPlugin.cpp
branchRCL_3
changeset 11 23553eb4e470
parent 8 f62c3a3d66b8
child 14 9941bcf99348
equal deleted inserted replaced
10:c8b9b0986973 11:23553eb4e470
    71     iSelectedPluginUid = KGSNoneSelected;
    71     iSelectedPluginUid = KGSNoneSelected;
    72     iTopPluginUid = KGSNoneSelected;
    72     iTopPluginUid = KGSNoneSelected;
    73 
    73 
    74     __GSLOGSTRING( "[CGSParentPlugin] ConstructL()" );
    74     __GSLOGSTRING( "[CGSParentPlugin] ConstructL()" );
    75     iAppUi = AppUi();
    75     iAppUi = AppUi();
    76 
    76     iPosition.Reset();
    77     OpenLocalizedResourceFileL( KGSParentPluginResourceFileName,
    77     OpenLocalizedResourceFileL( KGSParentPluginResourceFileName,
    78                                 iResourceLoader );
    78                                 iResourceLoader );
    79     CAknView::BaseConstructL( aViewRscId );
    79     CAknView::BaseConstructL( aViewRscId );
    80 
    80 
    81     if( !iOptionFlags[ EGSLoadChildrenOnActivation ] )
    81     if( !iOptionFlags[ EGSLoadChildrenOnActivation ] )
   137     if( iContainer )
   137     if( iContainer )
   138         {
   138         {
   139         iAppUi->RemoveFromViewStack( *this, iContainer );
   139         iAppUi->RemoveFromViewStack( *this, iContainer );
   140         delete iContainer;
   140         delete iContainer;
   141         }
   141         }
   142     if ( iPosition.Count() > 0)
       
   143     	{
       
   144     	iPosition.Close();
       
   145     	}
       
   146     }
   142     }
   147 
   143 
   148 
   144 
   149 // ---------------------------------------------------------------------------
   145 // ---------------------------------------------------------------------------
   150 // CGSParentPlugin::OpenLocalizedResourceFileL()
   146 // CGSParentPlugin::OpenLocalizedResourceFileL()
   216         TBuf<1> empty( KEmptyText );
   212         TBuf<1> empty( KEmptyText );
   217         iContainer->SetListBoxEmptyTextL( empty );
   213         iContainer->SetListBoxEmptyTextL( empty );
   218     
   214     
   219         // Update listbox from already existing iPluginArray:
   215         // Update listbox from already existing iPluginArray:
   220         iContainer->UpdateListBoxL();
   216         iContainer->UpdateListBoxL();
   221 		if (iPosition.Count() > 0)
   217 		if ( iPosition.iCurrentItemIndex != -1 )
   222 			{
   218 			{
   223 			if (iScreenMode == Layout_Meta_Data::IsLandscapeOrientation())
   219 			if ( iIsLandscapeOrientation == Layout_Meta_Data::IsLandscapeOrientation() )
   224 				{
   220 				{
   225 				iContainer->SetPosition(iPosition, EFalse);
   221 				iContainer->RestoreListBoxPositionL( iPosition, EFalse );
   226 				}
   222 				}
   227 			else
   223 			else
   228 				{
   224 				{
   229 				iContainer->SetPosition(iPosition, ETrue);
   225 				iContainer->RestoreListBoxPositionL( iPosition, ETrue );
   230 				}
   226 				}
   231 			}
   227 			}
   232 		iAppUi->AddToViewStackL(*this, iContainer);
   228 		iAppUi->AddToViewStackL(*this, iContainer);
   233     // Navigating to parent view will reset all child plugin selected indexes:
   229     // Navigating to parent view will reset all child plugin selected indexes:
   234     for( TInt i = 0; i < iPluginArray->Count(); i++ )
   230     for( TInt i = 0; i < iPluginArray->Count(); i++ )
   270     
   266     
   271     iPluginLoader->RequestPriority( CActive::EPriorityLow );
   267     iPluginLoader->RequestPriority( CActive::EPriorityLow );
   272     
   268     
   273     if ( iContainer )
   269     if ( iContainer )
   274         {
   270         {
   275 		if (iPosition.Count() > 0)
   271 		iPosition.Reset();
   276 			{
   272 		TRAPD( err, iContainer->StoreListBoxPositionL( iPosition ) );
   277 			iPosition.Reset();
   273 		iIsLandscapeOrientation = Layout_Meta_Data::IsLandscapeOrientation();
   278 			}
       
   279 		TRAPD(err, iContainer->GetPositionL(iPosition));
       
   280 		iScreenMode = Layout_Meta_Data::IsLandscapeOrientation();
       
   281 
   274 
   282 		iAppUi->RemoveFromViewStack(*this, iContainer);
   275 		iAppUi->RemoveFromViewStack(*this, iContainer);
   283         delete iContainer;
   276         delete iContainer;
   284         iContainer = NULL;
   277         iContainer = NULL;
   285         }
   278         }