diff -r 455f89b7fcc5 -r 26a1709b9fec mpxplugins/viewplugins/views/commonplaybackview/src/mpxcommonplaybackviewimp.cpp --- a/mpxplugins/viewplugins/views/commonplaybackview/src/mpxcommonplaybackviewimp.cpp Thu Jul 15 18:35:42 2010 +0300 +++ b/mpxplugins/viewplugins/views/commonplaybackview/src/mpxcommonplaybackviewimp.cpp Thu Aug 19 09:52:08 2010 +0300 @@ -113,6 +113,7 @@ // CONSTANTS const TInt KMPXOneSecInMilliSecs( 1000 ); const TUid KMPXEqualizerViewImplementationId = { 0x101FFC77 }; +const TUid KMPXMetadataEditorDialogImplementationId = { 0x101FFC83 }; const TInt KMPXPostponeForHandleDelayedError( 1000000 ); // 1S const TInt KMPXPlaybackViewWindowBackground = -1; const TInt KMPXDelayForTNRequest( 3000000 ); // 3S @@ -1632,7 +1633,7 @@ MPX_DEBUG1("CMPXPlaybackViewImp::HandleErrorL()"); MPX_DEBUG1(" > Reset New Item Opened Flag"); iNewItemOpened = EFalse; - + iErrorOccured = EFalse; MPX_DEBUG1( "CMPXCommonPlaybackViewImp::HandleErrorL: Exiting"); } @@ -1981,6 +1982,7 @@ } else if ( aError != KErrNone && iLastPBViewActivated ) { + iErrorOccured = ETrue; TRAP_IGNORE( DoHandleErrorPlaybackMessageL( aError ) ); } MPX_DEBUG2("<--CMPXCommonPlaybackViewImp::HandlePlaybackMessage(): aError = %d", aError); @@ -2172,7 +2174,11 @@ } case EMPXPbvCmdSongDetails: { - LaunchFileDetailsDialogL(); + if( !iErrorOccured ) + { + LaunchFileDetailsDialogL(); + } + break; } case EMPXPbvCmdPlay: @@ -2717,7 +2723,6 @@ { MPX_DEBUG1( "CMPXCommonPlaybackViewImp::HandleForegroundEventL requesting media" ); RequestMediaL(); - UpdateTitlePaneL(); } } } @@ -2761,6 +2766,12 @@ { case R_MPX_PLAYBACK_VIEW_MENU: { + if( iErrorOccured ) + { + MPX_DEBUG2( "iErrorOccured %d" , iErrorOccured); + aMenuPane->SetItemDimmed( EMPXPbvCmdSongDetails, ETrue ); + } + if ( iIsffButtonPressed ) { iIsffButtonPressed = EFalse; @@ -3008,7 +3019,8 @@ // since it'll mess up equilizer's screen if ( StatusPane()->CurrentLayoutResId() != R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT && - activeView != KMPXEqualizerViewImplementationId ) + activeView != KMPXEqualizerViewImplementationId && + activeView != KMPXMetadataEditorDialogImplementationId ) { TRAP_IGNORE( StatusPane()->SwitchLayoutL( R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT )); @@ -3067,6 +3079,10 @@ { MPX_FUNC_EX( "CMPXCommonPlaybackViewImp::HandleViewActivation VF" ); iPBViewToBeActivated = ( KMPXPluginTypePlaybackUid == aCurrentViewType.iUid ); + if(iPBViewToBeActivated) + { + HandleLayoutChange(); + } MPX_DEBUG2( "CMPXCommonPlaybackViewImp::HandleViewActivation iPBViewToBeActivated %d", iPBViewToBeActivated ); } // --------------------------------------------------------------------------- @@ -3926,11 +3942,13 @@ if( pausePlayControl ) { TMPXPlaybackState state = iPlaybackUtility->StateL(); - if ((state == EPbStateInitialising) || (state == EPbStatePlaying)) + if ( state == EPbStatePlaying ) { pausePlayControl->SetCurrentState(0, ETrue); } - else + //get EPbStateInitialising when skipping to next, ignore it to remove play/pause key flicker + //It is showing the state that was previously shown when EPbStateInitializing + else if ( state != EPbStateInitialising ) { pausePlayControl->SetCurrentState(1, ETrue); }