From 301f250c1cd77711c0234d8ed4089453712f834e Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 10 Feb 2010 12:04:26 -0800 Subject: Mini-inspectors show both display name and SLID --- indra/newview/llinspectavatar.cpp | 19 +++++++++++++++---- indra/newview/skins/default/xui/en/inspect_avatar.xml | 15 +++++++++++++-- indra/newview/skins/default/xui/en/panel_login.xml | 2 +- 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index ddd9008b3c..41dbeab5a7 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -138,7 +138,7 @@ private: bool isNotFriend(); // Callback for gCacheName to look up avatar name - void nameUpdatedCallback(const LLUUID& id, + void onNameCache(const LLUUID& id, const std::string& name, bool is_group); @@ -359,7 +359,7 @@ void LLInspectAvatar::requestUpdate() childSetValue("avatar_icon", LLSD(mAvatarID) ); gCacheName->get(mAvatarID, false, - boost::bind(&LLInspectAvatar::nameUpdatedCallback, + boost::bind(&LLInspectAvatar::onNameCache, this, _1, _2, _3)); } @@ -601,7 +601,7 @@ void LLInspectAvatar::onVolumeChange(const LLSD& data) gVoiceClient->setUserVolume(mAvatarID, volume); } -void LLInspectAvatar::nameUpdatedCallback( +void LLInspectAvatar::onNameCache( const LLUUID& id, const std::string& name, bool is_group) @@ -609,7 +609,18 @@ void LLInspectAvatar::nameUpdatedCallback( if (id == mAvatarID) { mAvatarName = name; - childSetValue("user_name", LLSD(mAvatarName) ); + + // IDEVO JAMESDEBUG - need to always display a display name + std::string display_name; + if (gCacheName->getDisplayName(mAvatarID, display_name)) + { + getChild("user_name")->setValue(display_name); + } + else + { + getChild("user_name")->setValue(name); + } + getChild("user_slid")->setValue(name); } } diff --git a/indra/newview/skins/default/xui/en/inspect_avatar.xml b/indra/newview/skins/default/xui/en/inspect_avatar.xml index 9796f7b5b6..b7717859fc 100644 --- a/indra/newview/skins/default/xui/en/inspect_avatar.xml +++ b/indra/newview/skins/default/xui/en/inspect_avatar.xml @@ -9,7 +9,7 @@ bg_opaque_image="Inspector_Background" can_close="false" can_minimize="false" - height="148" + height="164" layout="topleft" name="inspect_avatar" single_instance="true" @@ -43,6 +43,16 @@ use_ellipses="true" value="Grumpity ProductEngine" width="175" /> + @@ -108,7 +119,7 @@ height="20" label="Add Friend" left="8" - top="119" + top="135" name="add_friend_btn" width="90" />