diff -r caea42e26caa -r a9c7e5670d17 mobilemessaging/mmsui/viewersrc/UniMmsViewerAppUi.cpp --- a/mobilemessaging/mmsui/viewersrc/UniMmsViewerAppUi.cpp Fri Mar 12 15:42:19 2010 +0200 +++ b/mobilemessaging/mmsui/viewersrc/UniMmsViewerAppUi.cpp Mon Mar 15 12:40:06 2010 +0200 @@ -1195,17 +1195,6 @@ } - if ( ! ( Document( )->SmilType( ) == EMmsSmil - && ( focusedControl == EMsgComponentIdBody - || focusedControl == EMsgComponentIdImage - || focusedControl == EMsgComponentIdAudio -#ifdef RD_SVGT_IN_MESSAGING - || focusedControl == EMsgComponentIdSvg -#endif - || focusedControl == EMsgComponentIdVideo ) ) ) - { - aMenuPane->SetItemDimmed( EMmsViewerSaveObject, ETrue ); - } if ( ! ( iSupportedFeatures & EMmsFeatureUpload ) || !iUploadServices.Count( ) ) @@ -2824,6 +2813,7 @@ { TPointerEvent* pointerEvent = static_cast( aArg2 ); CMsgBaseControl* baseControl = static_cast( aArg1 ); + TWsEvent* wsEvent = static_cast(aArg2); if ( pointerEvent && pointerEvent->iType == TPointerEvent::EButton1Down ) @@ -2849,9 +2839,10 @@ } else if ( (!iTapConsumed) && (pointerEvent && pointerEvent->iType == TPointerEvent::EButton1Up) ) - { - iLongTapDetector->CancelAnimationL(); + { + iLongTapDetector->MonitorWsMessage(*wsEvent); iTapConsumed = ETrue; + CMsgBaseControl* focusedControl = iView->FocusedControl(); if ( baseControl && iPointerTarget == baseControl ) { switch( iMskId ) @@ -2870,20 +2861,23 @@ case R_MMSVIEWER_MSK_BUTTON_PLAY_SVG: #endif { - // Read current MSK resource to get a command id - // to execute. - TResourceReader reader; - iEikonEnv->CreateResourceReaderLC( - reader, iMskId ); - reader.ReadInt8(); // version - HandleCommandL( reader.ReadUint16() ); - CleanupStack::PopAndDestroy(); // resource buffer + HandleSelectionKeyL(); *static_cast( aArg3 ) = ETrue; // handled } default: ; } } + else if ( focusedControl && iPointerTarget == focusedControl ) + { + if ( iMskId == R_MMSVIEWER_MSK_BUTTON_PLAY_VIDEO || + iMskId == R_MMSVIEWER_MSK_BUTTON_STOP_VIDEO ) + { + HandleSelectionKeyL(); + *static_cast( aArg3 ) = ETrue; // handled + } + } + iPointerTarget = NULL; } } @@ -5527,6 +5521,21 @@ iTapConsumed = ETrue; } } - } + } +// --------------------------------------------------------- +// CMmsViewerAppUi::HandleSelectionKeyL +// Function for handling the selection key +// --------------------------------------------------------- +void CMmsViewerAppUi::HandleSelectionKeyL() + { + // Read current MSK resource to get a command id + // to execute. + TResourceReader reader; + iEikonEnv->CreateResourceReaderLC( + reader, iMskId ); + reader.ReadInt8(); // version + HandleCommandL( reader.ReadUint16() ); + CleanupStack::PopAndDestroy(); // resource buffer + } // End of File