diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 60f6c55f5..84146235c 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -118,6 +118,7 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() : mCommitCallbackRegistrar.add("MediaCtrl.CommitVolumeDown", boost::bind(&LLPanelPrimMediaControls::onCommitVolumeDown, this)); mCommitCallbackRegistrar.add("MediaCtrl.Volume", boost::bind(&LLPanelPrimMediaControls::onCommitVolumeSlider, this)); mCommitCallbackRegistrar.add("MediaCtrl.ToggleMute", boost::bind(&LLPanelPrimMediaControls::onToggleMute, this)); + mCommitCallbackRegistrar.add("MediaCtrl.MOAPStop", std::bind([this]() { getTargetMediaImpl()->setDisabled(true); })); mCommitCallbackRegistrar.add("MediaCtrl.ShowVolumeSlider", boost::bind(&LLPanelPrimMediaControls::showVolumeSlider, this)); mCommitCallbackRegistrar.add("MediaCtrl.HideVolumeSlider", boost::bind(&LLPanelPrimMediaControls::hideVolumeSlider, this)); mCommitCallbackRegistrar.add("MediaCtrl.SkipBack", boost::bind(&LLPanelPrimMediaControls::onClickSkipBack, this)); @@ -150,6 +151,7 @@ BOOL LLPanelPrimMediaControls::postBuild() mPauseCtrl = getChild("pause"); mStopCtrl = getChild("stop"); mMediaStopCtrl = getChild("media_stop"); + mMOAPStopCtrl = getChild("moap_stop"); mHomeCtrl = getChild("home"); mUnzoomCtrl = getChild("close"); // This is actually "unzoom" mOpenCtrl = getChild("new_window"); @@ -368,6 +370,7 @@ void LLPanelPrimMediaControls::updateShape() mReloadCtrl->setEnabled(false); mReloadCtrl->setVisible(false); mMediaStopCtrl->setVisible(has_focus); + mMOAPStopCtrl->setVisible(false); mHomeCtrl->setVisible(has_focus); mBackCtrl->setVisible(false); mFwdCtrl->setVisible(false); @@ -466,6 +469,7 @@ void LLPanelPrimMediaControls::updateShape() mPlayCtrl->setVisible(FALSE); mPauseCtrl->setVisible(FALSE); mMediaStopCtrl->setVisible(FALSE); + mMOAPStopCtrl->setVisible(!!media_plugin); mMediaAddressCtrl->setVisible(has_focus && !mini_controls); mMediaAddressCtrl->setEnabled(has_focus && !mini_controls); mMediaPlaySliderPanel->setVisible(FALSE); diff --git a/indra/newview/llpanelprimmediacontrols.h b/indra/newview/llpanelprimmediacontrols.h index 7db687d23..2cf196a22 100644 --- a/indra/newview/llpanelprimmediacontrols.h +++ b/indra/newview/llpanelprimmediacontrols.h @@ -155,6 +155,7 @@ private: LLUICtrl *mPauseCtrl; LLUICtrl *mStopCtrl; LLUICtrl *mMediaStopCtrl; + LLUICtrl *mMOAPStopCtrl; LLUICtrl *mHomeCtrl; LLUICtrl *mUnzoomCtrl; LLUICtrl *mOpenCtrl; diff --git a/indra/newview/skins/default/xui/en-us/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en-us/panel_prim_media_controls.xml index 5e0a6141e..d63d52166 100644 --- a/indra/newview/skins/default/xui/en-us/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/en-us/panel_prim_media_controls.xml @@ -398,7 +398,7 @@ scale_image="false" tool_tip="Mute This Media" left_delta="5" - bottom="-22" + bottom="-20" draw_border="true" height="20" width="22" > @@ -429,6 +429,26 @@ function="MediaCtrl.HideVolumeSlider" /> + + +