# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1279208505 -10800 # Node ID f544d10663bf165da663079942d35138c469b3cc # Parent b95d12697049a6a6169087aecb276f59192309de Revision: 201025 Kit: 2010127 diff -r b95d12697049 -r f544d10663bf vtuis/videotelui/inc/tvtuiappstatebase.h --- a/vtuis/videotelui/inc/tvtuiappstatebase.h Mon Jun 21 15:43:21 2010 +0300 +++ b/vtuis/videotelui/inc/tvtuiappstatebase.h Thu Jul 15 18:41:45 2010 +0300 @@ -141,6 +141,12 @@ static void SetInitialStateL( MVtUiStateContext& aCtx, TVtUiStates& aUiStates); + + /** + * Get whether the shutdown requested + * @return ETrue if shutdown requested + */ + static TBool ShutdownRequested(); protected: // for concrete state classes diff -r b95d12697049 -r f544d10663bf vtuis/videotelui/src/CVtUiAppUi.cpp --- a/vtuis/videotelui/src/CVtUiAppUi.cpp Mon Jun 21 15:43:21 2010 +0300 +++ b/vtuis/videotelui/src/CVtUiAppUi.cpp Thu Jul 15 18:41:45 2010 +0300 @@ -3421,11 +3421,13 @@ // number erntry is not availabe while media gallery is open iInstance->iNumberEntryActivation->SetActive( EFalse ); iUiStates->SetSelectingShare( ETrue ); - + + iInstance->iRemoteVideoControl->MakeVisible(EFalse); TBool result( EFalse ); TRAPD( err, result = MGFetch::RunL( *selectedFiles, EImageFile, EFalse, verifier ) ); + iInstance->iRemoteVideoControl->MakeVisible(ETrue); // leave occured if ( err != KErrNone ) { @@ -4632,6 +4634,13 @@ Model().CommandHandler(), *iEventObserver ); dlg->ExecuteCmdLD( aCommand, aParams, NULL ); + + // Here we tell current state to handle shutdown request + if ( aCommand == KVtEngSetSource && iState + && TVtUiAppStateBase::ShutdownRequested() ) + { + iState->HandleVTCommandPerformedL( aCommand, KErrNone ); + } } } else @@ -5093,7 +5102,10 @@ // restore the last user setting UpdateVBSettingL(); - + if( iUiStates->IsSelectingShare() ) + { + iInstance->iRemoteVideoControl->MakeVisible(EFalse); + } if ( iDelayedCmd != 0 ) { __VTPRINT2( DEBUG_GEN, "VtUi.DoLayoutChg reexecute the delayed cmd=%d", iDelayedCmd); @@ -6531,7 +6543,10 @@ AknLayoutUtils::LayoutControl( iMainControl, parent, control ); iMainControl->DrawNow(); if(iMainControl) + { iMainControl->LayoutRemoteVideo(); + } + AknLayoutUtils::LayoutControl( iNumberEntryActivation, parent, control ); VtUiLayout::GetFirstWindowBackgroundLayout( control ); AknLayoutUtils::LayoutControl( iContextControl, parent, control ); @@ -6725,6 +6740,7 @@ CRemConCoreApiTarget::NewL( *interfaceSelector, *this ); // The coreApiTarget instance is owned by interfaceSelector instance. // This instance must implement MRemConCoreApiTargetObserver interface. + __VTPRINT( DEBUG_GEN, "VtUiComms.CreateRemCon, done creating coreApiTarget" ) CleanupStack::PushL( coreApiTarget ); interfaceSelector->OpenTargetL(); @@ -7046,7 +7062,15 @@ default: break; } - + switch ( aEvent ) + { + case KVtEngAudioMuted: + case KVtEngAudioUnmuted: + callBits |= EVtUiRefreshMenu; + break; + default: + break; + } TRAP_IGNORE ( DoExecuteL( callBits ) ); __VTPRINTEXITR( "VtUiComms.HandleVtEventL %d", 1 ) } @@ -7063,14 +7087,27 @@ __VTPRINT2( DEBUG_GEN, "VtUiComms.HandleVTCommandPerformedL aCommand = %d", aCommand ) - if ( iAppUi.iState && - iAppUi.iState->HandleVTCommandPerformedL( aCommand, aError ) == - TVtUiAppStateBase::EEventHandled ) - { - // state didn't allow further processing of command completion - __VTPRINTEXITR( "VtUiComms.HandleVTCommandPerformedL %d", 0 ) - return; - } + if ( aCommand == KVtEngSetSource && + TVtUiAppStateBase::ShutdownRequested() ) + { + // We are going to quit + // Pending cmd needs to be set none + iAppUi.iPendingCmd = KVtEngCommandNone; + // The next layoutchange needs to be cancelled + iAppUi.iUiStates->SetLayoutChangeNeeded( EFalse ); + } + else + { + if ( iAppUi.iState && + iAppUi.iState->HandleVTCommandPerformedL( aCommand, aError ) == + TVtUiAppStateBase::EEventHandled ) + { + // state didn't allow further processing of command completion + __VTPRINTEXITR( "VtUiComms.HandleVTCommandPerformedL %d", 0 ) + return; + } + } + iAppUi.RefreshStatesL(); if ( aCommand == KVtEngMuteOutgoingAudio || diff -r b95d12697049 -r f544d10663bf vtuis/videotelui/src/tvtuiappstatebase.cpp --- a/vtuis/videotelui/src/tvtuiappstatebase.cpp Mon Jun 21 15:43:21 2010 +0300 +++ b/vtuis/videotelui/src/tvtuiappstatebase.cpp Thu Jul 15 18:41:45 2010 +0300 @@ -138,6 +138,15 @@ } // ----------------------------------------------------------------------------- +// TVtUiAppStateBase::ShutdownRequested +// ----------------------------------------------------------------------------- +// +TBool TVtUiAppStateBase::ShutdownRequested() + { + return iShutdownRequested; + } + +// ----------------------------------------------------------------------------- // TVtUiAppStateBase::AppUiStartupFailedL // ----------------------------------------------------------------------------- //