menufw/menufwui/matrixmenu/src/mmappui.cpp
branchRCL_3
changeset 102 ba63c83f4716
parent 88 3321d3e205b6
--- a/menufw/menufwui/matrixmenu/src/mmappui.cpp	Wed Sep 15 12:00:00 2010 +0300
+++ b/menufw/menufwui/matrixmenu/src/mmappui.cpp	Wed Oct 13 14:18:30 2010 +0300
@@ -12,8 +12,8 @@
 * Contributors:
 *
 * Description:  Application UI class
-*  Version     : %version: MM_176.1.28.1.87 % << Don't touch! Updated by Synergy at check-out.
-*  Version     : %version: MM_176.1.28.1.87 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: MM_176.1.28.1.83 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: MM_176.1.28.1.83 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -106,8 +106,8 @@
     iIsKastorEffectStarted = EFalse;
     StartLayoutSwitchFullScreen( AknTransEffect::EApplicationStart );
 
+    RefreshUiPanesL( ETrue );
     Cba()->MakeVisible( EFalse );
-    StatusPane()->MakeVisible( EFalse );
     StatusPane()->SwitchLayoutL( R_AVKON_STATUS_PANE_LAYOUT_USUAL );
 
     iDummyTemplateLib = CMmTemplateLibrary::NewL();
@@ -340,7 +340,7 @@
                 iCurrentContainer->MakeVisible( EFalse );
                 iDummyContainer->DrawNow();
                 }
-            CleanupForExitL( ECommingFromBackground );
+            CleanupForExitL( EExitKeyApplication );
             User::LeaveIfError( iCoeEnv->WsSession().SetWindowGroupOrdinalPosition(
             CEikonEnv::Static()->RootWin().Identifier(), 0 ) );
             iAppkeyHandler->StartL();
@@ -494,6 +494,11 @@
     MMPERF(("CMmAppUi::HandleBackCommandL - START"));
     DEBUG16(("\t_Mm_:current genre: %S",&iCurrentSuiteModel->SuiteName()));
 
+    iDummyContainer->MakeVisible( ETrue );
+    RefreshUiPanesL( ETrue );
+    iCurrentContainer->MakeVisible( EFalse );
+    iDummyContainer->DrawNow();
+
     iHNInterface->HandleBackEventL( iCurrentSuiteModel->SuiteName() );
 
     MMPERF(("CMmAppUi::HandleBackCommandL - DONE"));
