555 // Otherwise the old container is deactivated and the new is activated |
555 // Otherwise the old container is deactivated and the new is activated |
556 if ( iFlags.IsSet( EIsDestructionRunning ) || iContainer == &aContainer ) |
556 if ( iFlags.IsSet( EIsDestructionRunning ) || iContainer == &aContainer ) |
557 { |
557 { |
558 return; |
558 return; |
559 } |
559 } |
560 |
560 |
561 // Get previous container and then deactivate it |
|
562 const CXnViewData* previous( iContainer ); |
|
563 const CXnViewData& active( iAppUiAdapter.ViewManager().ActiveViewData() ); |
|
564 |
|
565 DeactivateContainerL( EFalse ); |
|
566 |
|
567 if ( iFlags.IsClear( EIsActivated ) ) |
561 if ( iFlags.IsClear( EIsActivated ) ) |
568 { |
562 { |
569 // Some other view than this in this appui is currently active, |
563 // Some other view than this in this appui is currently active, |
570 // postpone container activation |
564 // postpone container activation |
571 return; |
565 return; |
572 } |
566 } |
|
567 |
|
568 const CXnViewData& active( iAppUiAdapter.ViewManager().ActiveViewData() ); |
|
569 |
|
570 CXnEffectManager* mgr( iAppUiAdapter.EffectManager() ); |
|
571 |
|
572 CleanupStack::PushL( TCleanupItem( CleanupEffect, mgr ) ); |
|
573 |
|
574 TBool started( |
|
575 mgr->BeginActivateViewEffect( active, aContainer, aEffect ) ); |
|
576 |
|
577 DeactivateContainerL( EFalse ); |
573 |
578 |
574 // Update |
579 // Update |
575 iContainer = &aContainer; |
580 iContainer = &aContainer; |
576 |
|
577 CXnEffectManager* mgr( iAppUiAdapter.EffectManager() ); |
|
578 |
|
579 CleanupStack::PushL( TCleanupItem( CleanupEffect, mgr ) ); |
|
580 |
581 |
581 // Disable layout and redraw until container activation is done |
582 // Disable layout and redraw until container activation is done |
582 iAppUiAdapter.UiEngine().DisableRenderUiLC(); |
583 iAppUiAdapter.UiEngine().DisableRenderUiLC(); |
583 |
584 |
584 // Try exit controls from powersave mode |
585 // Try exit controls from powersave mode |
618 } |
619 } |
619 else |
620 else |
620 { |
621 { |
621 EnterEditStateL( aContainer, EFalse ); |
622 EnterEditStateL( aContainer, EFalse ); |
622 } |
623 } |
623 |
624 |
624 TBool started( |
|
625 mgr->BeginActivateViewEffect( active, aContainer, aEffect ) ); |
|
626 |
|
627 if ( previous ) |
|
628 { |
|
629 CXnControlAdapter* previousControl( |
|
630 previous->Node()->LayoutNode()->Control() ); |
|
631 |
|
632 previousControl->MakeVisible( EFalse ); |
|
633 } |
|
634 |
|
635 CXnControlAdapter* adapter( node->Control() ); |
625 CXnControlAdapter* adapter( node->Control() ); |
636 adapter->MakeVisible( ETrue ); |
626 adapter->MakeVisible( ETrue ); |
637 |
627 |
638 iAppUiAdapter.ViewManager().NotifyContainerChangedL( aContainer ); |
628 iAppUiAdapter.ViewManager().NotifyContainerChangedL( aContainer ); |
639 |
629 |