From 3a49beed0e96a797a6d663bcae5e932437ca3661 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 5 Dec 2012 20:25:46 -0800 Subject: CHUI-580 : WIP : Change the display name cache system, deprecating the old protocol and using the cap (People API) whenever available. Still has occurence of Resident as last name to clean up. --- indra/newview/llpanelgrouproles.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanelgrouproles.cpp') diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 5720168f81..7ad7e7149b 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1616,7 +1616,7 @@ void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemb } // trying to avoid unnecessary hash lookups - if (matchesSearchFilter(av_name.getLegacyName())) + if (matchesSearchFilter(av_name.getUserName())) { addMemberToList(id, member); if(!mMembersList->getEnabled()) @@ -1670,7 +1670,7 @@ void LLPanelGroupMembersSubTab::updateMembers() LLAvatarName av_name; if (LLAvatarNameCache::get(mMemberProgress->first, &av_name)) { - if (matchesSearchFilter(av_name.getLegacyName())) + if (matchesSearchFilter(av_name.getUserName())) { addMemberToList(mMemberProgress->first, mMemberProgress->second); } -- cgit v1.2.3 From 9b556fb3fea0a97f5773d8fd435a428b0fafacbf Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 14 Dec 2012 14:19:17 -0800 Subject: CHUI-599 : Use the account name in all places that are not UI related but use avatar names to index, search and other code only uses. --- indra/newview/llpanelgrouproles.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanelgrouproles.cpp') diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 7368477905..98e4cded6c 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1613,7 +1613,7 @@ void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemb } // trying to avoid unnecessary hash lookups - if (matchesSearchFilter(av_name.getUserName())) + if (matchesSearchFilter(av_name.getAccountName())) { addMemberToList(member); if(!mMembersList->getEnabled()) @@ -1667,7 +1667,7 @@ void LLPanelGroupMembersSubTab::updateMembers() LLAvatarName av_name; if (LLAvatarNameCache::get(mMemberProgress->first, &av_name)) { - if (matchesSearchFilter(av_name.getUserName())) + if (matchesSearchFilter(av_name.getAccountName())) { addMemberToList(mMemberProgress->second); } -- cgit v1.2.3 From 6fe7144104cd8b5bd9c7d215f76afdeafe13b7ee Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 17 Dec 2012 18:59:01 -0800 Subject: CHUI-580 : WIP : Protect callback connections passed to LLAvatarNameCache::get() where necessary --- indra/newview/llpanelgrouproles.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'indra/newview/llpanelgrouproles.cpp') diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 7ad7e7149b..e6b85386dd 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -743,13 +743,18 @@ LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab() mChanged(FALSE), mPendingMemberUpdate(FALSE), mHasMatch(FALSE), - mNumOwnerAdditions(0) + mNumOwnerAdditions(0), + mAvatarNameCacheConnection() { mUdpateSessionID = LLUUID::null; } LLPanelGroupMembersSubTab::~LLPanelGroupMembersSubTab() { + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } if (mMembersList) { gSavedSettings.setString("GroupMembersSortOrder", mMembersList->getSortColumnName()); @@ -1678,8 +1683,12 @@ void LLPanelGroupMembersSubTab::updateMembers() else { // If name is not cached, onNameCache() should be called when it is cached and add this member to list. - LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupMembersSubTab::onNameCache, - this, mUdpateSessionID, mMemberProgress->second, _1, _2)); + // *TODO : Add one callback per fetched avatar name + if (mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection.disconnect(); + } + mAvatarNameCacheConnection = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupMembersSubTab::onNameCache, this, mUdpateSessionID, mMemberProgress->second, _1, _2)); } } -- cgit v1.2.3 From c2d332a89cb29d54df40f1f120304d871278fb76 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 17 Dec 2012 20:16:33 -0800 Subject: CHUI-580 : WIP : Added disconnect of callbacks once they're called to prevent filling up the callback queue --- indra/newview/llpanelgrouproles.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llpanelgrouproles.cpp') diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 907b02993a..cfdac11d26 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1609,6 +1609,8 @@ void LLPanelGroupMembersSubTab::addMemberToList(LLGroupMemberData* data) void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name) { + mAvatarNameCacheConnection.disconnect(); + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (!gdatap || gdatap->getMemberVersion() != update_id -- cgit v1.2.3