80 void CreateAndSetToolbarL( TInt aResourceId ); |
80 void CreateAndSetToolbarL( TInt aResourceId ); |
81 |
81 |
82 public: |
82 public: |
83 TBool iToolbarVisible; |
83 TBool iToolbarVisible; |
84 TBool iToolbarFocusing; |
84 TBool iToolbarFocusing; |
85 TBool iViewActivated; |
|
86 private: // data |
85 private: // data |
87 CAknToolbar* iToolbar; |
86 CAknToolbar* iToolbar; |
88 CAknToolbar* iFixedToolbar; |
87 CAknToolbar* iFixedToolbar; |
89 CAknView* iView; |
88 CAknView* iView; |
90 }; |
89 }; |
457 CleanupStack::PopAndDestroy(); // r |
458 CleanupStack::PopAndDestroy(); // r |
458 } |
459 } |
459 |
460 |
460 Extension()->CreateToolbarL( iViewInfo.iToolbar ); |
461 Extension()->CreateToolbarL( iViewInfo.iToolbar ); |
461 |
462 |
462 if ( iViewInfo.iMenu ) |
463 AknItemActionMenuRegister::SetConstructingMenuBarOwnerL( this ); |
463 { |
|
464 AknItemActionMenuRegister::SetConstructingMenuBarOwnerL( this ); |
|
465 } |
|
466 } |
464 } |
467 |
465 |
468 // ----------------------------------------------------------------------------- |
466 // ----------------------------------------------------------------------------- |
469 // CAknView::AppUi |
467 // CAknView::AppUi |
470 // Accessor for the app UI as a CAknViewAppUi. |
468 // Accessor for the app UI as a CAknViewAppUi. |
578 // Called by the application UI when a view is activated. |
576 // Called by the application UI when a view is activated. |
579 // ----------------------------------------------------------------------------- |
577 // ----------------------------------------------------------------------------- |
580 // |
578 // |
581 EXPORT_C void CAknView::AknViewActivatedL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage ) |
579 EXPORT_C void CAknView::AknViewActivatedL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage ) |
582 { |
580 { |
|
581 AknItemActionMenuRegister::SetConstructingMenuBarOwnerL( this ); |
583 ConstructMenuAndCbaL( ETrue ); |
582 ConstructMenuAndCbaL( ETrue ); |
584 |
583 |
585 if ( !iViewInfo.iMenu ) |
|
586 { |
|
587 AknItemActionMenuRegister::SetConstructingMenuBarOwnerL( this ); |
|
588 } |
|
589 |
584 |
590 Extension()->PrepareToolbar(); |
585 Extension()->PrepareToolbar(); |
591 |
586 |
592 DoActivateL( aPrevViewId, aCustomMessageId, aCustomMessage ); |
587 DoActivateL( aPrevViewId, aCustomMessageId, aCustomMessage ); |
593 |
|
594 if ( !Extension()->iViewActivated || !iViewInfo.iMenu ) |
|
595 { |
|
596 // Reset menu bar owner when view first activated |
|
597 AknItemActionMenuRegister::SetConstructingMenuBarOwnerL( NULL ); |
|
598 Extension()->iViewActivated = ETrue; |
|
599 } |
|
600 |
|
601 #ifdef RD_SCALABLE_UI_V2 |
|
602 if ( iAvkonAppUi->TouchPane() ) |
|
603 { |
|
604 iAvkonAppUi->TouchPane()->RefreshL(); |
|
605 } |
|
606 #endif // RD_SCALABLE_UI_V2 |
|
607 |
588 |
608 ProcessForegroundEventL( ETrue ); |
589 ProcessForegroundEventL( ETrue ); |
609 } |
590 } |
610 |
591 |
611 // ----------------------------------------------------------------------------- |
592 // ----------------------------------------------------------------------------- |