summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2011-06-15 10:29:35 -0700
committerLeyla Farazha <leyla@lindenlab.com>2011-06-15 10:29:35 -0700
commitde1fe235c04312b3b25531bb727a4d4cc9abd00a (patch)
tree4395630a52480530ca84e5eeaf30d813bb32dbf2 /indra
parent4d0d3a1fc51d8769a3a132e1a57ec709e19f906d (diff)
EXP-878 Volume slider shown at 0
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelimcontrolpanel.cpp11
-rw-r--r--indra/newview/llpanelimcontrolpanel.h2
2 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp
index c15d1973d8..e370f2f622 100644
--- a/indra/newview/llpanelimcontrolpanel.cpp
+++ b/indra/newview/llpanelimcontrolpanel.cpp
@@ -71,7 +71,7 @@ void LLPanelChatControlPanel::onChange(EStatusType status, const std::string &ch
void LLPanelChatControlPanel::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state)
{
- updateButtons(new_state >= LLVoiceChannel::STATE_CALL_STARTED);
+ updateButtons(new_state);
}
void LLPanelChatControlPanel::updateCallButton()
@@ -96,12 +96,15 @@ void LLPanelChatControlPanel::updateCallButton()
getChildView("call_btn")->setEnabled(enable_connect);
}
-void LLPanelChatControlPanel::updateButtons(bool is_call_started)
+void LLPanelChatControlPanel::updateButtons(LLVoiceChannel::EState state)
{
+ bool is_call_started = state >= LLVoiceChannel::STATE_CALL_STARTED;
getChildView("end_call_btn_panel")->setVisible( is_call_started);
- getChildView("volume_ctrl_panel")->setVisible( is_call_started);
getChildView("voice_ctrls_btn_panel")->setVisible( is_call_started && findChild<LLView>("voice_ctrls_btn_panel"));
getChildView("call_btn_panel")->setVisible( ! is_call_started);
+
+ getChildView("volume_ctrl_panel")->setVisible(state == LLVoiceChannel::STATE_CONNECTED);
+
updateCallButton();
}
@@ -136,7 +139,7 @@ void LLPanelChatControlPanel::setSessionId(const LLUUID& session_id)
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);
+ updateButtons(voice_channel->getState());
}
}
diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h
index 76d4475b74..bba847b5d4 100644
--- a/indra/newview/llpanelimcontrolpanel.h
+++ b/indra/newview/llpanelimcontrolpanel.h
@@ -54,7 +54,7 @@ public:
virtual void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state);
- void updateButtons(bool is_call_started);
+ void updateButtons(LLVoiceChannel::EState state);
// Enables/disables call button depending on voice availability
void updateCallButton();