diff options
author | Rick Pasetto <rick@lindenlab.com> | 2010-02-12 14:47:51 -0800 |
---|---|---|
committer | Rick Pasetto <rick@lindenlab.com> | 2010-02-12 14:47:51 -0800 |
commit | 9cc4eccac58923566f76b9d10c4f478889d26c28 (patch) | |
tree | 3edc65dd0a09c48628f3c6645a18b58d8144e115 /indra/newview/llstatusbar.cpp | |
parent | 9f3c3d8f64be7c7321f6037dcd78234417c0a2d8 (diff) | |
parent | ffd962f3a3eafd7b65f90039a5bb04dccb0205bc (diff) |
Automated merge with ssh://rick@hg.lindenlab.com/rick/viewer-2-0-mediaclasses
Diffstat (limited to 'indra/newview/llstatusbar.cpp')
-rw-r--r-- | indra/newview/llstatusbar.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 025f03dc5a..235de89f47 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -376,7 +376,12 @@ void LLStatusBar::refresh() bool mute_audio = LLAppViewer::instance()->getMasterSystemAudioMute(); mBtnVolume->setToggleState(mute_audio); - mMediaToggle->setValue(!LLViewerMedia::isAnyMediaShowing()); + // Don't show media toggle if there's no media, parcel media, and no parcel audio + mMediaToggle->setVisible(LLViewerMedia::hasInWorldMedia() || LLViewerMedia::hasParcelMedia() || LLViewerMedia::hasParcelAudio()); + // Note the "sense" of the toggle is opposite whether media is playing or not + mMediaToggle->setValue(! (LLViewerMedia::isAnyMediaShowing() || + LLViewerMedia::isParcelMediaPlaying() || + LLViewerMedia::isParcelAudioPlaying())); } void LLStatusBar::setVisibleForMouselook(bool visible) @@ -406,8 +411,8 @@ void LLStatusBar::setBalance(S32 balance) LLButton* btn_buy_currency = getChild<LLButton>("buycurrency"); LLStringUtil::format_map_t string_args; string_args["[AMT]"] = llformat("%s", money_str.c_str()); - std::string labe_str = getString("buycurrencylabel", string_args); - btn_buy_currency->setLabel(labe_str); + std::string label_str = getString("buycurrencylabel", string_args); + btn_buy_currency->setLabel(label_str); // Resize the balance button so that the label fits it, and the button expands to the left. // *TODO: LLButton should have an option where to expand. @@ -559,7 +564,8 @@ 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()); + bool enable = ! status_bar->mMediaToggle->getValue(); + LLViewerMedia::setAllMediaEnabled(enable); } // sets the static variables necessary for the date |