diff --git a/indra/newview/alfloaterexploresounds.cpp b/indra/newview/alfloaterexploresounds.cpp index 0a9ff9eb107f1dd052e06d609f7a6137cd4863e4..7aad2fbfa7e2156a519ff870df502cf927ab88a1 100644 --- a/indra/newview/alfloaterexploresounds.cpp +++ b/indra/newview/alfloaterexploresounds.cpp @@ -74,7 +74,9 @@ BOOL ALFloaterExploreSounds::postBuild() getChild<LLButton>("look_at_btn")->setClickedCallback(boost::bind(&ALFloaterExploreSounds::handleLookAt, this)); getChild<LLButton>("stop_btn")->setClickedCallback(boost::bind(&ALFloaterExploreSounds::handleStop, this)); getChild<LLButton>("bl_btn")->setClickedCallback(boost::bind(&ALFloaterExploreSounds::blacklistSound, this)); - getChild<LLButton>("stop_locally_btn")->setClickedCallback(boost::bind(&ALFloaterExploreSounds::handleStopLocally, this)); + + mStopLocalButton = getChild<LLButton>("stop_locally_btn"); + mStopLocalButton->setClickedCallback(boost::bind(&ALFloaterExploreSounds::handleStopLocally, this)); mHistoryScroller = getChild<LLScrollListCtrl>("sound_list"); mHistoryScroller->setCommitCallback(boost::bind(&ALFloaterExploreSounds::handleSelection, this)); @@ -348,7 +350,7 @@ BOOL ALFloaterExploreSounds::tick() } } - childSetEnabled("stop_locally_btn", mLocalPlayingAudioSourceIDs.size() > 0); + mStopLocalButton->setEnabled(mLocalPlayingAudioSourceIDs.size() > 0); return FALSE; } @@ -377,7 +379,7 @@ void ALFloaterExploreSounds::handlePlayLocally() } } - childSetEnabled("stop_locally_btn", mLocalPlayingAudioSourceIDs.size() > 0); + mStopLocalButton->setEnabled(mLocalPlayingAudioSourceIDs.size() > 0); } void ALFloaterExploreSounds::handleLookAt() diff --git a/indra/newview/alfloaterexploresounds.h b/indra/newview/alfloaterexploresounds.h index 657e1547bc625af58053387aa2550d7eee851df8..83093d81fb4b5024ddd50d25939945a7943b582a 100644 --- a/indra/newview/alfloaterexploresounds.h +++ b/indra/newview/alfloaterexploresounds.h @@ -39,6 +39,7 @@ class ALFloaterExploreSounds final LLCheckBoxCtrl* mAvatarSounds; LLCheckBoxCtrl* mObjectSounds; LLCheckBoxCtrl* mPaused; + LLButton* mStopLocalButton = nullptr; std::list<LLSoundHistoryItem> mLastHistory; diff --git a/indra/newview/skins/default/xui/en/floater_explore_sounds.xml b/indra/newview/skins/default/xui/en/floater_explore_sounds.xml index 4216e508138d56e1f56d258ed73e219472becf92..9b3655a4b3ebe8c1866248cb4369e00b5ca5425c 100644 --- a/indra/newview/skins/default/xui/en/floater_explore_sounds.xml +++ b/indra/newview/skins/default/xui/en/floater_explore_sounds.xml @@ -12,7 +12,8 @@ title="Sounds" save_rect="true" save_visibility="true" - single_instance="true"> + single_instance="true" + reuse_instance="false"> <floater.string name="Playing"> Playing </floater.string>