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/llavatarlistitem.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'indra/newview/llavatarlistitem.cpp') diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 66ab32f3e8..6024dd8a21 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -193,7 +193,7 @@ void LLAvatarListItem::setAvatarId(const LLUUID& id, bool ignore_status_changes) LLAvatarTracker::instance().addParticularFriendObserver(mAvatarId, this); // Set avatar name. - gCacheName->get(id, FALSE, boost::bind(&LLAvatarListItem::onNameCache, this, _2, _3)); + gCacheName->get(id, false, boost::bind(&LLAvatarListItem::onNameCache, this, _2)); } void LLAvatarListItem::showLastInteractionTime(bool show) @@ -298,10 +298,9 @@ void LLAvatarListItem::setNameInternal(const std::string& name, const std::strin mAvatarName->setToolTip(name); } -void LLAvatarListItem::onNameCache(const std::string& first_name, const std::string& last_name) +void LLAvatarListItem::onNameCache(const std::string& fullname) { - std::string name = first_name + " " + last_name; - setName(name); + setName(fullname); } // Convert given number of seconds to a string like "23 minutes", "15 hours" or "3 years", -- cgit v1.2.3 From 2af4875309450fa3d3e266426ada12330489a8c9 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 13 May 2010 17:26:06 -0700 Subject: DEV-50013 Friends in sidebar now correctly displaying names reviewed by James --- indra/newview/llavatarlistitem.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview/llavatarlistitem.cpp') diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index fc5453c2dd..fcfc05af02 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -38,6 +38,7 @@ #include "llfloaterreg.h" #include "llagent.h" +#include "llavatarnamecache.h" #include "lloutputmonitorctrl.h" #include "llavatariconctrl.h" #include "lltextutil.h" @@ -229,7 +230,8 @@ void LLAvatarListItem::setAvatarId(const LLUUID& id, const LLUUID& session_id, b mAvatarIcon->setValue(id); // Set avatar name. - gCacheName->get(id, FALSE, boost::bind(&LLAvatarListItem::onNameCache, this, _2)); + LLAvatarNameCache::get(id, + boost::bind(&LLAvatarListItem::onAvatarNameCache, this, _2)); } } @@ -335,9 +337,9 @@ void LLAvatarListItem::setNameInternal(const std::string& name, const std::strin mAvatarName->setToolTip(name); } -void LLAvatarListItem::onNameCache(const std::string& fullname) +void LLAvatarListItem::onAvatarNameCache(const LLAvatarName& av_name) { - setName(fullname); + setName(av_name.mDisplayName); //requesting the list to resort notifyParent(LLSD().with("sort", LLSD())); -- 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/llavatarlistitem.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llavatarlistitem.cpp') diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index fcfc05af02..c458930a62 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -170,6 +170,7 @@ void LLAvatarListItem::setOnline(bool online) void LLAvatarListItem::setName(const std::string& name) { setNameInternal(name, mHighlihtSubstring); + mAvatarName->setToolTip(name); } void LLAvatarListItem::setHighlight(const std::string& highlight) @@ -334,12 +335,12 @@ const std::string LLAvatarListItem::getAvatarName() const void LLAvatarListItem::setNameInternal(const std::string& name, const std::string& highlight) { LLTextUtil::textboxSetHighlightedVal(mAvatarName, mAvatarNameStyle, name, highlight); - mAvatarName->setToolTip(name); } void LLAvatarListItem::onAvatarNameCache(const LLAvatarName& av_name) { setName(av_name.mDisplayName); + mAvatarName->setToolTip(av_name.mSLID); //requesting the list to resort notifyParent(LLSD().with("sort", LLSD())); -- 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/llavatarlistitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llavatarlistitem.cpp') diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index c458930a62..a59ad306d7 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -340,7 +340,7 @@ void LLAvatarListItem::setNameInternal(const std::string& name, const std::strin void LLAvatarListItem::onAvatarNameCache(const LLAvatarName& av_name) { setName(av_name.mDisplayName); - mAvatarName->setToolTip(av_name.mSLID); + mAvatarName->setToolTip(av_name.mUsername); //requesting the list to resort notifyParent(LLSD().with("sort", LLSD())); -- cgit v1.2.3 From b2274765dade87417f5b526c8b72f353ba6f4898 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 25 May 2010 14:48:55 -0700 Subject: DEV-50013 Group chat moderator tooltip shows username --- indra/newview/llavatarlistitem.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'indra/newview/llavatarlistitem.cpp') diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 4e018c5784..0fc8460c12 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -168,10 +168,14 @@ void LLAvatarListItem::setOnline(bool online) setState(online ? IS_ONLINE : IS_OFFLINE); } -void LLAvatarListItem::setName(const std::string& name) +void LLAvatarListItem::setAvatarName(const std::string& name) { setNameInternal(name, mHighlihtSubstring); - mAvatarName->setToolTip(name); +} + +void LLAvatarListItem::setAvatarToolTip(const std::string& tooltip) +{ + mAvatarName->setToolTip(tooltip); } void LLAvatarListItem::setHighlight(const std::string& highlight) @@ -326,11 +330,16 @@ const LLUUID& LLAvatarListItem::getAvatarId() const return mAvatarId; } -const std::string LLAvatarListItem::getAvatarName() const +std::string LLAvatarListItem::getAvatarName() const { return mAvatarName->getValue(); } +std::string LLAvatarListItem::getAvatarToolTip() const +{ + return mAvatarName->getToolTip(); +} + //== PRIVATE SECITON ========================================================== void LLAvatarListItem::setNameInternal(const std::string& name, const std::string& highlight) @@ -340,8 +349,8 @@ void LLAvatarListItem::setNameInternal(const std::string& name, const std::strin void LLAvatarListItem::onAvatarNameCache(const LLAvatarName& av_name) { - setName(av_name.mDisplayName); - mAvatarName->setToolTip(av_name.mUsername); + setAvatarName(av_name.mDisplayName); + setAvatarToolTip(av_name.mUsername); //requesting the list to resort notifyParent(LLSD().with("sort", LLSD())); -- cgit v1.2.3