diff options
author | mberezhnoy <mberezhnoy@productengine.com> | 2013-01-23 10:23:16 +0200 |
---|---|---|
committer | mberezhnoy <mberezhnoy@productengine.com> | 2013-01-23 10:23:16 +0200 |
commit | 651f230500646dfcd695a9caa0650f81fa29b9bf (patch) | |
tree | 6be2278bf48218c9e25139ccf197623bb4873b79 | |
parent | 40c88de2c0525ec72b41e40b5f5b48fdf295aba2 (diff) |
CHUI-678 (Voice indicators not shown for participants in torn off conference conversations)
-rwxr-xr-x | indra/newview/llconversationview.cpp | 32 | ||||
-rwxr-xr-x | indra/newview/llconversationview.h | 4 | ||||
-rw-r--r-- | indra/newview/llspeakingindicatormanager.cpp | 13 |
3 files changed, 36 insertions, 13 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 903dd2a407..bdd5dfc51a 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -82,6 +82,7 @@ LLConversationViewSession::LLConversationViewSession(const LLConversationViewSes mVoiceClientObserver(NULL), mCollapsedMode(false), mHasArrow(true), + mIsInActiveVoiceChannel(false), mFlashStateOn(false), mFlashStarted(false) { @@ -178,6 +179,7 @@ BOOL LLConversationViewSession::postBuild() LLIconCtrl* icon = mItemPanel->getChild<LLIconCtrl>("nearby_chat_icon"); icon->setVisible(true); mSpeakingIndicator->setSpeakerId(gAgentID, LLUUID::null, true); + mIsInActiveVoiceChannel = true; if(LLVoiceClient::instanceExists()) { LLNearbyVoiceClientStatusObserver* mVoiceClientObserver = new LLNearbyVoiceClientStatusObserver(this); @@ -232,6 +234,8 @@ void LLConversationViewSession::draw() (*iit)->setVisible(draw_children); } + refresh(); + LLView::draw(); } @@ -351,6 +355,25 @@ void LLConversationViewSession::refresh() // Update all speaking indicators LLSpeakingIndicatorManager::updateSpeakingIndicators(); + + // we should show indicator for specified voice session only if this is current channel. EXT-5562. + if (!mIsInActiveVoiceChannel) + { + if (mSpeakingIndicator) + { + mSpeakingIndicator->setVisible(false); + } + LLConversationViewParticipant* participant = NULL; + items_t::const_iterator iter; + for (iter = getItemsBegin(); iter != getItemsEnd(); iter++) + { + participant = dynamic_cast<LLConversationViewParticipant*>(*iter); + if (participant) + { + participant->hideSpeakingIndicator(); + } + } + } // Do the regular upstream refresh LLFolderViewFolder::refresh(); @@ -362,8 +385,8 @@ void LLConversationViewSession::onCurrentVoiceSessionChanged(const LLUUID& sessi if (vmi) { - bool is_active = vmi->getUUID() == session_id; - mCallIconLayoutPanel->setVisible(is_active); + mIsInActiveVoiceChannel = vmi->getUUID() == session_id; + mCallIconLayoutPanel->setVisible(mIsInActiveVoiceChannel); } } @@ -623,5 +646,10 @@ LLView* LLConversationViewParticipant::getItemChildView(EAvatarListItemChildInde return child_view; } +void LLConversationViewParticipant::hideSpeakingIndicator() +{ + mSpeakingIndicator->setVisible(false); +} + // EOF diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index 5f6acfb9ab..f2fa2fb042 100755 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -102,6 +102,8 @@ private: bool mCollapsedMode; bool mHasArrow; + bool mIsInActiveVoiceChannel; + LLVoiceClientStatusObserver* mVoiceClientObserver; boost::signals2::connection mActiveVoiceChannelConnection; @@ -137,6 +139,8 @@ public: /*virtual*/ S32 getLabelXPos(); + void hideSpeakingIndicator(); + protected: friend class LLUICtrlFactory; LLConversationViewParticipant( const Params& p ); diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp index 76da7d1aee..07e9371124 100644 --- a/indra/newview/llspeakingindicatormanager.cpp +++ b/indra/newview/llspeakingindicatormanager.cpp @@ -237,18 +237,9 @@ void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& spea { was_found = true; LLSpeakingIndicator* indicator = (*it_indicator).second; + was_switched_on = was_switched_on || switch_on; - BOOL switch_current_on = switch_on; - - // we should show indicator for specified voice session only if this is current channel. EXT-5562. - if (switch_current_on) - { - switch_current_on = indicator->getTargetSessionID() == session_id; - LL_DEBUGS("SpeakingIndicator") << "Session: " << session_id << ", target: " << indicator->getTargetSessionID() << ", the same? = " << switch_current_on << LL_ENDL; - } - was_switched_on = was_switched_on || switch_current_on; - - indicator->switchIndicator(switch_current_on); + indicator->switchIndicator(switch_on); } if (was_found) |