From 8c1d51caf31c7d34c0c6c347576eed141577de2f Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Mon, 23 Apr 2018 20:54:08 +0300 Subject: MAINT-8441 Generate Confirmation message when adding a person to a estate list --- indra/newview/llnamelistctrl.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'indra/newview/llnamelistctrl.cpp') diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index fe75ab8e50..949f70d8dc 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -415,6 +415,20 @@ void LLNameListCtrl::removeNameItem(const LLUUID& agent_id) } } +// public +LLScrollListItem* LLNameListCtrl::getNameItemByAgentId(const LLUUID& agent_id) +{ + for (item_list::iterator it = getItemList().begin(); it != getItemList().end(); it++) + { + LLScrollListItem* item = *it; + if (item && item->getUUID() == agent_id) + { + return item; + } + } + return NULL; +} + void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name, std::string suffix, -- cgit v1.2.3 From a1466bcdaf8f085b62855ee05d943b20a9c7dfc8 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 5 Jul 2018 18:00:00 +0300 Subject: MAINT-8587 FIXED "(waiting)" instead of a group name in the Allowed Groups list. --- indra/newview/llnamelistctrl.cpp | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) (limited to 'indra/newview/llnamelistctrl.cpp') diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 949f70d8dc..60b4c62e8f 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -313,8 +313,19 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow( switch(name_item.target) { case GROUP: - gCacheName->getGroupName(id, fullname); - // fullname will be "nobody" if group not found + if (!gCacheName->getGroupName(id, fullname)) + { + avatar_name_cache_connection_map_t::iterator it = mGroupNameCacheConnections.find(id); + if (it != mGroupNameCacheConnections.end()) + { + if (it->second.connected()) + { + it->second.disconnect(); + } + mGroupNameCacheConnections.erase(it); + } + mGroupNameCacheConnections[id] = gCacheName->getGroup(id, boost::bind(&LLNameListCtrl::onGroupNameCache, this, _1, _2, item->getHandle())); + } break; case SPECIAL: // just use supplied name @@ -493,6 +504,31 @@ void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id, dirtyColumns(); } +void LLNameListCtrl::onGroupNameCache(const LLUUID& group_id, const std::string name, LLHandle item) +{ + avatar_name_cache_connection_map_t::iterator it = mGroupNameCacheConnections.find(group_id); + if (it != mGroupNameCacheConnections.end()) + { + if (it->second.connected()) + { + it->second.disconnect(); + } + mGroupNameCacheConnections.erase(it); + } + + LLNameListItem* list_item = item.get(); + if (list_item && list_item->getUUID() == group_id) + { + LLScrollListCell* cell = list_item->getColumn(mNameColumnIndex); + if (cell) + { + cell->setValue(name); + setNeedsSort(); + } + } + + dirtyColumns(); +} void LLNameListCtrl::updateColumns(bool force_update) { -- cgit v1.2.3 From fd83e889642518803b0041761a3d4bf81df21e3e Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 14 Sep 2018 09:12:47 +0300 Subject: SL-1288 show the "Mini-Inspector" of LLNameListCtrl only on a frontmost floaters --- indra/newview/llnamelistctrl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llnamelistctrl.cpp') diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 60b4c62e8f..62e0e2d077 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -32,6 +32,7 @@ #include "llavatarnamecache.h" #include "llcachename.h" +#include "llfloater.h" #include "llfloaterreg.h" #include "llinventory.h" #include "llscrolllistitem.h" @@ -212,7 +213,10 @@ BOOL LLNameListCtrl::handleToolTip(S32 x, S32 y, MASK mask) BOOL handled = FALSE; S32 column_index = getColumnIndexFromOffset(x); LLNameListItem* hit_item = dynamic_cast(hitItem(x, y)); - if (hit_item + LLFloater* floater = gFloaterView->getParentFloater(this); + if (floater + && floater->isFrontmost() + && hit_item && column_index == mNameColumnIndex) { // ...this is the column with the avatar name -- cgit v1.2.3