summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelavatar.cpp
diff options
context:
space:
mode:
authorMonroe Williams <monroe@lindenlab.com>2007-08-02 01:18:34 +0000
committerMonroe Williams <monroe@lindenlab.com>2007-08-02 01:18:34 +0000
commit7138fb673ac3df46b9cb5f23d0d74e70fdd2b6b3 (patch)
tree3c34a3a180b5275bd4166b0056765c5868f56447 /indra/newview/llpanelavatar.cpp
parentf6a10b3214d79df4e8f5768acaa68edbd2de5620 (diff)
Merge down from Branch_1-18-1:
svn merge --ignore-ancestry svn+ssh://svn.lindenlab.com/svn/linden/release@66449 svn+ssh://svn.lindenlab.com/svn/linden/branches/Branch_1-18-1@67131
Diffstat (limited to 'indra/newview/llpanelavatar.cpp')
-rw-r--r--indra/newview/llpanelavatar.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 2567684fa9..ab2e30014d 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -1398,6 +1398,7 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const LLString &name,
setOnlineStatus(online_status);
BOOL own_avatar = (mAvatarID == gAgent.getID() );
+ BOOL avatar_is_friend = LLAvatarTracker::instance().getBuddyInfo(mAvatarID) != NULL;
mPanelSecondLife->enableControls(own_avatar && mAllowEdit);
mPanelWeb->enableControls(own_avatar && mAllowEdit);
@@ -1515,7 +1516,7 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const LLString &name,
childSetToolTip("Show on Map",childGetValue("ShowOnMapFriendOnline").asString());
}
childSetVisible("Add Friend...", true);
- childSetEnabled("Add Friend...", true);
+ childSetEnabled("Add Friend...", !avatar_is_friend);
childSetVisible("Pay...",TRUE);
childSetEnabled("Pay...",FALSE);
}
@@ -1589,12 +1590,12 @@ void LLPanelAvatar::resetGroupList()
void LLPanelAvatar::onClickIM(void* userdata)
{
LLPanelAvatar* self = (LLPanelAvatar*) userdata;
- gIMView->setFloaterOpen(TRUE);
+ gIMMgr->setFloaterOpen(TRUE);
std::string name;
LLNameEditor* nameedit = LLViewerUICtrlFactory::getNameEditorByName(self->mPanelSecondLife, "name");
if (nameedit) name = nameedit->getText();
- gIMView->addSession(name, IM_NOTHING_SPECIAL, self->mAvatarID);
+ gIMMgr->addSession(name, IM_NOTHING_SPECIAL, self->mAvatarID);
}
@@ -1624,7 +1625,7 @@ void LLPanelAvatar::onClickAddFriend(void* userdata)
LLNameEditor* name_edit = LLViewerUICtrlFactory::getNameEditorByName(self->mPanelSecondLife, "name");
if (name_edit)
{
- LLFloaterFriends::requestFriendshipDialog(self->getAvatarID(),
+ LLPanelFriends::requestFriendshipDialog(self->getAvatarID(),
name_edit->getText());
}
}