diff options
author | Andrew Dyukov <adyukov@productengine.com> | 2010-02-03 22:16:18 +0200 |
---|---|---|
committer | Andrew Dyukov <adyukov@productengine.com> | 2010-02-03 22:16:18 +0200 |
commit | b52d2a2f1b0406becb80862686be7b6f2444006d (patch) | |
tree | dfcefbe6d3106f323b65f5cb9ac0b8836c717825 /indra/newview/llcallfloater.cpp | |
parent | a1c3d608199a888584ce8d2172905175fcbd1796 (diff) |
Fixed normal bug EXT-4648 (Right segment of Speak button is disabled if nearby voice chat is disabled in estate).
- Added methods for separate enabling of left and right parts of speak button and used them instead of simply enabling/disabling LLSpeakButton in bottomtray.
- Made changes to reset() in LLCallFloater to show "no one near..." instead of "loading" in vcp for nearby chat in regions with disabled voice.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llcallfloater.cpp')
-rw-r--r-- | indra/newview/llcallfloater.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index f62fd44bc0..8cb240c7c2 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -52,6 +52,7 @@ #include "lltransientfloatermgr.h" #include "llviewerwindow.h" #include "llvoicechannel.h" +#include "llviewerparcelmgr.h" static void get_voice_participants_uuids(std::vector<LLUUID>& speakers_uuids); void reshape_floater(LLCallFloater* floater, S32 delta_height); @@ -731,11 +732,11 @@ void LLCallFloater::updateState(const LLVoiceChannel::EState& new_state) } else { - reset(); + reset(new_state); } } -void LLCallFloater::reset() +void LLCallFloater::reset(const LLVoiceChannel::EState& new_state) { // lets forget states from the previous session // for timers... @@ -748,8 +749,18 @@ void LLCallFloater::reset() mParticipants = NULL; mAvatarList->clear(); - // update floater to show Loading while waiting for data. - mAvatarList->setNoItemsCommentText(LLTrans::getString("LoadingData")); + // "loading" is shown in parcel with disabled voice only when state is "ringing" + // to avoid showing it in nearby chat vcp all the time- "no_one_near" is now shown there (EXT-4648) + bool show_loading = LLVoiceChannel::STATE_RINGING == new_state; + if(!show_loading && !LLViewerParcelMgr::getInstance()->allowAgentVoice() && mVoiceType == VC_LOCAL_CHAT) + { + mAvatarList->setNoItemsCommentText(getString("no_one_near")); + } + else + { + // update floater to show Loading while waiting for data. + mAvatarList->setNoItemsCommentText(LLTrans::getString("LoadingData")); + } mAvatarList->setVisible(TRUE); mNonAvatarCaller->setVisible(FALSE); |