summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelimcontrolpanel.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-12-01 12:52:21 -0500
committerLoren Shih <seraph@lindenlab.com>2009-12-01 12:52:21 -0500
commit27351b8bf59c3b2cfc31c27947397055a40b52d7 (patch)
tree6720e5dc77c8fee7f7fdecb46f220fb30247efb0 /indra/newview/llpanelimcontrolpanel.cpp
parentc361ee133761412acf766f6680b14e29e60f8a1e (diff)
parent677938e6531209ca9ccd29146454af67f1c743c7 (diff)
automated merge for viewer-2.0 -> avp.
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llpanelimcontrolpanel.cpp')
-rw-r--r--indra/newview/llpanelimcontrolpanel.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp
index fa6d16cfb1..405c95fc22 100644
--- a/indra/newview/llpanelimcontrolpanel.cpp
+++ b/indra/newview/llpanelimcontrolpanel.cpp
@@ -32,6 +32,8 @@
#include "llviewerprecompiledheaders.h"
+#include "llfloaterreg.h"
+
#include "llpanelimcontrolpanel.h"
#include "llagent.h"
@@ -58,7 +60,7 @@ void LLPanelChatControlPanel::onEndCallButtonClicked()
void LLPanelChatControlPanel::onOpenVoiceControlsClicked()
{
- // TODO: implement Voice Control Panel opening
+ LLFloaterReg::showInstance("voice_controls");
}
void LLPanelChatControlPanel::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state)
@@ -120,6 +122,7 @@ LLPanelIMControlPanel::LLPanelIMControlPanel()
LLPanelIMControlPanel::~LLPanelIMControlPanel()
{
+ LLAvatarTracker::instance().removeParticularFriendObserver(mAvatarID, this);
}
BOOL LLPanelIMControlPanel::postBuild()
@@ -169,7 +172,9 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id)
LLIMModel& im_model = LLIMModel::instance();
+ LLAvatarTracker::instance().removeParticularFriendObserver(mAvatarID, this);
mAvatarID = im_model.getOtherParticipantID(session_id);
+ LLAvatarTracker::instance().addParticularFriendObserver(mAvatarID, this);
// Disable "Add friend" button for friends.
childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(mAvatarID));
@@ -198,6 +203,12 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id)
}
}
+//virtual
+void LLPanelIMControlPanel::changed(U32 mask)
+{
+ childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(mAvatarID));
+}
+
void LLPanelIMControlPanel::nameUpdatedCallback(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group)
{
if ( id == mAvatarID )