summaryrefslogtreecommitdiff
path: root/indra/newview/llinspectavatar.cpp
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@lindenlab.com>2009-11-04 14:59:23 -0800
committerBryan O'Sullivan <bos@lindenlab.com>2009-11-04 14:59:23 -0800
commitb806edf4ac47d18e1a43fb8dbb5fbcad8d13192f (patch)
tree26640bea40cb3913ab9d30ac99eeec936679a5ff /indra/newview/llinspectavatar.cpp
parent8b4818430fc120443b9dc677ae10fd072fffb6e6 (diff)
Redo Bao's broken merge
Diffstat (limited to 'indra/newview/llinspectavatar.cpp')
-rw-r--r--indra/newview/llinspectavatar.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp
index bfad2b1624..9989a3b473 100644
--- a/indra/newview/llinspectavatar.cpp
+++ b/indra/newview/llinspectavatar.cpp
@@ -188,7 +188,8 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd)
{
mCommitCallbackRegistrar.add("InspectAvatar.ViewProfile", boost::bind(&LLInspectAvatar::onClickViewProfile, this));
mCommitCallbackRegistrar.add("InspectAvatar.AddFriend", boost::bind(&LLInspectAvatar::onClickAddFriend, this));
- mCommitCallbackRegistrar.add("InspectAvatar.IM", boost::bind(&LLInspectAvatar::onClickIM, this));
+ mCommitCallbackRegistrar.add("InspectAvatar.IM",
+ boost::bind(&LLInspectAvatar::onClickIM, this));
mCommitCallbackRegistrar.add("InspectAvatar.Teleport", boost::bind(&LLInspectAvatar::onClickTeleport, this));
mCommitCallbackRegistrar.add("InspectAvatar.InviteToGroup", boost::bind(&LLInspectAvatar::onClickInviteToGroup, this));
mCommitCallbackRegistrar.add("InspectAvatar.Pay", boost::bind(&LLInspectAvatar::onClickPay, this));
@@ -306,7 +307,21 @@ void LLInspectAvatar::requestUpdate()
// You can't re-add someone as a friend if they are already your friend
bool is_friend = LLAvatarTracker::instance().getBuddyInfo(mAvatarID) != NULL;
bool is_self = (mAvatarID == gAgentID);
- childSetEnabled("add_friend_btn", !is_friend && !is_self);
+ if (is_self)
+ {
+ getChild<LLUICtrl>("add_friend_btn")->setVisible(false);
+ getChild<LLUICtrl>("im_btn")->setVisible(false);
+ }
+ else if (is_friend)
+ {
+ getChild<LLUICtrl>("add_friend_btn")->setVisible(false);
+ getChild<LLUICtrl>("im_btn")->setVisible(true);
+ }
+ else
+ {
+ getChild<LLUICtrl>("add_friend_btn")->setVisible(true);
+ getChild<LLUICtrl>("im_btn")->setVisible(false);
+ }
// Use an avatar_icon even though the image id will come down with the
// avatar properties because the avatar_icon code maintains a cache of icons