# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1271250008 -10800 # Node ID 392fdfb57a7851e5c1e9c73c8b345684666d41fa # Parent 3e521e99f8131a79528491b5fe9b7ad60d99da01 Revision: 201013 Kit: 201015 diff -r 3e521e99f813 -r 392fdfb57a78 vtuis/videotelui/inc/CVtUiAppUi.h --- a/vtuis/videotelui/inc/CVtUiAppUi.h Wed Mar 31 21:35:06 2010 +0300 +++ b/vtuis/videotelui/inc/CVtUiAppUi.h Wed Apr 14 16:00:08 2010 +0300 @@ -1414,6 +1414,9 @@ // engine side volume CVtUiVolumeControl* iVolCtrl; + // Pending command for delayed layout change + TVtEngCommandId iPendingCmd; + private: // Friend classes // Inner class. diff -r 3e521e99f813 -r 392fdfb57a78 vtuis/videotelui/inc/CVtUiNaviPane.h --- a/vtuis/videotelui/inc/CVtUiNaviPane.h Wed Mar 31 21:35:06 2010 +0300 +++ b/vtuis/videotelui/inc/CVtUiNaviPane.h Wed Apr 14 16:00:08 2010 +0300 @@ -30,6 +30,7 @@ class CAknNavigationControlContainer; class CAknNavigationDecorator; class CVtUiNaviPaneControl; +class CVtUiMutedControl; class CVtUiAppUi; // CONSTANTS @@ -188,6 +189,9 @@ // Owned muted indicator. CAknNavigationDecorator* iMutedIndicator; + // Reference to muted control. + CVtUiMutedControl* iMutedControl; + // Owned timer instance. RTimer iTimer; diff -r 3e521e99f813 -r 392fdfb57a78 vtuis/videotelui/inc/features/prefs/cvtuiprefsettinglistbase.h --- a/vtuis/videotelui/inc/features/prefs/cvtuiprefsettinglistbase.h Wed Mar 31 21:35:06 2010 +0300 +++ b/vtuis/videotelui/inc/features/prefs/cvtuiprefsettinglistbase.h Wed Apr 14 16:00:08 2010 +0300 @@ -212,9 +212,6 @@ // Window priority for main control TInt iMainControlWindowPriority; - - // Window position for main control - TInt iMainControlWindowPosition; }; #endif // CVTUIPEFSETTINGLISTBASE_H diff -r 3e521e99f813 -r 392fdfb57a78 vtuis/videotelui/src/CVtUiAppUi.cpp --- a/vtuis/videotelui/src/CVtUiAppUi.cpp Wed Mar 31 21:35:06 2010 +0300 +++ b/vtuis/videotelui/src/CVtUiAppUi.cpp Wed Apr 14 16:00:08 2010 +0300 @@ -71,11 +71,11 @@ #include #include #include -#include +#include #include -#include -#include +#include +#include #include @@ -112,7 +112,7 @@ #include #include "tvtuiwsevent.h" #include "mvtuinumbersource.h" -#include "tVtuifeaturevariation.h" +#include "tVtuifeaturevariation.h" #include "cvtuidialer.h" #include "tvtuiappstates.h" #include "cvtuivolume.h" @@ -154,6 +154,11 @@ // Reset value for volume const TInt KVolumeResetValue = -1; +// Remote video control normal priority +const TInt KVtUiRemoteVideoControlOrdinalPriNormal = 0; + +// Remote video control high priority +const TInt KVtUiRemoteVideoControlOrdinalPriHigh = 2; // Name of the EIKON server window group. _LIT( KVtUiEikonServer, "EikonServer" ); @@ -216,7 +221,7 @@ // Stop brightness and contrast slider EVtUiStopBrightnessOrContrast = 1 << 15, // refresh zoom popup - EVtUiRefreshZoomPopup = 1 << 16 + EVtUiRefreshZoomPopup = 1 << 16 }; // Enumerates states for CVtUiActiveExec. @@ -765,34 +770,34 @@ { public: - /** - * Static constructor, pushes created instance into cleanup stack. - */ + /** + * Static constructor, pushes created instance into cleanup stack. + */ static CVtUiAppUiMGVerifier* NewLC( CVtUiAppUi& aAppUi, CCoeEnv& aCoeEnv ); - /** - * Destructor. - */ + /** + * Destructor. + */ ~CVtUiAppUiMGVerifier(); public: // from MMGFetchVerifier /** - * @see MMGFetchVerifier::VerifySelectionL - */ + * @see MMGFetchVerifier::VerifySelectionL + */ TBool VerifySelectionL( const MDesCArray* aSelectedFiles ); private: - /** - * 2nd constructor in two phase construction. - */ + /** + * 2nd constructor in two phase construction. + */ void ConstructL(); /** - * Constructor. - */ + * Constructor. + */ CVtUiAppUiMGVerifier( CVtUiAppUi& aAppUi, CCoeEnv& aCoeEnv ); private: @@ -845,8 +850,8 @@ iEventObserver = CEventObserver::NewL( *this ); iUiStates = new ( ELeave ) TVtUiStates( iEventObserver->Model() ); iUiStates->Update(); - iUiStates->SetViewFindersInitialPlaceContextPane( ETrue ); - + iUiStates->SetViewFindersInitialPlaceContextPane( ETrue ); + TVtUiAppStateBase::SetInitialStateL( *this, *iUiStates ); iCommandManager = CVtUiCommandManager::NewL( *iUiStates, *this ); @@ -871,7 +876,7 @@ iEikonServerWgId = eikEnv.WsSession().FindWindowGroupIdentifier( 0, KVtUiEikonServer ); iAknCapServerWgId = - eikEnv.WsSession().FindWindowGroupIdentifier( 0, KVtUiAknCapServer ); + eikEnv.WsSession().FindWindowGroupIdentifier( 0, KVtUiAknCapServer ); iAknNfyServerWgId = eikEnv.WsSession().FindWindowGroupIdentifier( 0, KVtUiAknNotifierServer ); @@ -1029,14 +1034,12 @@ { __VTPRINT( DEBUG_GEN, "VtUi.SwitchLayoutToFlatStatusPaneL LAYOUT USUAL" ); -// NaviPaneL()->Pop(); statusPane->SwitchLayoutL( idleResId ); } else if ( !isStatusPaneFlat && !VtUiLayout::IsLandscapeOrientation() ) { __VTPRINT( DEBUG_GEN, "VtUi.SwitchLayoutToFlatStatusPaneL USUAL FLAT" ); -// NaviPaneL()->PushDefaultL(); statusPane->SwitchLayoutL( R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT ); } } @@ -1046,7 +1049,6 @@ { __VTPRINT( DEBUG_GEN, "VtUi.SwitchLayoutToFlatStatusPaneL LAYOUT IDLE" ); -// NaviPaneL()->Pop(); statusPane->SwitchLayoutL( idleResId ); } } @@ -1566,12 +1568,12 @@ User::LeaveIfError( ws.WindowGroupList( 0, allWgIds) ); - const TInt chainCount = allWgIds->Count(); - - RApaLsSession appArcSession; - User::LeaveIfError( appArcSession.Connect() ); - - appArcSession.GetAllApps(); + const TInt chainCount = allWgIds->Count(); + + RApaLsSession appArcSession; + User::LeaveIfError( appArcSession.Connect() ); + + appArcSession.GetAllApps(); CApaWindowGroupName* windowName; TInt firstAppWgId = KErrNone; @@ -1601,6 +1603,8 @@ CleanupStack::PopAndDestroy(); //windowName } } + CleanupStack::PopAndDestroy( 2 ); // allWgIds, *allWgIds + __VTPRINTEXIT( "VtUi.GetFocusWindowGroupId" ) return firstAppWgId; } @@ -1833,6 +1837,22 @@ __VTPRINTENTER( "VtUi.SetRenderingModeL" ) __VTPRINT2( DEBUG_GEN, "VtUi.SetRenderingModeL=%d", aMode ); iRenderingMode = aMode; + + TInt pos = + iInstance->iRemoteVideoControl->DrawableWindow()->OrdinalPosition(); + if ( aMode == ERenderingModeDialer ) + { + // Remote video control has the highest priority in dialer + iInstance->iRemoteVideoControl->DrawableWindow()->SetOrdinalPosition( + pos, KVtUiRemoteVideoControlOrdinalPriHigh ); + } + else + { + // Set remote video control priority back to normal + iInstance->iRemoteVideoControl->DrawableWindow()->SetOrdinalPosition( + pos, KVtUiRemoteVideoControlOrdinalPriNormal ); + } + if ( aNewDownlink ) { if ( iDownlinkWindow != aNewDownlink ) @@ -2158,7 +2178,7 @@ { MVtEngMedia::TShareObjectState shareObjectState; VtUiUtility::GetObjectSharingState( Model().Media(), - shareObjectState ); + shareObjectState ); if( shareObjectState != MVtEngMedia::ESharingImage ) { refresh = ETrue; @@ -2186,7 +2206,7 @@ CmdEnableAudioL(); MVtEngMedia::TShareObjectState shareObjectState; VtUiUtility::GetObjectSharingState( Model().Media(), - shareObjectState ); + shareObjectState ); if( shareObjectState != MVtEngMedia::ESharingImage ) { refresh = ETrue; @@ -2373,7 +2393,7 @@ CEikMenuPane* aMenuPane ) { __VTPRINTENTER( "VtUi.DynInitMenuPaneL" ) - + CVtUiMenus* menus = static_cast< CVtUiMenus* >( iFeatureManager->GetFeatureById( EVtUiFeatureIdMenu ) ); if ( menus ) @@ -2382,7 +2402,7 @@ menus->SetMenuPane( aMenuPane ); menus->RefreshL(); } - __VTPRINTEXIT( "VtUi.DynInitMenuPaneL" ) + __VTPRINTEXIT( "VtUi.DynInitMenuPaneL" ) } // ----------------------------------------------------------------------------- @@ -2851,31 +2871,31 @@ // ----------------------------------------------------------------------------- // void CVtUiAppUi::CmdSnapshotL() - { - __VTPRINTENTER( "VtUi.CmdSnapshotL" ) - - // zoom mode must be set on before capture mode is set on + { + __VTPRINTENTER( "VtUi.CmdSnapshotL" ) + + // zoom mode must be set on before capture mode is set on SetZoomModeL( ETrue, ETrue ); - - // if outgoing video is already frozen + + // set capture mode on + iUiStates->SetCaptureModeOn( ETrue ); + + // if outgoing video is already frozen MVtEngMedia& media = Model().Media(); const TBool isFrozen( VtUiUtility::GetFreezeState( media ) ); if ( isFrozen ) - { - ExecuteCmdL( KVtEngUnfreeze ); - } - if ( !IsViewFinderInMainPane() ) - { - SwitchViewFinderToMainPaneL( !isFrozen ); - } - else if ( !isFrozen ) - { - iUiStates->SetViewFindersInitialPlaceContextPane( EFalse ); - } - - // set capture mode on - - iUiStates->SetCaptureModeOn( ETrue ); + { + ExecuteCmdL( KVtEngUnfreeze ); + } + if ( !IsViewFinderInMainPane() ) + { + SwitchViewFinderToMainPaneL( !isFrozen ); + } + else if ( !isFrozen ) + { + iUiStates->SetViewFindersInitialPlaceContextPane( EFalse ); + } + RefreshStatesL(); RefreshBlind(); __VTPRINTEXIT( "VtUi.CmdSnapshotL" ) @@ -2892,7 +2912,7 @@ iUiStates->SetCaptureModeOn( EFalse ); SetZoomModeL( EFalse, ETrue ); RefreshStatesL(); - RestoreViewFinderL(); + RestoreViewFinderL(); RefreshBlind(); __VTPRINTEXIT( "VtUi.CmdCancelCaptureL" ) } @@ -2903,14 +2923,14 @@ // void CVtUiAppUi::CmdEnableVideoL() { - // if outgoing video is frozen + // if outgoing video is frozen MVtEngMedia& media = Model().Media(); if ( VtUiUtility::GetFreezeState( media ) ) - { - ExecuteCmdL( KVtEngUnfreeze ); - // swap images if needed + { + ExecuteCmdL( KVtEngUnfreeze ); + // swap images if needed RestoreViewFinderL(); - } + } else { ExecuteCmdL( KVtEngStopViewFinder ); @@ -2943,21 +2963,21 @@ // void CVtUiAppUi::CmdDisableVideoL() { - - if( iUiStates->IsZoomModeOn() ) - { - // if zoom feature is active, stop that - MVtUiFeature* zm = iFeatureManager->GetFeatureById( EVtUiFeatureIdZoom ); - if ( zm ) - { - if ( zm->State() == MVtUiFeature::EActive ) - { - __VTPRINT( DEBUG_GEN, "VtUi.CmdDisableVideoL zm->STOP" ) - zm->Stop(); - } - } - } - + + if( iUiStates->IsZoomModeOn() ) + { + // if zoom feature is active, stop that + MVtUiFeature* zm = iFeatureManager->GetFeatureById( EVtUiFeatureIdZoom ); + if ( zm ) + { + if ( zm->State() == MVtUiFeature::EActive ) + { + __VTPRINT( DEBUG_GEN, "VtUi.CmdDisableVideoL zm->STOP" ) + zm->Stop(); + } + } + } + ExecuteCmdL( KVtEngStopViewFinder ); iUplinkWindow->SetStreamBitmap( NULL ); @@ -3140,7 +3160,7 @@ // Start viewfinder. ExecuteCmdL( KVtEngStartViewFinder ); } - User::Leave ( err ); + User::Leave ( err ); } // Start remote render. __VTPRINT( DEBUG_GEN, "VtUi.Swap.RR.up" ) @@ -3307,24 +3327,24 @@ // void CVtUiAppUi::CmdGoToIdleL() { - __VTPRINTENTER( "VtUi.CmdGoToIdleL" ) + __VTPRINTENTER( "VtUi.CmdGoToIdleL" ) TInt idleUid = 0; if ( RProperty::Get( KPSUidAiInformation, KActiveIdleUid, idleUid ) == KErrNone ) { - __VTPRINT2( DEBUG_GEN, "Idle UID: %d", idleUid ) + __VTPRINT2( DEBUG_GEN, "Idle UID: %d", idleUid ) TApaTaskList taskList( iEikonEnv->WsSession() ); TApaTask task = taskList.FindApp( TUid::Uid( idleUid ) ); if ( task.Exists() ) { - __VTPRINT( DEBUG_GEN, "Idle task found") + __VTPRINT( DEBUG_GEN, "Idle task found") RProperty::Set( KPSUidUikon, KUikVideoCallTopApp, KVtUiAppUid.iUid ); task.BringToForeground(); } } - __VTPRINTEXIT( "VtUi.CmdGoToIdleL" ) + __VTPRINTEXIT( "VtUi.CmdGoToIdleL" ) } // ----------------------------------------------------------------------------- @@ -3419,7 +3439,7 @@ void CVtUiAppUi::CmdStopShareImageL( TBool& aNeedRefresh ) { ExecuteCmdL( KVtEngStopShareImage ); - RestoreViewFinderL(); + RestoreViewFinderL(); aNeedRefresh = ETrue; // update VB settings UpdateVBSettingL(); @@ -3430,7 +3450,7 @@ // ----------------------------------------------------------------------------- // void CVtUiAppUi::HandleWaitingStateChange( TBool aIsWaiting ) - { + { // Dialer must be closed in case of waiting call MVtUiFeature* dialer = iFeatureManager->GetFeatureById( EVtUiFeatureIdDialer ); @@ -3447,7 +3467,7 @@ ChangeApplicationFocus( ETrue ); TRAP_IGNORE ( SetHiddenL( EFalse ) ); } - } + } // ----------------------------------------------------------------------------- // CVtUiAppUi::ActiveExecInitExecuteL @@ -3749,33 +3769,33 @@ iIsWaitingCallState = ETrue; } - // User selectable call answer mute. - // In GS one can set call ansewer status - // eighter to query user, allways show, allways mute. - // GS values are checked from CR key ( KSettingsVTVideoSending ) - // (default value is 0 = allways query). - TVtUiGsMuteVariation camute; - __VTPRINT2( DEBUG_GEN, "VtUi.InitExe GS CR key KSettingsVTVideoSending querystate=%d", camute.GsMuteState() ) - if ( camute.GsMuteState() == KAllwaysQuery && !iUiStates->IsDeviceLockOn() && EPSCTsyCallStateRinging != state) - { - CVtUiAllowVideoDialog* dialog = - new ( ELeave ) CVtUiAllowVideoDialog( - &iExecDialog, - CAknQueryDialog::ENoTone ); - dialog->ExecuteDialogLD( aRequest ); - iExecDialog = dialog; - aNextState = EVtUiAppUiAnsweredQueryDecide; - } - else if ( camute.GsMuteState() == KAllwaysAllow ) - { + // User selectable call answer mute. + // In GS one can set call ansewer status + // eighter to query user, allways show, allways mute. + // GS values are checked from CR key ( KSettingsVTVideoSending ) + // (default value is 0 = allways query). + TVtUiGsMuteVariation camute; + __VTPRINT2( DEBUG_GEN, "VtUi.InitExe GS CR key KSettingsVTVideoSending querystate=%d", camute.GsMuteState() ) + if ( camute.GsMuteState() == KAllwaysQuery && !iUiStates->IsDeviceLockOn() && EPSCTsyCallStateRinging != state) + { + CVtUiAllowVideoDialog* dialog = + new ( ELeave ) CVtUiAllowVideoDialog( + &iExecDialog, + CAknQueryDialog::ENoTone ); + dialog->ExecuteDialogLD( aRequest ); + iExecDialog = dialog; + aNextState = EVtUiAppUiAnsweredQueryDecide; + } + else if ( camute.GsMuteState() == KAllwaysAllow ) + { aNextState = EVtUiAppUiAnsweredDoPrepareCamera; - synch = ETrue; - } - else - { - aNextState = EVtUiAppUiNone; - synch = ETrue; - } + synch = ETrue; + } + else + { + aNextState = EVtUiAppUiNone; + synch = ETrue; + } } break; @@ -4590,9 +4610,9 @@ __VTPRINTENTER( "VtUi.HandleShutdownReady" ) if(iAsyncCallback->IsActive()) - { - iAsyncCallback->Cancel(); - } + { + iAsyncCallback->Cancel(); + } iAsyncCallback->Set( TCallBack( &DoExit, this ) ); @@ -4899,7 +4919,7 @@ if( wb && ( wb->State() == MVtUiFeature::EActive ) ) { - + wb->Stop(); } @@ -4982,6 +5002,13 @@ "VtUi.DoLayoutChg KVtEngHandleLayoutChange == KErrNotReady (ok)" ) TVtEngCommandId pendingCommand = Model().CommandHandler().PendingCommand(); TVtEngCommandId invalidCommand = Model().CommandHandler().InvalidCommand(); + + __VTPRINT2( DEBUG_GEN, "VtUi.DoLayoutChg pendingCommand=%d", + pendingCommand ) + + __VTPRINT2( DEBUG_GEN, "VtUi.DoLayoutChg invalidCommand=%d", + invalidCommand ) + if ( pendingCommand == KVtEngMuteOutgoingAudio || pendingCommand == KVtEngUnmuteOutgoingAudio || pendingCommand == KVtEngSetAudioRouting || @@ -4991,6 +5018,7 @@ pendingCommand == KVtEngUnfreeze || invalidCommand == KVtEngHandleLayoutChange ) { + iPendingCmd = pendingCommand; iUiStates->SetLayoutChangeNeeded( ETrue ); } } @@ -5555,10 +5583,10 @@ iEventObserver->CommandSupportedAndSynchronous( KVtEngStartRenderRemote ); const TBool setUIForeground = - iEventObserver->CommandSupportedAndSynchronous( - KVtEngSetUIForeground ); - - TVtUiDPVariation dpvariation; + iEventObserver->CommandSupportedAndSynchronous( + KVtEngSetUIForeground ); + + TVtUiDPVariation dpvariation; TBool dpSupported( dpvariation.IsDPSupported() ); if ( !prepareViewFinder || @@ -5962,7 +5990,7 @@ CVtUiAppUi* self = reinterpret_cast< CVtUiAppUi* >( aPtr ); TRAPD( result, { self->SwitchViewFinderToMainPaneL(); - self->CmdShareImageL();} ); + self->CmdShareImageL();} ); __VTPRINTEXITR( "VtUi.AsyncViewFinderToMainPaneAndShare %d", result ) return result; } @@ -6002,8 +6030,8 @@ { __VTPRINTENTER( "VtUi.GetCameraOrientations" ) MVtEngMedia& media = Model().Media(); - media.GetCameraOrientations( iPrimaryCameraOrientation, - iSecondaryCameraOrientation ); + media.GetCameraOrientations( iPrimaryCameraOrientation, + iSecondaryCameraOrientation ); __VTPRINTEXIT( "VtUi.GetCameraOrientations" ) } @@ -6052,17 +6080,17 @@ case MVtEngMedia::EPrimaryCamera: __VTPRINT( DEBUG_GEN, "VtUi.SetCameraOrient.Primary") if( iCurrentCameraOrientation != iPrimaryCameraOrientation ) - { - newOrientation = iPrimaryCameraOrientation; - } + { + newOrientation = iPrimaryCameraOrientation; + } break; case MVtEngMedia::ESecondaryCamera: - __VTPRINT( DEBUG_GEN, "VtUi.SetCameraOrient.Secondary") - if ( iCurrentCameraOrientation != iSecondaryCameraOrientation ) + __VTPRINT( DEBUG_GEN, "VtUi.SetCameraOrient.Secondary") + if ( iCurrentCameraOrientation != iSecondaryCameraOrientation ) { - newOrientation = iSecondaryCameraOrientation; - } + newOrientation = iSecondaryCameraOrientation; + } break; default: @@ -6076,26 +6104,26 @@ newOrientation ) if ( iCurrentCameraOrientation != newOrientation ) - { - // map camera orientation to appui layout orientation - TAppUiOrientation newAppUiOrientation; - if ( newOrientation == MVtEngMedia::EOrientationLandscape ) - { - __VTPRINT( DEBUG_GEN, "VtUi.SetCameraOrient=LS") - newAppUiOrientation = EAppUiOrientationLandscape; - } - else if ( newOrientation == MVtEngMedia::EOrientationPortrait ) - { - __VTPRINT( DEBUG_GEN, "VtUi.SetCameraOrient=PR") - newAppUiOrientation = EAppUiOrientationPortrait; - } - else - { - __VTPRINT( DEBUG_GEN, "VtUi.SetCameraOrient=OL") - newAppUiOrientation = EAppUiOrientationUnspecified; - } - SetOrientationL( newAppUiOrientation ); - } + { + // map camera orientation to appui layout orientation + TAppUiOrientation newAppUiOrientation; + if ( newOrientation == MVtEngMedia::EOrientationLandscape ) + { + __VTPRINT( DEBUG_GEN, "VtUi.SetCameraOrient=LS") + newAppUiOrientation = EAppUiOrientationLandscape; + } + else if ( newOrientation == MVtEngMedia::EOrientationPortrait ) + { + __VTPRINT( DEBUG_GEN, "VtUi.SetCameraOrient=PR") + newAppUiOrientation = EAppUiOrientationPortrait; + } + else + { + __VTPRINT( DEBUG_GEN, "VtUi.SetCameraOrient=OL") + newAppUiOrientation = EAppUiOrientationUnspecified; + } + SetOrientationL( newAppUiOrientation ); + } __VTPRINTEXIT( "VtUi.SetCameraOrientationL" ) } @@ -6245,7 +6273,7 @@ __VTPRINT( DEBUG_GEN, "VtUi.ProcessWsEventIfZoomModeIsActiveL.ScreenChanged" ); break; - case EVtUiWsEventNumberSourceDeactivate: + case EVtUiWsEventNumberSourceDeactivate: // Number source deactivated __VTPRINT( DEBUG_GEN, "VtUi.ProWsEvtIfZoomActivedL.NumberDeactivate" ); break; @@ -6279,7 +6307,7 @@ __VTPRINT( DEBUG_GEN, "VtUi.StopSliders br->STOP" ) br->Stop(); } - } + } } // if contrast feature is active, stop that if( iUiStates->IsContrastModeOn() ) @@ -6782,9 +6810,9 @@ { case KVtEngSessionWaitingCallActive: case KVtEngSessionWaitingCallInactive: - iAppUi.HandleWaitingStateChange( - aEvent == KVtEngSessionWaitingCallActive ); - break; + iAppUi.HandleWaitingStateChange( + aEvent == KVtEngSessionWaitingCallActive ); + break; default: break; } @@ -6948,7 +6976,9 @@ const TInt aError ) { __VTPRINTENTER( "VtUiComms.HandleVTCommandPerformedL" ) - + __VTPRINT2( DEBUG_GEN, "VtUiComms.HandleVTCommandPerformedL aCommand = %d", + aCommand ) + if ( iAppUi.iState && iAppUi.iState->HandleVTCommandPerformedL( aCommand, aError ) == TVtUiAppStateBase::EEventHandled ) @@ -7033,15 +7063,17 @@ } } else if ( iAppUi.iUiStates->IsLayoutChangeNeeded() && - ( aCommand == KVtEngMuteOutgoingAudio || - aCommand == KVtEngUnmuteOutgoingAudio || - aCommand == KVtEngSetAudioRouting || - aCommand == KVtEngSetAudioVolume || - aCommand == KVtEngSetSource || + ( aCommand == KVtEngSetSource || aCommand == KVtEngPrepareCamera || aCommand == KVtEngUnfreeze || - aCommand == KVtEngHandleLayoutChange ) ) - { + aCommand == KVtEngHandleLayoutChange ) || + ( ( aCommand == KVtEngMuteOutgoingAudio || + aCommand == KVtEngUnmuteOutgoingAudio || + aCommand == KVtEngSetAudioRouting || + aCommand == KVtEngSetAudioVolume ) && + ( aCommand == iAppUi.iPendingCmd ) ) ) + { + iAppUi.iPendingCmd = KVtEngCommandNone; iAppUi.iUiStates->SetLayoutChangeNeeded( EFalse ); iAppUi.DoHandleLayoutChangedL(); } @@ -7089,7 +7121,7 @@ { flag = EFalse; } - + TBool local = EFalse; switch ( aType ) { @@ -7217,9 +7249,9 @@ switch ( aButtonAct ) { case ERemConCoreApiButtonPress: - __VTPRINT( DEBUG_GEN, "VtUi.HandleVolumeChange.ButtonPress" ) - TRAP_IGNORE( iAppUi.AdjustVolumeL( iRCCAOperationId ) ); - TRAP_IGNORE( iAppUi.RefreshVolumeL() ); + __VTPRINT( DEBUG_GEN, "VtUi.HandleVolumeChange.ButtonPress" ) + TRAP_IGNORE( iAppUi.AdjustVolumeL( iRCCAOperationId ) ); + TRAP_IGNORE( iAppUi.RefreshVolumeL() ); TRAP_IGNORE( iAppUi.iInstance->VolumeKeyPressedL() ); iRemConVolumeRepeatTimer->Start( diff -r 3e521e99f813 -r 392fdfb57a78 vtuis/videotelui/src/CVtUiEndCallButton.cpp --- a/vtuis/videotelui/src/CVtUiEndCallButton.cpp Wed Mar 31 21:35:06 2010 +0300 +++ b/vtuis/videotelui/src/CVtUiEndCallButton.cpp Wed Apr 14 16:00:08 2010 +0300 @@ -30,6 +30,7 @@ #include "CVtUiEndCallButton.h" #include "VtUiLayout.h" +const TInt KEndCallButtonText = 255; // ----------------------------------------------------------------------------- // CVtUiEndCallButton::CVtUiEndCallButton @@ -238,7 +239,19 @@ TRgb brushColor; GetTextColors( penColor ); - iLayoutText.DrawText( aGc, state->Text(), EFalse, penColor ); + // buffer for visually ordered text + TBuf< KEndCallButtonText + KAknBidiExtraSpacePerLine> visualText; + TInt clipWidth = iLayoutText.TextRect().Width(); + + // bidi processing - using AknBidiTextUtils. + AknBidiTextUtils::ConvertToVisualAndClip( + state->Text(), + visualText, + *iLayoutText.Font(), + clipWidth, + clipWidth ); + + iLayoutText.DrawText( aGc, visualText, EFalse, penColor ); const CGulIcon* icon = GetCurrentIcon(); diff -r 3e521e99f813 -r 392fdfb57a78 vtuis/videotelui/src/CVtUiNaviPane.cpp --- a/vtuis/videotelui/src/CVtUiNaviPane.cpp Wed Mar 31 21:35:06 2010 +0300 +++ b/vtuis/videotelui/src/CVtUiNaviPane.cpp Wed Apr 14 16:00:08 2010 +0300 @@ -29,8 +29,6 @@ #include #include #include "tVtuifeaturevariation.h" -#include -#include // CONSTANTS @@ -114,12 +112,15 @@ // Create muted indicator. { - HBufC* mutedText = - StringLoader::LoadLC( R_VIDEOTELUI_QTN_INCAL_MUTED_PANE ); + CVtUiMutedControl* naviControl = + new ( ELeave ) CVtUiMutedControl; + CleanupStack::PushL( naviControl ); + naviControl->ConstructL(); + CleanupStack::Pop( naviControl ); - iMutedIndicator = iNaviPane.CreateNavigationLabelL( *mutedText ); - - CleanupStack::PopAndDestroy( mutedText ); + iMutedIndicator = + CreateDecoratorL( iNaviPane, naviControl ); + iMutedControl = naviControl; } User::LeaveIfError( iTimer.CreateLocal() ); @@ -260,6 +261,7 @@ if ( iMutedIndicator != iCurrent ) { iMutedIndicator->HandleResourceChange( aType ); + iMutedControl->HandleResourceChange( aType ); } } diff -r 3e521e99f813 -r 392fdfb57a78 vtuis/videotelui/src/features/dialer/cvtuidialer.cpp --- a/vtuis/videotelui/src/features/dialer/cvtuidialer.cpp Wed Mar 31 21:35:06 2010 +0300 +++ b/vtuis/videotelui/src/features/dialer/cvtuidialer.cpp Wed Apr 14 16:00:08 2010 +0300 @@ -19,6 +19,7 @@ #include #include #include +#include #include "cvtuidialer.h" #include "cvtuifeaturemanager.h" @@ -31,6 +32,9 @@ #include "CVtUiAppUi.h" #include "tvtuistates.h" #include "CVtUiContextControl.h" +#include "CVtUiEndCallButtonPane.h" +#include "CVtUiMainControl.h" +#include "VtUiLayout.h" // ======== LOCAL FUNCTIONS ======== @@ -97,10 +101,16 @@ __VTPRINTENTER( "Dial.StartL" ) if ( State() == MVtUiFeature::EUnprepared ) { - // fixed toolbar is set to be hidden + // Make context control and end call button invisible iFeatureManager.AppUi().ContextControl().MakeVisible( EFalse ); + iFeatureManager.AppUi().EndCallButtonPane().MakeVisible( EFalse ); iFeatureManager.UiStates().SetIsDialerActivating( ETrue ); + // fixed toolbar is set to be hidden iFeatureManager.UiStates().SetIsFixedToolbarVisible( EFalse ); + if ( !VtUiLayout::IsLandscapeOrientation() ) + { + iFeatureManager.AppUi().CurrentFixedToolbar()->MakeVisible( EFalse ); + } iFeatureManager.CommandManager().RefreshL(); PrepareL(); iFeatureManager.ComponentManager().RequestActivationL( @@ -128,7 +138,15 @@ MVtUiComponent::EComponentIdDialer ); } ); Unprepare(); + iFeatureManager.AppUi().CurrentFixedToolbar()->MakeVisible( ETrue ); + // Make these two control back to visible + iFeatureManager.AppUi().EndCallButtonPane().MakeVisible( ETrue ); iFeatureManager.AppUi().ContextControl().MakeVisible( ETrue ); + // Force a skin change event to appui then redraw main control + // and end call button + iFeatureManager.AppUi().HandleResourceChangeL( KAknsMessageSkinChange ); + iFeatureManager.AppUi().MainControl().DrawNow(); + iFeatureManager.AppUi().EndCallButtonPane().DrawNow(); } __VTPRINTEXIT( "Dial.Stop" ) } diff -r 3e521e99f813 -r 392fdfb57a78 vtuis/videotelui/src/features/dialer/cvtuidialercontainer.cpp --- a/vtuis/videotelui/src/features/dialer/cvtuidialercontainer.cpp Wed Mar 31 21:35:06 2010 +0300 +++ b/vtuis/videotelui/src/features/dialer/cvtuidialercontainer.cpp Wed Apr 14 16:00:08 2010 +0300 @@ -111,7 +111,7 @@ } CCoeControl::HandleResourceChange( aType ); - + __VTPRINTEXIT( "DialContainer.HandleResourceChangeL" ) } @@ -146,6 +146,9 @@ iVideoControl->MakeVisible( ETrue ); iDialer->MakeVisible( ETrue ); MakeVisible( ETrue ); + // Force a resource change and draw for the dialer + HandleResourceChange( KAknsMessageSkinChange ); + DrawNow(); User::LeaveIfError( iFeatureManager-> CommandManager().AddCommandModifier( *iSKModifier ) ); iInputBuffer->Activate(); @@ -314,6 +317,12 @@ iInputBuffer = CVtUiDTMFBuffer::NewL( *iCoeEnv ); iVideoControl = CVtUiDialerVideoControl::NewL( aBitmapManager ); iDialer = CVideoDTMFDialer::NewL( *this, *iVideoControl, DialerRect() ); + + // Dialer has the higher priority + iDialer->DrawableWindow()->SetOrdinalPosition( + iDialer->DrawableWindow()->OrdinalPosition(), + iDialer->DrawableWindow()->OrdinalPriority() + 1 ); + iSKModifier = CVtUiDialerSKModifier::NewL( *iFeatureManager ); // Disable fading when using DP (eliminates nasty color error) if ( FeatureManager::FeatureSupported( KFeatureIdDisplayPost ) ) diff -r 3e521e99f813 -r 392fdfb57a78 vtuis/videotelui/src/features/prefs/cvtuiprefsettinglistbase.cpp --- a/vtuis/videotelui/src/features/prefs/cvtuiprefsettinglistbase.cpp Wed Mar 31 21:35:06 2010 +0300 +++ b/vtuis/videotelui/src/features/prefs/cvtuiprefsettinglistbase.cpp Wed Apr 14 16:00:08 2010 +0300 @@ -37,6 +37,7 @@ // constants static const TInt KMaxNumberOfArrayItems = 5; static const TInt KMaxNumberOfActiveItems = 5; +static const TInt KOrdinalPositionBase = 3; // --------------------------------------------------------------------------- // CVtUiPrefSettingListBase::~CVtUiPrefSettingListBase @@ -163,11 +164,9 @@ iContextControlWindowPosition = iAppUi.ContextControl().DrawableWindow() ->OrdinalPosition(); - // Get main control's window priority and position + // Get main control's window priority iMainControlWindowPriority= iAppUi.MainControl().DrawableWindow() ->OrdinalPriority(); - iMainControlWindowPosition = iAppUi.MainControl().DrawableWindow() - ->OrdinalPosition(); // Get remote video control's window priority and position iRemoteVideoControlWindowPriority = @@ -225,26 +224,28 @@ iSettingPage->OfferKeyEventL( keyEvent, EEventKey ); } + TInt ordinalPos = KOrdinalPositionBase; + // Set main control priority and position back to // orginal value. iAppUi.MainControl().DrawableWindow()->SetOrdinalPosition( - iMainControlWindowPosition, iMainControlWindowPriority ); - + ordinalPos--, iMainControlWindowPriority ); + // Set end call button pane priority and position back to // orginal value. iAppUi.EndCallButtonPane().DrawableWindow()->SetOrdinalPosition( - iEndCallButtonPanePosition, iEndCallButtonPanePriority ); - - // Set remote video control's window priority and position back to - // orginal value. - iAppUi.RemoteVideoControl().DrawableWindow()->SetOrdinalPosition( - iRemoteVideoControlWindowPosition, - iRemoteVideoControlWindowPriority ); + ordinalPos--, iEndCallButtonPanePriority ); // Set context control's window priority and position back to // orginal value. iAppUi.ContextControl().DrawableWindow()->SetOrdinalPosition( - iContextControlWindowPosition, iContextControlWindowPriority ); + ordinalPos--, iContextControlWindowPriority ); + + // Set remote video control's window priority and position back to + // orginal value. + iAppUi.RemoteVideoControl().DrawableWindow()->SetOrdinalPosition( + ordinalPos--, + iRemoteVideoControlWindowPriority ); __VTPRINTEXIT( "CVtUiPrefSettingListBase.StopSettingPageL" ) }