diff options
author | Igor Borovkov <iborovkov@productengine.com> | 2009-12-23 16:35:45 +0200 |
---|---|---|
committer | Igor Borovkov <iborovkov@productengine.com> | 2009-12-23 16:35:45 +0200 |
commit | 4cea2cac115f47e3699f1528f92ce3adcf76d87a (patch) | |
tree | 582b6188141303ea81c5fd17480b9c4be33bd303 | |
parent | cf18b668ce65cade3b0f2257f4005098b81b9e07 (diff) |
fixed EXT-3635 States of Call/Leave Call buttons are not properly managed when starting call using Call button in people panels
--HG--
branch : product-engine
-rw-r--r-- | indra/newview/llpanelimcontrolpanel.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llpanelimcontrolpanel.h | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index 3f309b3bf5..a8a75a1feb 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -65,7 +65,11 @@ void LLPanelChatControlPanel::onOpenVoiceControlsClicked() void LLPanelChatControlPanel::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state) { - bool is_call_started = ( new_state >= LLVoiceChannel::STATE_CALL_STARTED ); + updateButtons(new_state >= LLVoiceChannel::STATE_CALL_STARTED); +} + +void LLPanelChatControlPanel::updateButtons(bool is_call_started) +{ childSetVisible("end_call_btn", is_call_started); childSetVisible("voice_ctrls_btn", is_call_started); childSetVisible("call_btn", ! is_call_started); @@ -112,6 +116,9 @@ void LLPanelChatControlPanel::setSessionId(const LLUUID& session_id) if(voice_channel) { mVoiceChannelStateChangeConnection = voice_channel->setStateChangedCallback(boost::bind(&LLPanelChatControlPanel::onVoiceChannelStateChanged, this, _1, _2)); + + //call (either p2p, group or ad-hoc) can be already in started state + updateButtons(voice_channel->getState() >= LLVoiceChannel::STATE_CALL_STARTED); } } diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h index 711340efc7..c18be5a6df 100644 --- a/indra/newview/llpanelimcontrolpanel.h +++ b/indra/newview/llpanelimcontrolpanel.h @@ -57,6 +57,8 @@ public: virtual void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state); + void updateButtons(bool is_call_started); + virtual void setSessionId(const LLUUID& session_id); const LLUUID& getSessionId() { return mSessionId; } |