summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelgroup.cpp
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2010-02-25 14:12:18 -0800
committerRoxie Linden <roxie@lindenlab.com>2010-02-25 14:12:18 -0800
commit0ac14158bcec40e65fb26d2fea7555ede1e2ca94 (patch)
treebacf3b28ac4de7f69da67d7616923dafe92b0d49 /indra/newview/llpanelgroup.cpp
parent92cef0426df15c0e661fa795e6b00214f381dd05 (diff)
parentab0c9c6754836cb26a520d0a9b2d7bbdd13a5f32 (diff)
automated merge from trunk
Diffstat (limited to 'indra/newview/llpanelgroup.cpp')
-rw-r--r--indra/newview/llpanelgroup.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index 01291c4012..c37fc59745 100644
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -101,6 +101,8 @@ LLPanelGroup::LLPanelGroup()
LLPanelGroup::~LLPanelGroup()
{
LLGroupMgr::getInstance()->removeObserver(this);
+ if(LLVoiceClient::getInstance())
+ LLVoiceClient::getInstance()->removeObserver(this);
}
void LLPanelGroup::onOpen(const LLSD& key)
@@ -188,6 +190,8 @@ BOOL LLPanelGroup::postBuild()
if(panel_general)
panel_general->setupCtrls(this);
+
+ LLVoiceClient::getInstance()->addObserver(this);
return TRUE;
}
@@ -300,6 +304,17 @@ void LLPanelGroup::changed(LLGroupChange gc)
update(gc);
}
+// virtual
+void LLPanelGroup::onChange(EStatusType status, const std::string &channelURI, bool proximal)
+{
+ if(status == STATUS_JOINING || status == STATUS_LEFT_CHANNEL)
+ {
+ return;
+ }
+
+ childSetEnabled("btn_call", LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking());
+}
+
void LLPanelGroup::notifyObservers()
{
changed(GC_ALL);
@@ -425,6 +440,11 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
getChild<LLUICtrl>("group_name")->setVisible(false);
getChild<LLUICtrl>("group_name_editor")->setVisible(true);
+
+ if(button_call)
+ button_call->setVisible(false);
+ if(button_chat)
+ button_chat->setVisible(false);
}
else
{
@@ -452,6 +472,10 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
if(button_apply)
button_apply->setVisible(is_member);
+ if(button_call)
+ button_call->setVisible(is_member);
+ if(button_chat)
+ button_chat->setVisible(is_member);
}
reposButtons();