summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelimcontrolpanel.h
diff options
context:
space:
mode:
authorAndrew Dyukov <adyukov@productengine.com>2010-01-22 22:16:57 +0200
committerAndrew Dyukov <adyukov@productengine.com>2010-01-22 22:16:57 +0200
commitab0c9c6754836cb26a520d0a9b2d7bbdd13a5f32 (patch)
tree4afb816e9714bdcc15f6b302a7972177044959e7 /indra/newview/llpanelimcontrolpanel.h
parent818ab4b493f97b6bd98f361518953a5f2d624c03 (diff)
Fixed normal bugs EXT-4450 ([BSI] call buttons enabled when voice is disabled) and EXT-4313
(Should not be able to start a call when voice is disabled). Call buttons state now reacts on voice changes in time. - Added voiceWorking() method to LLVoiceClient to determine real availability of voice, because voiceEnabled() doesn't take into account possible errors. Perhaps there is no need in two methods- some investigation will be made and depending on its results they may become one non-static method. voiceWorking() uses state of voice client(mState) to determine voice availability. Also some states which are not currently counted by voiceWorking() as valid may be added if testing reveals problems. - To enable/disable call buttons in time, LLVoiceClientStatusObserver is used. Its trigger uses states from its enum only to skip updating button in some states(to avoid button blinking), but to determine button state LLVoiceClient's voiceWorking() is used. --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llpanelimcontrolpanel.h')
-rw-r--r--indra/newview/llpanelimcontrolpanel.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h
index 25fdf944c9..3ab505a084 100644
--- a/indra/newview/llpanelimcontrolpanel.h
+++ b/indra/newview/llpanelimcontrolpanel.h
@@ -39,7 +39,9 @@
class LLParticipantList;
-class LLPanelChatControlPanel : public LLPanel
+class LLPanelChatControlPanel
+ : public LLPanel
+ , public LLVoiceClientStatusObserver
{
public:
LLPanelChatControlPanel() :
@@ -47,15 +49,21 @@ public:
~LLPanelChatControlPanel();
virtual BOOL postBuild();
- virtual void draw();
void onCallButtonClicked();
void onEndCallButtonClicked();
void onOpenVoiceControlsClicked();
+ // Implements LLVoiceClientStatusObserver::onChange() to enable the call
+ // button when voice is available
+ /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal);
+
virtual void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state);
void updateButtons(bool is_call_started);
+
+ // Enables/disables call button depending on voice availability
+ void updateCallButton();
virtual void setSessionId(const LLUUID& session_id);
const LLUUID& getSessionId() { return mSessionId; }