diff options
Diffstat (limited to 'indra/newview/llfloaterimsession.cpp')
-rw-r--r-- | indra/newview/llfloaterimsession.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp index c6868ffeda..ed61c75154 100644 --- a/indra/newview/llfloaterimsession.cpp +++ b/indra/newview/llfloaterimsession.cpp @@ -94,6 +94,7 @@ LLFloaterIMSession::LLFloaterIMSession(const LLUUID& session_id) mEnableCallbackRegistrar.add("Avatar.EnableGearItem", boost::bind(&LLFloaterIMSession::enableGearMenuItem, this, _2)); mCommitCallbackRegistrar.add("Avatar.GearDoToSelected", boost::bind(&LLFloaterIMSession::GearDoToSelected, this, _2)); mEnableCallbackRegistrar.add("Avatar.CheckGearItem", boost::bind(&LLFloaterIMSession::checkGearMenuItem, this, _2)); + mVoiceChannelChanged = LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLFloaterIMSession::onVoiceChannelChanged, this, _1)); setDocked(true); } @@ -292,6 +293,8 @@ LLFloaterIMSession::~LLFloaterIMSession() } LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::IM, this); + + mVoiceChannelChanged.disconnect(); } @@ -521,6 +524,14 @@ void LLFloaterIMSession::sendParticipantsAddedNotification(const uuid_vec_t& uui sendMsg(getString(uuids.size() > 1 ? "multiple_participants_added" : "participant_added", args)); } +void LLFloaterIMSession::onVoiceChannelChanged(const LLUUID &session_id) +{ + if (session_id == mSessionID) + { + boundVoiceChannel(); + } +} + void LLFloaterIMSession::boundVoiceChannel() { LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID); |