From 146e9d5e4d9a9a4f33d9ccd47a901980972b7ab9 Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 1 Feb 2010 17:06:18 -0800 Subject: Support returning full_name (and SLID) for LLCacheName::get() calls Changed callback signature to full_name instead of first_name,last_name Eliminated all calls to legacy (non-signal/non-boost-bind) lookup mechanism Change Pay dialog names to SLURL links Tweaked layout of Pay Resident and Pay via Object floaters to make SLURLs fit Consolidate name first + " " + last concatenation in LLCacheName::buildFullName() Reviewed with Kelly --- indra/newview/llinspectavatar.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'indra/newview/llinspectavatar.cpp') diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 4b0539337b..c5cf40d7b7 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -138,11 +138,9 @@ private: bool isNotFriend(); // Callback for gCacheName to look up avatar name - void nameUpdatedCallback( - const LLUUID& id, - const std::string& first, - const std::string& last, - BOOL is_group); + void nameUpdatedCallback(const LLUUID& id, + const std::string& name, + bool is_group); private: LLUUID mAvatarID; @@ -359,9 +357,9 @@ void LLInspectAvatar::requestUpdate() childSetValue("avatar_icon", LLSD(mAvatarID) ); - gCacheName->get(mAvatarID, FALSE, + gCacheName->get(mAvatarID, false, boost::bind(&LLInspectAvatar::nameUpdatedCallback, - this, _1, _2, _3, _4)); + this, _1, _2, _3)); } void LLInspectAvatar::processAvatarData(LLAvatarData* data) @@ -597,13 +595,12 @@ void LLInspectAvatar::onVolumeChange(const LLSD& data) void LLInspectAvatar::nameUpdatedCallback( const LLUUID& id, - const std::string& first, - const std::string& last, - BOOL is_group) + const std::string& name, + bool is_group) { if (id == mAvatarID) { - mAvatarName = first + " " + last; + mAvatarName = name; childSetValue("user_name", LLSD(mAvatarName) ); } } -- cgit v1.2.3 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 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'indra/newview/llinspectavatar.cpp') 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); } } -- cgit v1.2.3 From c2373fb5a6b08b2c32e5f93fa67b25f669e8b47f Mon Sep 17 00:00:00 2001 From: James Cook Date: Thu, 11 Feb 2010 16:39:15 -0800 Subject: Created stub LLAvatarNameCache for display name lookup, as well as LLAvatarName base data object. Reviewed with Kelly. --- indra/newview/llinspectavatar.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'indra/newview/llinspectavatar.cpp') diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 41dbeab5a7..6dddc133c2 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -37,6 +37,7 @@ #include "llagent.h" #include "llagentdata.h" #include "llavataractions.h" +#include "llavatarnamecache.h" #include "llavatarpropertiesprocessor.h" #include "llcallingcard.h" #include "lldateutil.h" @@ -603,24 +604,25 @@ void LLInspectAvatar::onVolumeChange(const LLSD& data) void LLInspectAvatar::onNameCache( const LLUUID& id, - const std::string& name, + const std::string& full_name, bool is_group) { if (id == mAvatarID) { - mAvatarName = name; + mAvatarName = full_name; // IDEVO JAMESDEBUG - need to always display a display name - std::string display_name; - if (gCacheName->getDisplayName(mAvatarID, display_name)) + LLAvatarName av_name; + if (LLAvatarNameCache::get(mAvatarID, &av_name)) { - getChild("user_name")->setValue(display_name); + getChild("user_name")->setValue(av_name.mDisplayName); + getChild("user_slid")->setValue(av_name.mSLID); } else { - getChild("user_name")->setValue(name); + getChild("user_name")->setValue(full_name); + getChild("user_slid")->setValue(full_name); } - getChild("user_slid")->setValue(name); } } -- cgit v1.2.3 From ee81adb01b8619302898471fdbba5c93f716d10b Mon Sep 17 00:00:00 2001 From: James Cook Date: Thu, 18 Feb 2010 18:46:41 -0800 Subject: Preference to set what fields name tags display, and first attempt at "use display names" menu item which doesn't work yet --- indra/newview/llinspectavatar.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinspectavatar.cpp') diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 6dddc133c2..c4fd5a07c1 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -613,7 +613,8 @@ void LLInspectAvatar::onNameCache( // IDEVO JAMESDEBUG - need to always display a display name LLAvatarName av_name; - if (LLAvatarNameCache::get(mAvatarID, &av_name)) + if (LLAvatarNameCache::useDisplayNames() + && LLAvatarNameCache::get(mAvatarID, &av_name)) { getChild("user_name")->setValue(av_name.mDisplayName); getChild("user_slid")->setValue(av_name.mSLID); -- cgit v1.2.3 From 95479a75bb65e355fce8bc5bcc719cfd242b8c16 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 2 Mar 2010 15:14:27 -0800 Subject: Nicer inspector when using SLIDs only --- indra/newview/llinspectavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llinspectavatar.cpp') diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index c4fd5a07c1..a9258f7663 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -622,7 +622,7 @@ void LLInspectAvatar::onNameCache( else { getChild("user_name")->setValue(full_name); - getChild("user_slid")->setValue(full_name); + getChild("user_slid")->setValue(""); } } } -- cgit v1.2.3 From 7c913b91163cb2cb9e1829b523d1678a74230e93 Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 26 Apr 2010 11:26:02 -0700 Subject: Fix inspector display name updating to help test server Display Names --- indra/newview/llinspectavatar.cpp | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) (limited to 'indra/newview/llinspectavatar.cpp') diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 1bb9c42cbf..47b287b3ef 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -146,6 +146,8 @@ private: void onNameCache(const LLUUID& id, const std::string& name, bool is_group); + void onAvatarNameCache(const LLUUID& agent_id, + const LLAvatarName& av_name); private: LLUUID mAvatarID; @@ -332,6 +334,7 @@ void LLInspectAvatar::requestUpdate() // Clear out old data so it doesn't flash between old and new getChild("user_name")->setValue(""); + getChild("user_slid")->setValue(""); getChild("user_subtitle")->setValue(""); getChild("user_details")->setValue(""); @@ -369,9 +372,19 @@ void LLInspectAvatar::requestUpdate() childSetValue("avatar_icon", LLSD(mAvatarID) ); + // JAMESDEBUG HACK: Request via both legacy name system and new + // name system to set mAvatarName for not-yet-converted friendship + // request system. gCacheName->get(mAvatarID, false, boost::bind(&LLInspectAvatar::onNameCache, this, _1, _2, _3)); + + if (LLAvatarNameCache::useDisplayNames()) + { + LLAvatarNameCache::get(mAvatarID, + boost::bind(&LLInspectAvatar::onAvatarNameCache, + this, _1, _2)); + } } void LLInspectAvatar::processAvatarData(LLAvatarData* data) @@ -614,14 +627,7 @@ void LLInspectAvatar::onNameCache( mAvatarName = full_name; // IDEVO JAMESDEBUG - need to always display a display name - LLAvatarName av_name; - if (LLAvatarNameCache::useDisplayNames() - && LLAvatarNameCache::get(mAvatarID, &av_name)) - { - getChild("user_name")->setValue(av_name.mDisplayName); - getChild("user_slid")->setValue(av_name.mSLID); - } - else + if (!LLAvatarNameCache::useDisplayNames()) { getChild("user_name")->setValue(full_name); getChild("user_slid")->setValue(""); @@ -629,6 +635,18 @@ void LLInspectAvatar::onNameCache( } } +void LLInspectAvatar::onAvatarNameCache( + const LLUUID& agent_id, + const LLAvatarName& av_name) +{ + if (agent_id == mAvatarID) + { + // JAMESDEBUG what to do about mAvatarName ? + getChild("user_name")->setValue(av_name.mDisplayName); + getChild("user_slid")->setValue(av_name.mSLID); + } +} + void LLInspectAvatar::onClickAddFriend() { LLAvatarActions::requestFriendshipDialog(mAvatarID, mAvatarName); -- cgit v1.2.3 From 22f4de740dfcb2fdf92e46b91a426ca14fc42081 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Mon, 17 May 2010 15:28:37 -0700 Subject: inspector and friends list tooltip updates reviewed by James --- indra/newview/llinspectavatar.cpp | 38 +++++++++++++++----------------------- 1 file changed, 15 insertions(+), 23 deletions(-) (limited to 'indra/newview/llinspectavatar.cpp') diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 0024651863..3cbde2bb9c 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -154,7 +154,7 @@ private: private: LLUUID mAvatarID; // Need avatar name information to spawn friend add request - std::string mAvatarName; + std::string mLegacyName; // an in-flight request for avatar properties from LLAvatarPropertiesProcessor // is represented by this object LLFetchAvatarData* mPropertiesRequest; @@ -209,7 +209,7 @@ public: LLInspectAvatar::LLInspectAvatar(const LLSD& sd) : LLInspect( LLSD() ), // single_instance, doesn't really need key mAvatarID(), // set in onOpen() *Note: we used to show partner's name but we dont anymore --angela 3rd Dec* - mAvatarName(), + mLegacyName(), mPropertiesRequest(NULL) { mCommitCallbackRegistrar.add("InspectAvatar.ViewProfile", boost::bind(&LLInspectAvatar::onClickViewProfile, this)); @@ -376,8 +376,7 @@ void LLInspectAvatar::requestUpdate() childSetValue("avatar_icon", LLSD(mAvatarID) ); // JAMESDEBUG HACK: Request via both legacy name system and new - // name system to set mAvatarName for not-yet-converted friendship - // request system. + // name system to set mLegacyName for use with mute system gCacheName->get(mAvatarID, false, boost::bind(&LLInspectAvatar::onNameCache, this, _1, _2, _3)); @@ -574,7 +573,7 @@ void LLInspectAvatar::updateVolumeSlider() LLUICtrl* mute_btn = getChild("mute_btn"); - bool is_linden = LLStringUtil::endsWith(mAvatarName, " Linden"); + bool is_linden = LLStringUtil::endsWith(mLegacyName, " Linden"); mute_btn->setEnabled( !is_linden); mute_btn->setValue( is_muted ); @@ -605,7 +604,7 @@ void LLInspectAvatar::onClickMuteVolume() LLMuteList* mute_list = LLMuteList::getInstance(); bool is_muted = mute_list->isMuted(mAvatarID, LLMute::flagVoiceChat); - LLMute mute(mAvatarID, mAvatarName, LLMute::AGENT); + LLMute mute(mAvatarID, mLegacyName, LLMute::AGENT); if (!is_muted) { mute_list->add(mute, LLMute::flagVoiceChat); @@ -631,14 +630,8 @@ void LLInspectAvatar::onNameCache( { if (id == mAvatarID) { - mAvatarName = full_name; - - // IDEVO JAMESDEBUG - need to always display a display name - if (!LLAvatarNameCache::useDisplayNames()) - { - getChild("user_name")->setValue(full_name); - getChild("user_slid")->setValue(""); - } + // we need the legacy name for the mute list :-( + mLegacyName = full_name; } } @@ -648,7 +641,6 @@ void LLInspectAvatar::onAvatarNameCache( { if (agent_id == mAvatarID) { - // JAMESDEBUG what to do about mAvatarName ? getChild("user_name")->setValue(av_name.mDisplayName); getChild("user_slid")->setValue(av_name.mSLID); } @@ -656,7 +648,7 @@ void LLInspectAvatar::onAvatarNameCache( void LLInspectAvatar::onClickAddFriend() { - LLAvatarActions::requestFriendshipDialog(mAvatarID, mAvatarName); + LLAvatarActions::requestFriendshipDialog(mAvatarID, mLegacyName); closeFloater(); } @@ -724,7 +716,7 @@ void LLInspectAvatar::onClickShare() void LLInspectAvatar::onToggleMute() { - LLMute mute(mAvatarID, mAvatarName, LLMute::AGENT); + LLMute mute(mAvatarID, mLegacyName, LLMute::AGENT); if (LLMuteList::getInstance()->isMuted(mute.mID, mute.mName)) { @@ -741,7 +733,7 @@ void LLInspectAvatar::onToggleMute() void LLInspectAvatar::onClickReport() { - LLFloaterReporter::showFromAvatar(mAvatarID, mAvatarName); + LLFloaterReporter::showFromAvatar(mAvatarID, mLegacyName); closeFloater(); } @@ -765,17 +757,17 @@ void LLInspectAvatar::onClickZoomIn() void LLInspectAvatar::onClickFindOnMap() { - gFloaterWorldMap->trackAvatar(mAvatarID, mAvatarName); + gFloaterWorldMap->trackAvatar(mAvatarID, mLegacyName); LLFloaterReg::showInstance("world_map"); } bool LLInspectAvatar::enableMute() { - bool is_linden = LLStringUtil::endsWith(mAvatarName, " Linden"); + bool is_linden = LLStringUtil::endsWith(mLegacyName, " Linden"); bool is_self = mAvatarID == gAgent.getID(); - if (!is_linden && !is_self && !LLMuteList::getInstance()->isMuted(mAvatarID, mAvatarName)) + if (!is_linden && !is_self && !LLMuteList::getInstance()->isMuted(mAvatarID, mLegacyName)) { return true; } @@ -787,10 +779,10 @@ bool LLInspectAvatar::enableMute() bool LLInspectAvatar::enableUnmute() { - bool is_linden = LLStringUtil::endsWith(mAvatarName, " Linden"); + bool is_linden = LLStringUtil::endsWith(mLegacyName, " Linden"); bool is_self = mAvatarID == gAgent.getID(); - if (!is_linden && !is_self && LLMuteList::getInstance()->isMuted(mAvatarID, mAvatarName)) + if (!is_linden && !is_self && LLMuteList::getInstance()->isMuted(mAvatarID, mLegacyName)) { return true; } -- cgit v1.2.3 From f4148502e484d516b42c4a88603eee6889d45697 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 18 May 2010 16:00:45 -0700 Subject: Rename mSLID to mUsername to match the name of the field in the UI Product made a late-breaking request to change the name of this field. The wire protocol for People API has not yet changed. --- indra/newview/llinspectavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llinspectavatar.cpp') diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 3cbde2bb9c..74bf6e378d 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -642,7 +642,7 @@ void LLInspectAvatar::onAvatarNameCache( if (agent_id == mAvatarID) { getChild("user_name")->setValue(av_name.mDisplayName); - getChild("user_slid")->setValue(av_name.mSLID); + getChild("user_slid")->setValue(av_name.mUsername); } } -- cgit v1.2.3 From 56839abe91ce11a5137b18aace9a1148e31e2642 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 19 May 2010 14:39:36 -0700 Subject: Updated avatar inspectors to use new legacy name field in avatarnamecache --- indra/newview/llinspectavatar.cpp | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) (limited to 'indra/newview/llinspectavatar.cpp') diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 74bf6e378d..c4144c9844 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -144,10 +144,6 @@ private: // Is used to determine if "Add friend" option should be enabled in gear menu bool isNotFriend(); - // Callback for gCacheName to look up avatar name - void onNameCache(const LLUUID& id, - const std::string& name, - bool is_group); void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name); @@ -375,18 +371,9 @@ void LLInspectAvatar::requestUpdate() childSetValue("avatar_icon", LLSD(mAvatarID) ); - // JAMESDEBUG HACK: Request via both legacy name system and new - // name system to set mLegacyName for use with mute system - gCacheName->get(mAvatarID, false, - boost::bind(&LLInspectAvatar::onNameCache, - this, _1, _2, _3)); - - if (LLAvatarNameCache::useDisplayNames()) - { - LLAvatarNameCache::get(mAvatarID, + LLAvatarNameCache::get(mAvatarID, boost::bind(&LLInspectAvatar::onAvatarNameCache, this, _1, _2)); - } } void LLInspectAvatar::processAvatarData(LLAvatarData* data) @@ -623,18 +610,6 @@ void LLInspectAvatar::onVolumeChange(const LLSD& data) LLVoiceClient::getInstance()->setUserVolume(mAvatarID, volume); } -void LLInspectAvatar::onNameCache( - const LLUUID& id, - const std::string& full_name, - bool is_group) -{ - if (id == mAvatarID) - { - // we need the legacy name for the mute list :-( - mLegacyName = full_name; - } -} - void LLInspectAvatar::onAvatarNameCache( const LLUUID& agent_id, const LLAvatarName& av_name) @@ -643,6 +618,7 @@ void LLInspectAvatar::onAvatarNameCache( { getChild("user_name")->setValue(av_name.mDisplayName); getChild("user_slid")->setValue(av_name.mUsername); + mLegacyName = av_name.getLegacyName(); } } -- cgit v1.2.3 From 94945f996a689f24d1b553d400e681246459de63 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 25 May 2010 14:13:26 -0700 Subject: Report abuse floater updated for display names compatibility reviewed by James --- indra/newview/llinspectavatar.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'indra/newview/llinspectavatar.cpp') diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index c4144c9844..3126676871 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -150,7 +150,7 @@ private: private: LLUUID mAvatarID; // Need avatar name information to spawn friend add request - std::string mLegacyName; + LLAvatarName mAvatarName; // an in-flight request for avatar properties from LLAvatarPropertiesProcessor // is represented by this object LLFetchAvatarData* mPropertiesRequest; @@ -205,7 +205,7 @@ public: LLInspectAvatar::LLInspectAvatar(const LLSD& sd) : LLInspect( LLSD() ), // single_instance, doesn't really need key mAvatarID(), // set in onOpen() *Note: we used to show partner's name but we dont anymore --angela 3rd Dec* - mLegacyName(), + mAvatarName(), mPropertiesRequest(NULL) { mCommitCallbackRegistrar.add("InspectAvatar.ViewProfile", boost::bind(&LLInspectAvatar::onClickViewProfile, this)); @@ -560,7 +560,7 @@ void LLInspectAvatar::updateVolumeSlider() LLUICtrl* mute_btn = getChild("mute_btn"); - bool is_linden = LLStringUtil::endsWith(mLegacyName, " Linden"); + bool is_linden = LLStringUtil::endsWith(mAvatarName.getLegacyName(), " Linden"); mute_btn->setEnabled( !is_linden); mute_btn->setValue( is_muted ); @@ -591,7 +591,7 @@ void LLInspectAvatar::onClickMuteVolume() LLMuteList* mute_list = LLMuteList::getInstance(); bool is_muted = mute_list->isMuted(mAvatarID, LLMute::flagVoiceChat); - LLMute mute(mAvatarID, mLegacyName, LLMute::AGENT); + LLMute mute(mAvatarID, mAvatarName.getLegacyName(), LLMute::AGENT); if (!is_muted) { mute_list->add(mute, LLMute::flagVoiceChat); @@ -618,13 +618,13 @@ void LLInspectAvatar::onAvatarNameCache( { getChild("user_name")->setValue(av_name.mDisplayName); getChild("user_slid")->setValue(av_name.mUsername); - mLegacyName = av_name.getLegacyName(); + mAvatarName = av_name; } } void LLInspectAvatar::onClickAddFriend() { - LLAvatarActions::requestFriendshipDialog(mAvatarID, mLegacyName); + LLAvatarActions::requestFriendshipDialog(mAvatarID, mAvatarName.getLegacyName()); closeFloater(); } @@ -692,7 +692,7 @@ void LLInspectAvatar::onClickShare() void LLInspectAvatar::onToggleMute() { - LLMute mute(mAvatarID, mLegacyName, LLMute::AGENT); + LLMute mute(mAvatarID, mAvatarName.getLegacyName(), LLMute::AGENT); if (LLMuteList::getInstance()->isMuted(mute.mID, mute.mName)) { @@ -709,7 +709,7 @@ void LLInspectAvatar::onToggleMute() void LLInspectAvatar::onClickReport() { - LLFloaterReporter::showFromAvatar(mAvatarID, mLegacyName); + LLFloaterReporter::showFromAvatar(mAvatarID, mAvatarName.getNameAndSLID()); closeFloater(); } @@ -733,17 +733,17 @@ void LLInspectAvatar::onClickZoomIn() void LLInspectAvatar::onClickFindOnMap() { - gFloaterWorldMap->trackAvatar(mAvatarID, mLegacyName); + gFloaterWorldMap->trackAvatar(mAvatarID, mAvatarName.getLegacyName()); LLFloaterReg::showInstance("world_map"); } bool LLInspectAvatar::enableMute() { - bool is_linden = LLStringUtil::endsWith(mLegacyName, " Linden"); + bool is_linden = LLStringUtil::endsWith(mAvatarName.getLegacyName(), " Linden"); bool is_self = mAvatarID == gAgent.getID(); - if (!is_linden && !is_self && !LLMuteList::getInstance()->isMuted(mAvatarID, mLegacyName)) + if (!is_linden && !is_self && !LLMuteList::getInstance()->isMuted(mAvatarID, mAvatarName.getLegacyName())) { return true; } @@ -755,10 +755,10 @@ bool LLInspectAvatar::enableMute() bool LLInspectAvatar::enableUnmute() { - bool is_linden = LLStringUtil::endsWith(mLegacyName, " Linden"); + bool is_linden = LLStringUtil::endsWith(mAvatarName.getLegacyName(), " Linden"); bool is_self = mAvatarID == gAgent.getID(); - if (!is_linden && !is_self && LLMuteList::getInstance()->isMuted(mAvatarID, mLegacyName)) + if (!is_linden && !is_self && LLMuteList::getInstance()->isMuted(mAvatarID, mAvatarName.getLegacyName())) { return true; } -- cgit v1.2.3 From 26b601b99e43eac623c81a60e93094577b06d209 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 28 May 2010 15:45:23 -0700 Subject: Getting rid of some more old gCacheName calls --- indra/newview/llinspectavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llinspectavatar.cpp') diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index a9b9557027..1cd1dcc7f0 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -733,7 +733,7 @@ void LLInspectAvatar::onClickZoomIn() void LLInspectAvatar::onClickFindOnMap() { - gFloaterWorldMap->trackAvatar(mAvatarID, mAvatarName.getLegacyName()); + gFloaterWorldMap->trackAvatar(mAvatarID, mAvatarName.mDisplayName); LLFloaterReg::showInstance("world_map"); } -- cgit v1.2.3 From bc60707968bd8b2cd2941357a6ff653f6ed2d40e Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 13 Aug 2010 17:33:04 -0700 Subject: DEV-52163 Long display name with wide characters not fully visible in viewer aside from nametag --- indra/newview/llinspectavatar.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'indra/newview/llinspectavatar.cpp') diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 1cd1dcc7f0..77435ae214 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -58,6 +58,7 @@ #include "llfloater.h" #include "llfloaterreg.h" #include "llmenubutton.h" +#include "lltextbox.h" #include "lltooltip.h" // positionViewNearMouse() #include "lltrans.h" #include "lluictrl.h" @@ -333,6 +334,7 @@ void LLInspectAvatar::requestUpdate() // Clear out old data so it doesn't flash between old and new getChild("user_name")->setValue(""); + getChild("user_name_small")->setValue(""); getChild("user_slid")->setValue(""); getChild("user_subtitle")->setValue(""); getChild("user_details")->setValue(""); @@ -617,8 +619,23 @@ void LLInspectAvatar::onAvatarNameCache( if (agent_id == mAvatarID) { getChild("user_name")->setValue(av_name.mDisplayName); + getChild("user_name_small")->setValue(av_name.mDisplayName); getChild("user_slid")->setValue(av_name.mUsername); mAvatarName = av_name; + + // show smaller display name if too long to display in regular size + if (getChild("user_name")->getTextPixelWidth() > getChild("user_name")->getRect().getWidth()) + { + getChild("user_name_small")->setVisible( true ); + getChild("user_name")->setVisible( false ); + } + else + { + getChild("user_name_small")->setVisible( false ); + getChild("user_name")->setVisible( true ); + + } + } } -- cgit v1.2.3 From 54da19fdcfa3edadbc58a1f55a3503082e66f16e Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Fri, 22 Oct 2010 02:08:26 +0300 Subject: STORM-426 FIXED Menu button no longer looked pressed while its menu is displayed by another control. - LLMenuGL in menu button replaced by LLToggleableMenu that handles visibility change upon clicks inside specific button rect. - Added visibility change signal to LLToggleableMenu to update menu button pressed state. - Added using menu handle in LLMenuButton. --- indra/newview/llinspectavatar.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinspectavatar.cpp') diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 29dcb2c4d3..91ede6d221 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -53,6 +53,7 @@ #include "llfloaterreg.h" #include "llmenubutton.h" #include "lltextbox.h" +#include "lltoggleablemenu.h" #include "lltooltip.h" // positionViewNearMouse() #include "lltrans.h" #include "lluictrl.h" @@ -402,8 +403,8 @@ void LLInspectAvatar::processAvatarData(LLAvatarData* data) // if neither the gear menu or self gear menu are open void LLInspectAvatar::onMouseLeave(S32 x, S32 y, MASK mask) { - LLMenuGL* gear_menu = getChild("gear_btn")->getMenu(); - LLMenuGL* gear_menu_self = getChild("gear_self_btn")->getMenu(); + LLToggleableMenu* gear_menu = getChild("gear_btn")->getMenu(); + LLToggleableMenu* gear_menu_self = getChild("gear_self_btn")->getMenu(); if ( gear_menu && gear_menu->getVisible() && gear_menu_self && gear_menu_self->getVisible() ) { -- cgit v1.2.3