42 #ifdef RD_SCALABLE_UI_V2 |
42 #ifdef RD_SCALABLE_UI_V2 |
43 #include <akntouchpane.h> |
43 #include <akntouchpane.h> |
44 #endif // RD_SCALABLE_UI_V2 |
44 #endif // RD_SCALABLE_UI_V2 |
45 |
45 |
46 #include <AknUtils.h> |
46 #include <AknUtils.h> |
|
47 #include <layoutmetadata.cdl.h> |
47 #include "aknitemactionmenuregister.h" |
48 #include "aknitemactionmenuregister.h" |
48 |
49 |
49 // MODULE DATA STRUCTURES |
50 // MODULE DATA STRUCTURES |
50 enum TAknViewFlags |
51 enum TAknViewFlags |
51 { |
52 { |
52 EAknViewForeground |
53 EAknViewForeground |
53 }; |
54 }; |
54 |
55 |
55 |
56 |
56 // CLASS DECLARATION |
57 // CLASS DECLARATION |
|
58 static const TUid KUidGlxApp = { 0x200009ee }; // App uid of photo |
|
59 static const TUid KUidVideoApp = { 0x200159b2 }; // App uid of video |
57 |
60 |
58 /** |
61 /** |
59 * Extension class. |
62 * Extension class. |
60 */ |
63 */ |
61 NONSHARABLE_CLASS(CAknViewExtension) : public CBase |
64 NONSHARABLE_CLASS(CAknViewExtension) : public CBase |
80 void CreateAndSetToolbarL( TInt aResourceId ); |
83 void CreateAndSetToolbarL( TInt aResourceId ); |
81 |
84 |
82 public: |
85 public: |
83 TBool iToolbarVisible; |
86 TBool iToolbarVisible; |
84 TBool iToolbarFocusing; |
87 TBool iToolbarFocusing; |
85 TBool iViewActivated; |
|
86 private: // data |
88 private: // data |
87 CAknToolbar* iToolbar; |
89 CAknToolbar* iToolbar; |
88 CAknToolbar* iFixedToolbar; |
90 CAknToolbar* iFixedToolbar; |
89 CAknView* iView; |
91 CAknView* iView; |
90 }; |
92 }; |
457 CleanupStack::PopAndDestroy(); // r |
460 CleanupStack::PopAndDestroy(); // r |
458 } |
461 } |
459 |
462 |
460 Extension()->CreateToolbarL( iViewInfo.iToolbar ); |
463 Extension()->CreateToolbarL( iViewInfo.iToolbar ); |
461 |
464 |
462 if ( iViewInfo.iMenu ) |
465 AknItemActionMenuRegister::SetConstructingMenuBarOwnerL( this ); |
463 { |
|
464 AknItemActionMenuRegister::SetConstructingMenuBarOwnerL( this ); |
|
465 } |
|
466 } |
466 } |
467 |
467 |
468 // ----------------------------------------------------------------------------- |
468 // ----------------------------------------------------------------------------- |
469 // CAknView::AppUi |
469 // CAknView::AppUi |
470 // Accessor for the app UI as a CAknViewAppUi. |
470 // Accessor for the app UI as a CAknViewAppUi. |
530 // empty. |
530 // empty. |
531 // ----------------------------------------------------------------------------- |
531 // ----------------------------------------------------------------------------- |
532 // |
532 // |
533 EXPORT_C void CAknView::HandleStatusPaneSizeChange() |
533 EXPORT_C void CAknView::HandleStatusPaneSizeChange() |
534 { |
534 { |
|
535 if ( Cba() ) |
|
536 { |
|
537 TRect cbaRect( 0,0,0,0 ); |
|
538 Cba()->SetBoundingRect( cbaRect ); |
|
539 } |
535 } |
540 } |
536 |
541 |
537 // ----------------------------------------------------------------------------- |
542 // ----------------------------------------------------------------------------- |
538 // CAknView::SetEmphasis |
543 // CAknView::SetEmphasis |
539 // Menu emphasis function. |
544 // Menu emphasis function. |
573 // Called by the application UI when a view is activated. |
578 // Called by the application UI when a view is activated. |
574 // ----------------------------------------------------------------------------- |
579 // ----------------------------------------------------------------------------- |
575 // |
580 // |
576 EXPORT_C void CAknView::AknViewActivatedL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage ) |
581 EXPORT_C void CAknView::AknViewActivatedL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage ) |
577 { |
582 { |
|
583 AknItemActionMenuRegister::SetConstructingMenuBarOwnerL( this ); |
578 ConstructMenuAndCbaL( ETrue ); |
584 ConstructMenuAndCbaL( ETrue ); |
579 if ( !Extension()->iViewActivated ) |
585 |
580 { |
586 |
581 // Reset menu bar owner when view first activated |
|
582 AknItemActionMenuRegister::SetConstructingMenuBarOwnerL( NULL ); |
|
583 Extension()->iViewActivated = ETrue; |
|
584 } |
|
585 |
|
586 Extension()->PrepareToolbar(); |
587 Extension()->PrepareToolbar(); |
587 |
588 |
588 DoActivateL( aPrevViewId, aCustomMessageId, aCustomMessage ); |
589 DoActivateL( aPrevViewId, aCustomMessageId, aCustomMessage ); |
589 |
|
590 #ifdef RD_SCALABLE_UI_V2 |
|
591 if ( iAvkonAppUi->TouchPane() ) |
|
592 { |
|
593 iAvkonAppUi->TouchPane()->RefreshL(); |
|
594 } |
|
595 #endif // RD_SCALABLE_UI_V2 |
|
596 |
590 |
597 ProcessForegroundEventL( ETrue ); |
591 ProcessForegroundEventL( ETrue ); |
598 } |
592 } |
599 |
593 |
600 // ----------------------------------------------------------------------------- |
594 // ----------------------------------------------------------------------------- |
863 CleanupStack::Pop(); // menu |
857 CleanupStack::Pop(); // menu |
864 iMenu = menu; |
858 iMenu = menu; |
865 } |
859 } |
866 } |
860 } |
867 |
861 |
868 if ( iCba ) |
862 if (iCba) |
869 { |
863 { |
870 if ( aVisible ) |
864 if (aVisible) |
871 { |
865 { |
872 iCba->DrawableWindow()->SetOrdinalPosition( 0 ); |
866 //Added for fixing EAMI-856GRV and ESLM-85ZHQH: |
|
867 //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 |
|
868 //so the solution is to don't call SetOrdinalPosition in video app and photo app while in landscape mode |
|
869 TUid appid = iAppUi->Application()->AppDllUid(); |
|
870 if (!(( appid == KUidVideoApp || appid == KUidGlxApp ) |
|
871 && Layout_Meta_Data::IsLandscapeOrientation())) |
|
872 { |
|
873 iCba->DrawableWindow()->SetOrdinalPosition( 0 ); |
|
874 } |
|
875 |
873 iCba->MakeVisible( ETrue ); |
876 iCba->MakeVisible( ETrue ); |
874 iCba->DrawNow(); // This is needed because problems if TRANSPARENCY is set, see MTVN-6HXCN4 |
877 iCba->DrawNow(); // This is needed because problems if TRANSPARENCY is set, see MTVN-6HXCN4 |
875 } |
878 } |
876 } |
879 } |
877 else |
880 else |