gssettingsuis/Gs/GSFramework/src/GSParentPlugin.cpp
branchRCL_3
changeset 11 23553eb4e470
parent 8 f62c3a3d66b8
child 14 9941bcf99348
--- a/gssettingsuis/Gs/GSFramework/src/GSParentPlugin.cpp	Fri Mar 12 15:43:47 2010 +0200
+++ b/gssettingsuis/Gs/GSFramework/src/GSParentPlugin.cpp	Mon Mar 15 12:41:46 2010 +0200
@@ -73,7 +73,7 @@
 
     __GSLOGSTRING( "[CGSParentPlugin] ConstructL()" );
     iAppUi = AppUi();
-
+    iPosition.Reset();
     OpenLocalizedResourceFileL( KGSParentPluginResourceFileName,
                                 iResourceLoader );
     CAknView::BaseConstructL( aViewRscId );
@@ -139,10 +139,6 @@
         iAppUi->RemoveFromViewStack( *this, iContainer );
         delete iContainer;
         }
-    if ( iPosition.Count() > 0)
-    	{
-    	iPosition.Close();
-    	}
     }
 
 
@@ -218,15 +214,15 @@
     
         // Update listbox from already existing iPluginArray:
         iContainer->UpdateListBoxL();
-		if (iPosition.Count() > 0)
+		if ( iPosition.iCurrentItemIndex != -1 )
 			{
-			if (iScreenMode == Layout_Meta_Data::IsLandscapeOrientation())
+			if ( iIsLandscapeOrientation == Layout_Meta_Data::IsLandscapeOrientation() )
 				{
-				iContainer->SetPosition(iPosition, EFalse);
+				iContainer->RestoreListBoxPositionL( iPosition, EFalse );
 				}
 			else
 				{
-				iContainer->SetPosition(iPosition, ETrue);
+				iContainer->RestoreListBoxPositionL( iPosition, ETrue );
 				}
 			}
 		iAppUi->AddToViewStackL(*this, iContainer);
@@ -272,12 +268,9 @@
     
     if ( iContainer )
         {
-		if (iPosition.Count() > 0)
-			{
-			iPosition.Reset();
-			}
-		TRAPD(err, iContainer->GetPositionL(iPosition));
-		iScreenMode = Layout_Meta_Data::IsLandscapeOrientation();
+		iPosition.Reset();
+		TRAPD( err, iContainer->StoreListBoxPositionL( iPosition ) );
+		iIsLandscapeOrientation = Layout_Meta_Data::IsLandscapeOrientation();
 
 		iAppUi->RemoveFromViewStack(*this, iContainer);
         delete iContainer;