summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authormberezhnoy <mberezhnoy@productengine.com>2013-01-23 10:23:16 +0200
committermberezhnoy <mberezhnoy@productengine.com>2013-01-23 10:23:16 +0200
commit651f230500646dfcd695a9caa0650f81fa29b9bf (patch)
tree6be2278bf48218c9e25139ccf197623bb4873b79 /indra
parent40c88de2c0525ec72b41e40b5f5b48fdf295aba2 (diff)
CHUI-678 (Voice indicators not shown for participants in torn off conference conversations)
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llconversationview.cpp32
-rwxr-xr-xindra/newview/llconversationview.h4
-rw-r--r--indra/newview/llspeakingindicatormanager.cpp13
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)