--- a/gssettingsuis/Gs/GSFramework/src/GSParentPlugin.cpp Tue Feb 02 00:22:03 2010 +0200
+++ b/gssettingsuis/Gs/GSFramework/src/GSParentPlugin.cpp Fri Mar 19 09:34:30 2010 +0200
@@ -35,9 +35,8 @@
#include <bautils.h>
#include <eikmenup.h>
#include <eikbtgpc.h>
-#include <hlplch.h>
#include <StringLoader.h>
-#include <layoutmetadata.cdl.h>
+
// Middle Softkey control ID.
const TInt KGSMSKControlID = 3;
const TInt KGSMSKLength = 256;
@@ -214,18 +213,17 @@
// Update listbox from already existing iPluginArray:
iContainer->UpdateListBoxL();
- if (position.Count() > 0)
- {
- if (iScreenMode == Layout_Meta_Data::IsLandscapeOrientation())
- {
- iContainer->SetPosition(position, EFalse);
- }
- else
- {
- iContainer->SetPosition(position, ETrue);
- }
- }
- iAppUi->AddToViewStackL(*this, iContainer);
+ iAppUi->AddToViewStackL( *this, iContainer );
+ if( iTopPluginUid != KGSNoneSelected )
+ {
+ iContainer->SetTopItem( iTopPluginUid );
+ }
+ if( iSelectedPluginUid != KGSNoneSelected )
+ {
+ iContainer->SetSelectedItem( iSelectedPluginUid );
+ }
+ }
+
// Navigating to parent view will reset all child plugin selected indexes:
for( TInt i = 0; i < iPluginArray->Count(); i++ )
{
@@ -238,21 +236,19 @@
SetMiddleSoftKeyLabelL( R_QTN_MSK_OPEN, EAknSoftkeyOpen );
CheckMiddleSoftkeyLabelL();
- // If this view was launched from external source, use "exit" as RSK
- if (iPrevViewId.iAppUid != KUidGS)
+ // If this view was launched from external source, use "exit" as RSK
+ if ( iPrevViewId.iAppUid != KUidGS )
+ {
+ CEikButtonGroupContainer* cbaGroup = Cba();
+ if(cbaGroup)
{
- CEikButtonGroupContainer* cbaGroup = Cba();
- if (cbaGroup)
- {
- HBufC* rightSKText = StringLoader::LoadLC(
- R_GS_PARENTPLUGIN_CBA_EXIT);
- TPtr rskPtr = rightSKText->Des();
- cbaGroup->SetCommandL(2, EAknSoftkeyExit, *rightSKText);
- CleanupStack::PopAndDestroy(rightSKText);
- }
+ HBufC* rightSKText = StringLoader::LoadLC (R_GS_PARENTPLUGIN_CBA_EXIT);
+ TPtr rskPtr = rightSKText->Des();
+ cbaGroup->SetCommandL(2,EAknSoftkeyExit,*rightSKText);
+ CleanupStack::PopAndDestroy(rightSKText);
}
+ }
- }
}
// ---------------------------------------------------------------------------
@@ -268,14 +264,26 @@
if ( iContainer )
{
- if (position.Count() > 0)
- {
- position.Reset();
- }
- TRAPD(err, iContainer->GetPositionL(position));
- iScreenMode = Layout_Meta_Data::IsLandscapeOrientation();
+ CGSPluginInterface* selectedPlugin = iContainer->SelectedPlugin();
+ if( selectedPlugin )
+ {
+ iSelectedPluginUid = selectedPlugin->Id();
+ }
+ else
+ {
+ iSelectedPluginUid = KGSNoneSelected;
+ }
- iAppUi->RemoveFromViewStack(*this, iContainer);
+ CGSPluginInterface* topPlugin = iContainer->TopPlugin();
+ if ( topPlugin )
+ {
+ iTopPluginUid = topPlugin->Id();
+ }
+ else
+ {
+ iTopPluginUid = KGSNoneSelected;
+ }
+ iAppUi->RemoveFromViewStack( *this, iContainer );
delete iContainer;
iContainer = NULL;
}
@@ -367,11 +375,6 @@
break;
case EAknCmdHelp:
{
- if( FeatureManager::FeatureSupported( KFeatureIdHelp ) )
- {
- HlpLauncher::LaunchHelpApplicationL(
- iEikonEnv->WsSession(), iAppUi->AppHelpContextL() );
- }
break;
}
default: