menufw/menufwui/matrixmenu/src/mmappui.cpp
branchRCL_3
changeset 17 b8fae6b8a148
parent 9 f966699dea19
child 19 79311d856354
--- a/menufw/menufwui/matrixmenu/src/mmappui.cpp	Mon Mar 15 12:39:47 2010 +0200
+++ b/menufw/menufwui/matrixmenu/src/mmappui.cpp	Wed Mar 31 21:17:19 2010 +0300
@@ -12,8 +12,8 @@
 * Contributors:
 *
 * Description:  Application UI class
-*  Version     : %version: MM_176.1.28.1.65 % << Don't touch! Updated by Synergy at check-out.
-*  Version     : %version: MM_176.1.28.1.65 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: MM_176.1.28.1.67 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: MM_176.1.28.1.67 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -96,7 +96,9 @@
     	EAknEnableSkin | EAknSingleClickCompatible :
         EAknEnableSkin | EAknEnableMSK;
     BaseConstructL( appUiFlags );
-
+    //hide Menu from TS at startup
+    HideApplicationFromFSW( ETrue );
+    isHiddenFromFS = ETrue;
     FeatureManager::InitializeLibL();
     iIsKastorEffectStarted = EFalse;
     StartLayoutSwitchFullScreen( AknTransEffect::EApplicationStart );
@@ -1797,15 +1799,21 @@
 
     if( iCurrentContainer != aWidgetContainer )
         {
-        TBool highlightVisibleBefore = iCurrentContainer != NULL &&
-			iCurrentContainer->IsHighlightVisible();
+        // We want a highlight to be visible while switching between
+        // grid and list views but no highlight should be visible
+        // after opening a folder.
+        TBool highlightVisibleBefore =
+            iCurrentContainer &&
+            aWidgetContainer &&
+			iCurrentContainer->IsHighlightVisible() &&
+			iCurrentContainer->WidgetType() != aWidgetContainer->WidgetType();
 
         HandleWidgetChangeRefreshL( aWidgetContainer );
 
         if ( highlightVisibleBefore )
-        	{
-        	iCurrentContainer->SetHighlightVisibilityL( ETrue );
-        	}
+            {
+            iCurrentContainer->SetHighlightVisibilityL( ETrue );
+            }
         }
     else
         {
@@ -2973,6 +2981,13 @@
 	{
 		DEBUG(("_Mm_:CMmAppUi::HandleWsEventL "
 						"- KAknFullOrPartialForegroundGained"));
+    //show Menu in TS when launched for the first time
+    if( isHiddenFromFS )
+        {
+        HideApplicationFromFSW( EFalse );
+        isHiddenFromFS = EFalse;
+        }
+	
 	if (iCurrentContainer && iCurrentSuiteModel )
 		{
 		iCurrentContainer->HandleForegroundGainedL();