diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-04-12 15:43:34 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-04-12 15:43:34 +0300 |
commit | eab5beb54cacc2b0dc2cddad4a78634e7468a298 (patch) | |
tree | 51f17910f529af57819bcd77f1a7dd9e92f6291e /indra/newview/llpanelvolumepulldown.cpp | |
parent | 00e09ddcad8ec2c33ecbcdd0da09bd7819bc3509 (diff) | |
parent | cc8fdf341dbbe6ab940d7b24bcf81cbed252cb69 (diff) |
Merge branch 'main' into marchcat/x-merge
# Conflicts:
# indra/llimage/llimageworker.cpp
# indra/llimage/llimageworker.h
# indra/newview/llcontrolavatar.cpp
# indra/newview/llfloaterprofiletexture.cpp
# indra/newview/lloutfitslist.cpp
# indra/newview/lloutfitslist.h
# indra/newview/lltexturefetch.cpp
Diffstat (limited to 'indra/newview/llpanelvolumepulldown.cpp')
-rw-r--r-- | indra/newview/llpanelvolumepulldown.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/indra/newview/llpanelvolumepulldown.cpp b/indra/newview/llpanelvolumepulldown.cpp index 6f11e76a72..09038ac95a 100644 --- a/indra/newview/llpanelvolumepulldown.cpp +++ b/indra/newview/llpanelvolumepulldown.cpp @@ -50,7 +50,7 @@ LLPanelVolumePulldown::LLPanelVolumePulldown() { mCommitCallbackRegistrar.add("Vol.setControlFalse", boost::bind(&LLPanelVolumePulldown::setControlFalse, this, _2)); mCommitCallbackRegistrar.add("Vol.SetSounds", boost::bind(&LLPanelVolumePulldown::onClickSetSounds, this)); - mCommitCallbackRegistrar.add("Vol.updateMediaAutoPlayCheckbox", boost::bind(&LLPanelVolumePulldown::updateMediaAutoPlayCheckbox, this, _1)); + mCommitCallbackRegistrar.add("Vol.updateCheckbox", boost::bind(&LLPanelVolumePulldown::updateCheckbox, this, _1, _2)); mCommitCallbackRegistrar.add("Vol.GoAudioPrefs", boost::bind(&LLPanelVolumePulldown::onAdvancedButtonClick, this, _2)); buildFromFile( "panel_volume_pulldown.xml"); } @@ -90,19 +90,23 @@ void LLPanelVolumePulldown::setControlFalse(const LLSD& user_data) control->set(LLSD(FALSE)); } -void LLPanelVolumePulldown::updateMediaAutoPlayCheckbox(LLUICtrl* ctrl) +void LLPanelVolumePulldown::updateCheckbox(LLUICtrl* ctrl, const LLSD& user_data) { - std::string name = ctrl->getName(); + std::string control_name = user_data.asString(); + if (control_name == "MediaAutoPlay") + { + std::string name = ctrl->getName(); - // Disable "Allow Media to auto play" only when both - // "Streaming Music" and "Media" are unchecked. STORM-513. - if ((name == "enable_music") || (name == "enable_media")) - { - bool music_enabled = getChild<LLCheckBoxCtrl>("enable_music")->get(); - bool media_enabled = getChild<LLCheckBoxCtrl>("enable_media")->get(); + // Disable "Allow Media to auto play" only when both + // "Streaming Music" and "Media" are unchecked. STORM-513. + if ((name == "enable_music") || (name == "enable_media")) + { + bool music_enabled = getChild<LLCheckBoxCtrl>("enable_music")->get(); + bool media_enabled = getChild<LLCheckBoxCtrl>("enable_media")->get(); - getChild<LLCheckBoxCtrl>("media_auto_play_combo")->setEnabled(music_enabled || media_enabled); - } + getChild<LLCheckBoxCtrl>("media_auto_play_combo")->setEnabled(music_enabled || media_enabled); + } + } } void LLPanelVolumePulldown::onClickSetSounds() |