uifw/AvKon/src/aknview.cpp
branchRCL_3
changeset 8 71dd06cfe933
parent 5 aabf2c525e0f
child 9 0aa5fbdfbc30
--- a/uifw/AvKon/src/aknview.cpp	Wed Mar 31 21:59:52 2010 +0300
+++ b/uifw/AvKon/src/aknview.cpp	Wed Apr 14 16:14:00 2010 +0300
@@ -82,7 +82,6 @@
     public:
         TBool iToolbarVisible; 
         TBool iToolbarFocusing; 
-        TBool iViewActivated;
     private: // data
         CAknToolbar* iToolbar;
         CAknToolbar* iFixedToolbar;
@@ -428,6 +427,8 @@
 
 	delete iCba;
 	delete iExtension;
+
+    AknItemActionMenuRegister::RemoveConstructingMenuBarOwner( this );
 	}
 
 // -----------------------------------------------------------------------------
@@ -459,10 +460,7 @@
         
     Extension()->CreateToolbarL( iViewInfo.iToolbar );
 
-    if ( iViewInfo.iMenu )
-        {
-        AknItemActionMenuRegister::SetConstructingMenuBarOwnerL( this );
-        }
+    AknItemActionMenuRegister::SetConstructingMenuBarOwnerL( this );
     }
 
 // -----------------------------------------------------------------------------
@@ -580,31 +578,14 @@
 //
 EXPORT_C void CAknView::AknViewActivatedL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage )
 	{
+    AknItemActionMenuRegister::SetConstructingMenuBarOwnerL( this );
 	ConstructMenuAndCbaL( ETrue );
 
-    if ( !iViewInfo.iMenu )
-        {
-        AknItemActionMenuRegister::SetConstructingMenuBarOwnerL( this );
-        }
     
 	Extension()->PrepareToolbar();
 
 	DoActivateL( aPrevViewId, aCustomMessageId, aCustomMessage );
 
-    if ( !Extension()->iViewActivated || !iViewInfo.iMenu )
-        {
-        // Reset menu bar owner when view first activated
-        AknItemActionMenuRegister::SetConstructingMenuBarOwnerL( NULL );
-        Extension()->iViewActivated = ETrue;
-        }
-
-#ifdef RD_SCALABLE_UI_V2
-    if ( iAvkonAppUi->TouchPane() )
-        {
-        iAvkonAppUi->TouchPane()->RefreshL();
-        }
-#endif // RD_SCALABLE_UI_V2
-
 	ProcessForegroundEventL( ETrue );
 	}
 
@@ -621,6 +602,8 @@
 
 	DoDeactivate();
 
+	AknItemActionMenuRegister::RemoveConstructingMenuBarOwner( this );
+	
 	if ( iCba )
 		{
 		iCba->MakeVisible( EFalse );