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.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/llfloaterregioninfo.cpp | 17 +++++++++------ indra/newview/llnamelistctrl.cpp | 40 +++++++++++++++++++++++++++++++++-- indra/newview/llnamelistctrl.h | 2 ++ 3 files changed, 50 insertions(+), 9 deletions(-) (limited to 'indra/newview/llnamelistctrl.cpp') diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 9f7fa82529..4f1c26d793 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -3835,16 +3835,19 @@ bool LLPanelEstateAccess::accessCoreConfirm(const LLSD& notification, const LLSD sendEstateAccessDelta(flags, id); - // fill the name list for confirmation - LLAvatarName av_name; - if (LLAvatarNameCache::get(id, &av_name)) + if ((flags & (ESTATE_ACCESS_ALLOWED_GROUP_ADD | ESTATE_ACCESS_ALLOWED_GROUP_REMOVE)) == 0) { - if (!names.empty()) + // fill the name list for confirmation + LLAvatarName av_name; + if (LLAvatarNameCache::get(id, &av_name)) { - names += ", "; - single = false; + if (!names.empty()) + { + names += ", "; + single = false; + } + names += av_name.getCompleteName(); } - names += av_name.getCompleteName(); } } LLPanelEstateAccess* panel = LLFloaterRegionInfo::getPanelAccess(); 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) { diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index 50b4d80302..ef0be135e6 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -173,6 +173,7 @@ public: private: void showInspector(const LLUUID& avatar_id, bool is_group, bool is_experience = false); void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name, std::string suffix, std::string prefix, LLHandle item); + void onGroupNameCache(const LLUUID& group_id, const std::string name, LLHandle item); private: S32 mNameColumnIndex; @@ -181,6 +182,7 @@ private: bool mShortNames; // display name only, no SLID typedef std::map avatar_name_cache_connection_map_t; avatar_name_cache_connection_map_t mAvatarNameCacheConnections; + avatar_name_cache_connection_map_t mGroupNameCacheConnections; S32 mPendingLookupsRemaining; namelist_complete_signal_t mNameListCompleteSignal; -- cgit v1.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.3