diff options
author | Rick Pasetto <rick@lindenlab.com> | 2010-02-10 14:28:46 -0800 |
---|---|---|
committer | Rick Pasetto <rick@lindenlab.com> | 2010-02-10 14:28:46 -0800 |
commit | c680368e19f5be7265e2f15a1f4b626b1600e773 (patch) | |
tree | 8a38590b168d8b65e2d185ba76ada2de17d4b2e0 /indra/newview/llstatusbar.cpp | |
parent | 3aa7e1b0c10fcb660cfc13308dd2a45223696e11 (diff) |
EXT-5261 EXT-5263 EXT-5265 EXT-5266 EXT-5271 - Reformat NMF and enable behavior of media toggle in chrome
Review #100 http://10.1.19.90:8080/go?page=ReviewDisplay&reviewid=100
This encompasses the first of the behavioral and structural changes for the Nearby Media Floater and the chrome button at the top of the UI. It includes:
- Removal of the Parcel Media and Parcel Audio UI. Still not in the list yet.
- New More/Less button, which doesn't quite work right (see below)
- Changed icon for UI chrome
- Enabled "turning on" and "turning off" media from the chrome and NMF
- Added gear icon to bring up prefs
- XUI changes to the structure of NMF
- Implementation of the "tentative" autoplay flag
This is basically a checkpoint so that Richard can help with the More/Less implementation
Diffstat (limited to 'indra/newview/llstatusbar.cpp')
-rw-r--r-- | indra/newview/llstatusbar.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index a2648e4c3a..48de23fab1 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -61,6 +61,7 @@ #include "llresmgr.h" #include "llworld.h" #include "llstatgraph.h" +#include "llviewermedia.h" #include "llviewermenu.h" // for gMenuBarView #include "llviewerparcelmgr.h" #include "llviewerthrottle.h" @@ -188,8 +189,9 @@ BOOL LLStatusBar::postBuild() mBtnVolume->setClickedCallback( onClickVolume, this ); mBtnVolume->setMouseEnterCallback(boost::bind(&LLStatusBar::onMouseEnterVolume, this)); - LLButton* media_toggle = getChild<LLButton>("media_toggle_btn"); - media_toggle->setMouseEnterCallback(boost::bind(&LLFloaterReg::showInstance, "nearby_media", LLSD(), true)); + mMediaToggle = getChild<LLButton>("media_toggle_btn"); + mMediaToggle->setClickedCallback( &LLStatusBar::onClickMediaToggle, this ); + mMediaToggle->setMouseEnterCallback(boost::bind(&LLFloaterReg::showInstance, "nearby_media", LLSD(), true)); gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2)); @@ -354,6 +356,8 @@ void LLStatusBar::refresh() // update the master volume button state bool mute_audio = LLAppViewer::instance()->getMasterSystemAudioMute(); mBtnVolume->setToggleState(mute_audio); + + mMediaToggle->setValue(!LLViewerMedia::isAnyMediaShowing()); } void LLStatusBar::setVisibleForMouselook(bool visible) @@ -525,6 +529,14 @@ static void onClickVolume(void* data) LLAppViewer::instance()->setMasterSystemAudioMute(!mute_audio); } +//static +void LLStatusBar::onClickMediaToggle(void* data) +{ + LLStatusBar *status_bar = (LLStatusBar*)data; + // "Selected" means it was showing the "play" icon (so media was playing), and now it shows "pause", so turn off media + LLViewerMedia::setAllMediaEnabled(! status_bar->mMediaToggle->getValue()); +} + // sets the static variables necessary for the date void LLStatusBar::setupDate() { |