summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelimcontrolpanel.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-12-31 14:31:58 -0800
committerJames Cook <james@lindenlab.com>2009-12-31 14:31:58 -0800
commiteb5a76996a1b1ce2ef30b6106287caae998dcc85 (patch)
treec796af5a77c8ebfa7d9d09709c0b179e721490c8 /indra/newview/llpanelimcontrolpanel.cpp
parent4e23ae312f0ab59c0c8c5b55c6c8450adf7d7f82 (diff)
parent6f66ec64b9e360a002a6d658327b72aaaab9325a (diff)
Merge (viewer-2-0 into gooey)
Diffstat (limited to 'indra/newview/llpanelimcontrolpanel.cpp')
-rw-r--r--indra/newview/llpanelimcontrolpanel.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp
index a8a75a1feb..279818d52f 100644
--- a/indra/newview/llpanelimcontrolpanel.cpp
+++ b/indra/newview/llpanelimcontrolpanel.cpp
@@ -184,6 +184,12 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id)
// Disable "Add friend" button for friends.
childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(mAvatarID));
+
+ // Disable "Teleport" button if friend is offline
+ if(LLAvatarActions::isFriend(mAvatarID))
+ {
+ childSetEnabled("teleport_btn", LLAvatarTracker::instance().isBuddyOnline(mAvatarID));
+ }
getChild<LLAvatarIconCtrl>("avatar_icon")->setValue(mAvatarID);
@@ -214,6 +220,12 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id)
void LLPanelIMControlPanel::changed(U32 mask)
{
childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(mAvatarID));
+
+ // Disable "Teleport" button if friend is offline
+ if(LLAvatarActions::isFriend(mAvatarID))
+ {
+ childSetEnabled("teleport_btn", LLAvatarTracker::instance().isBuddyOnline(mAvatarID));
+ }
}
void LLPanelIMControlPanel::nameUpdatedCallback(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group)