From 9737349a72189a7ff782e5f5a8a633dbd515d961 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Tue, 29 Dec 2009 19:55:23 +0200 Subject: Fixed minor bug EXT-2955 ("Teleport" button is enabled in profile panel of offline avatar). - Fixed not only "Teleport" button from profile, but also from IM (according to comment in JIRA). --HG-- branch : product-engine --- indra/newview/llpanelimcontrolpanel.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/newview/llpanelimcontrolpanel.cpp') 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("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) -- cgit v1.3