From e24cb471fc1f16b717551eb9e9cd182e54e3f376 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Mon, 17 May 2010 21:44:14 -0700 Subject: Fixed 'Currently Online' text in profile being misaligned and 'Currently Offline' not appearing --- linden/indra/newview/llpanelavatar.cpp | 36 ++++++++++------------ .../skins/default/xui/en-us/panel_avatar.xml | 2 +- 2 files changed, 17 insertions(+), 21 deletions(-) (limited to 'linden/indra/newview') diff --git a/linden/indra/newview/llpanelavatar.cpp b/linden/indra/newview/llpanelavatar.cpp index dbdeb3c..6e0949f 100644 --- a/linden/indra/newview/llpanelavatar.cpp +++ b/linden/indra/newview/llpanelavatar.cpp @@ -360,10 +360,6 @@ BOOL LLPanelAvatarSecondLife::postBuild(void) childSetVisible("?",LLPanelAvatar::sAllowFirstLife); childSetVisible("online_yes",FALSE); - - // These are cruft but may still exist in some xml files - // TODO: remove the following 2 lines once translators grab these changes - childSetVisible("online_unknown",FALSE); childSetVisible("online_no",FALSE); childSetAction("Find on Map", LLPanelAvatar::onClickTrack, getPanelAvatar()); @@ -1250,6 +1246,13 @@ void LLPanelAvatar::setAvatar(LLViewerObject *avatarp) void LLPanelAvatar::setOnlineStatus(EOnlineStatus online_status) { + // Since setOnlineStatus gets called after setAvatarID + // we can do this check here -- MC + if (mAvatarID == gAgent.getID()) + { + return; + } + // Online status NO could be because they are hidden // If they are a friend, we may know the truth! if ((ONLINE_STATUS_YES != online_status) @@ -1260,6 +1263,7 @@ void LLPanelAvatar::setOnlineStatus(EOnlineStatus online_status) } mPanelSecondLife->childSetVisible("online_yes", (online_status == ONLINE_STATUS_YES)); + mPanelSecondLife->childSetVisible("online_no", (online_status == ONLINE_STATUS_NO)); BOOL in_prelude = gAgent.inPrelude(); if(gAgent.isGodlike()) @@ -1277,18 +1281,6 @@ void LLPanelAvatar::setOnlineStatus(EOnlineStatus online_status) childSetEnabled("Offer Teleport...", TRUE); childSetToolTip("Offer Teleport...", childGetValue("TeleportNormal").asString()); } - - // Since setOnlineStatus gets called after setAvatarID - // need to make sure that "Offer Teleport" doesn't get set - // to TRUE again for yourself - if (mAvatarID != gAgent.getID()) - { - childSetVisible("Offer Teleport...",TRUE); - } - else - { - childSetEnabled("Offer Teleport...", FALSE); - } } void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name, @@ -1405,9 +1397,16 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name childSetEnabled("Unfreeze",FALSE); childSetVisible("csr_btn", FALSE); childSetEnabled("csr_btn", FALSE); + + // if you don't know if you're online or not, there's no helping you -- MC + childSetVisible("online_yes",FALSE); + childSetVisible("online_no",FALSE); } else { + BOOL is_god = FALSE; + if (gAgent.isGodlike()) is_god = TRUE; + childSetVisible("OK",FALSE); childSetEnabled("OK",FALSE); @@ -1426,7 +1425,7 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name childSetVisible("Find on Map",TRUE); // Note: we don't always know online status, so always allow gods to try to track - BOOL enable_track = gAgent.isGodlike() || is_agent_mappable(mAvatarID); + BOOL enable_track = is_god || is_agent_mappable(mAvatarID); childSetEnabled("Find on Map",enable_track); if (!mIsFriend) { @@ -1444,9 +1443,6 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name childSetEnabled("Add Friend...", !avatar_is_friend); childSetVisible("Pay...",TRUE); childSetEnabled("Pay...",FALSE); - - BOOL is_god = FALSE; - if (gAgent.isGodlike()) is_god = TRUE; childSetVisible("Kick", is_god); childSetEnabled("Kick", is_god); diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml b/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml index 0fb1f92..1786dc4 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml @@ -41,7 +41,7 @@ Currently: Online -- cgit v1.1