@@ -1018,6 +1023,7 @@
 
     if ( IsEditMode() )
         {
+
         TInt modelId = iCurrentSuiteModel->IdByIndex( aModelItemIndex );
         if (modelId != KErrNotFound)
             {
@@ -1817,11 +1823,6 @@
                 aWidgetContainer &&
                 iCurrentContainer->IsHighlightVisible() &&
                 iCurrentContainer->WidgetType() != aWidgetContainer->WidgetType();
-        
-        if( iCurrentContainer && !highlightVisibleBefore )
-            {
-            iCurrentContainer->SetHighlightVisibilityL( EFalse );
-            }
 
         HandleWidgetChangeRefreshL( aWidgetContainer );
 
@@ -2376,6 +2377,7 @@
 //
 void CMmAppUi::HandleSuiteModelInitializedL( CHnSuiteModel* aModel )
     {
+
     StatusPane()->MakeVisible( ETrue );
     Cba()->MakeVisible( ETrue );
     if ( aModel == iHNInterface->GetLastSuiteModelL() )
@@ -2494,47 +2496,27 @@
         iCurrentContainer->CancelDragL( EFalse );
         SetEditModeL( EFalse );
         }
-    
-    THnSuiteWidgetType widgetType = iCurrentContainer
-            ? iCurrentContainer->WidgetType() : EUnspecified;
-    
+
     // reset model - revert to root if current view is not a suite view
     CHnSuiteModel* model = iHNInterface->GetLastSuiteModelL();
-    
-    TBool commingFromBackground( aExitKey == ECommingFromBackground ); 
-    
-    if( model && ( aExitKey == EExitKeyApplication || commingFromBackground ) )
+    if ( model && aExitKey == EExitKeyApplication )
         {
         TBool topSuiteIsBeingEvaluated =
             !model->GetItemsOrder()->IsSuiteReadyToShow();
         TBool topSuiteChanged = ResetToRootL();
         model = NULL; // ResetToRootL might have deleted the model
         TBool presentationChangeExpected = topSuiteChanged || topSuiteIsBeingEvaluated;
-        
-       
-        TBool mustDrawImmediately = !presentationChangeExpected
-                || !iDummyContainer->IsVisible() || commingFromBackground;
 
-        if( iCurrentContainer )
-            {
-            if( commingFromBackground )
-                {
-				//do not draw the widget if the previous widget type is diffenernt than the current one 
-                mustDrawImmediately &= ( widgetType
-                        == iCurrentContainer->WidgetType() );
+        TBool mustDrawImmediately =
+            !presentationChangeExpected || !iDummyContainer->IsVisible();
 
-                iCurrentContainer->SetWidgetCommingFromBackground( ETrue );
-                }
-
-            if( mustDrawImmediately )
-                {
-                DEBUG(("\t_Mm_:Top item index reset"));
-                iCurrentContainer->ResetWidgetPosition();
-                iCurrentContainer->Widget()->UpdateScrollBarsL();
-                iCurrentContainer->MakeVisible( ETrue );
-                iCurrentContainer->DrawNow();
-                iCurrentContainer->SetWidgetCommingFromBackground( EFalse );
-                }
+        if ( iCurrentContainer && mustDrawImmediately )
+            {
+            DEBUG(("\t_Mm_:Top item index reset"));
+            iCurrentContainer->ResetWidgetPosition();
+            iCurrentContainer->Widget()->UpdateScrollBarsL();
+            iCurrentContainer->MakeVisible( ETrue );
+            iCurrentContainer->DrawNow();
             }
         }
 
@@ -2621,7 +2603,6 @@
 
     if( !succeeded )
         {
-        StartLayoutSwitchFullScreen( AknTransEffect::EApplicationExit );
         ShowHomescreenL( EExitReally );
         }
     }
@@ -2823,11 +2804,7 @@
         ResetContainerMapToRootL();
         if( iCurrentContainer )
             {
-            const TInt FirstItemIndex = 0; 
-            iCurrentContainer->GetSuiteModelL()->SetSuiteHighlightL( FirstItemIndex );
-            iMakeHightlightedItemFullyVisible = ETrue;
             iCurrentContainer->ResetWidgetPosition();
-            iCurrentContainer->SetEditModeL( EFalse );
             AddToStackL( iCurrentContainer );
             }
         RefreshUiPanesL( ETrue );
@@ -3058,22 +3035,23 @@
         isHiddenFromFS = EFalse;
         }
 
-    if( iCurrentContainer && iCurrentSuiteModel )
-        {
-        iCurrentContainer->HandleForegroundGainedL();
-        iDummyContainer->MakeVisible( EFalse );
-        iCurrentContainer->MakeVisible( ETrue );
-        RefreshUiPanesL();
-        }
-    if( iSkinChangeNeeded && !iSkinChangeInProgress )
-        {
-        MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
-        if( skinInstance && !skinInstance->IsUpdateInProgress() )
-            {
-            RefreshIconsL();
-            }
-        }
+  if (iCurrentContainer && iCurrentSuiteModel )
+    {
+    iCurrentContainer->HandleForegroundGainedL();
+    iDummyContainer->MakeVisible( EFalse );
+    iCurrentContainer->MakeVisible( ETrue );
+    RefreshUiPanesL();
     }
+  if (iSkinChangeNeeded && !iSkinChangeInProgress)
+    {
+    MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
+    if (skinInstance && !skinInstance->IsUpdateInProgress())
+      {
+      RefreshIconsL();
+
+      }
+    }
+  }
 
 // ---------------------------------------------------------------------------
 //