--- a/uifw/AvKon/src/aknview.cpp Tue Aug 31 15:28:30 2010 +0300
+++ b/uifw/AvKon/src/aknview.cpp Wed Sep 01 12:16:19 2010 +0100
@@ -44,6 +44,7 @@
#endif // RD_SCALABLE_UI_V2
#include <AknUtils.h>
+#include <layoutmetadata.cdl.h>
#include "aknitemactionmenuregister.h"
// MODULE DATA STRUCTURES
@@ -54,6 +55,8 @@
// CLASS DECLARATION
+static const TUid KUidGlxApp = { 0x200009ee }; // App uid of photo
+static const TUid KUidVideoApp = { 0x200159b2 }; // App uid of video
/**
* Extension class.
@@ -82,7 +85,6 @@
public:
TBool iToolbarVisible;
TBool iToolbarFocusing;
- TBool iViewActivated;
private: // data
CAknToolbar* iToolbar;
CAknToolbar* iFixedToolbar;
@@ -227,11 +229,10 @@
{
if ( newFixedToolbar && newFixedToolbar->ToolbarFlags() & KAknToolbarDefault )
- {
- oldFixedToolbar->HandleResourceChange( KAknToolbarSetHiddenAndDrawBackground );
- return;
- }
-
+ {
+ return;
+ }
+
oldFixedToolbar->HandleResourceChange( KAknToolbarSetHidden );
}
#endif
@@ -428,6 +429,8 @@
delete iCba;
delete iExtension;
+
+ AknItemActionMenuRegister::RemoveConstructingMenuBarOwner( this );
}
// -----------------------------------------------------------------------------
@@ -459,10 +462,7 @@
Extension()->CreateToolbarL( iViewInfo.iToolbar );
- if ( iViewInfo.iMenu )
- {
- AknItemActionMenuRegister::SetConstructingMenuBarOwnerL( this );
- }
+ AknItemActionMenuRegister::SetConstructingMenuBarOwnerL( this );
}
// -----------------------------------------------------------------------------
@@ -532,6 +532,11 @@
//
EXPORT_C void CAknView::HandleStatusPaneSizeChange()
{
+ if ( Cba() )
+ {
+ TRect cbaRect( 0,0,0,0 );
+ Cba()->SetBoundingRect( cbaRect );
+ }
}
// -----------------------------------------------------------------------------
@@ -575,25 +580,14 @@
//
EXPORT_C void CAknView::AknViewActivatedL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage )
{
+ AknItemActionMenuRegister::SetConstructingMenuBarOwnerL( this );
ConstructMenuAndCbaL( ETrue );
- if ( !Extension()->iViewActivated )
- {
- // Reset menu bar owner when view first activated
- AknItemActionMenuRegister::SetConstructingMenuBarOwnerL( NULL );
- Extension()->iViewActivated = ETrue;
- }
-
+
+
Extension()->PrepareToolbar();
DoActivateL( aPrevViewId, aCustomMessageId, aCustomMessage );
-#ifdef RD_SCALABLE_UI_V2
- if ( iAvkonAppUi->TouchPane() )
- {
- iAvkonAppUi->TouchPane()->RefreshL();
- }
-#endif // RD_SCALABLE_UI_V2
-
ProcessForegroundEventL( ETrue );
}
@@ -865,11 +859,20 @@
}
}
- if ( iCba )
- {
- if ( aVisible )
- {
- iCba->DrawableWindow()->SetOrdinalPosition( 0 );
+ if (iCba)
+ {
+ if (aVisible)
+ {
+ //Added for fixing EAMI-856GRV and ESLM-85ZHQH:
+ //As video app and photo app spend a long time at deactiveview,during this time only cba shows up,and this is ugly in landscape mode
+ //so the solution is to don't call SetOrdinalPosition in video app and photo app while in landscape mode
+ TUid appid = iAppUi->Application()->AppDllUid();
+ if (!(( appid == KUidVideoApp || appid == KUidGlxApp )
+ && Layout_Meta_Data::IsLandscapeOrientation()))
+ {
+ iCba->DrawableWindow()->SetOrdinalPosition( 0 );
+ }
+
iCba->MakeVisible( ETrue );
iCba->DrawNow(); // This is needed because problems if TRANSPARENCY is set, see MTVN-6HXCN4
}