diff options
Diffstat (limited to 'indra/newview/llpanelimcontrolpanel.cpp')
-rw-r--r-- | indra/newview/llpanelimcontrolpanel.cpp | 13 |
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 ) |