summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdoc/contributions.txt1
-rwxr-xr-xindra/newview/llpanelgroupgeneral.cpp35
-rwxr-xr-xindra/newview/llpanelgroupgeneral.h5
-rwxr-xr-xindra/newview/llpanelgrouproles.cpp35
-rwxr-xr-xindra/newview/llpanelgrouproles.h5
5 files changed, 24 insertions, 57 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt
index 16cb5c526c..f4e5ad6edb 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -180,7 +180,6 @@ Ansariel Hiller
MAINT-2368
STORM-1931
MAINT-2773
- STORM-2011
MAINT-3187
BUG-3764
STORM-1984
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index 6ba7d4f39d..0cd93b330a 100755
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -79,21 +79,18 @@ LLPanelGroupGeneral::LLPanelGroupGeneral()
mCtrlReceiveNotices(NULL),
mCtrlListGroup(NULL),
mActiveTitleLabel(NULL),
- mComboActiveTitle(NULL)
+ mComboActiveTitle(NULL),
+ mAvatarNameCacheConnection()
{
}
LLPanelGroupGeneral::~LLPanelGroupGeneral()
{
- for (avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.begin(); it != mAvatarNameCacheConnections.end(); ++it)
+ if (mAvatarNameCacheConnection.connected())
{
- if (it->second.connected())
- {
- it->second.disconnect();
- }
+ mAvatarNameCacheConnection.disconnect();
}
- mAvatarNameCacheConnections.clear();
}
BOOL LLPanelGroupGeneral::postBuild()
@@ -735,16 +732,12 @@ void LLPanelGroupGeneral::updateMembers()
else
{
// If name is not cached, onNameCache() should be called when it is cached and add this member to list.
- avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(mMemberProgress->first);
- if (it != mAvatarNameCacheConnections.end())
+ // *TODO : Use a callback per member, not for the panel group.
+ if (mAvatarNameCacheConnection.connected())
{
- if (it->second.connected())
- {
- it->second.disconnect();
- }
- mAvatarNameCacheConnections.erase(it);
+ mAvatarNameCacheConnection.disconnect();
}
- mAvatarNameCacheConnections[mMemberProgress->first] = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupGeneral::onNameCache, this, gdatap->getMemberVersion(), member, _2, _1));
+ mAvatarNameCacheConnection = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupGeneral::onNameCache, this, gdatap->getMemberVersion(), member, _2));
}
}
@@ -782,17 +775,9 @@ void LLPanelGroupGeneral::addMember(LLGroupMemberData* member)
}
}
-void LLPanelGroupGeneral::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name, const LLUUID& av_id)
+void LLPanelGroupGeneral::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name)
{
- avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(av_id);
- if (it != mAvatarNameCacheConnections.end())
- {
- if (it->second.connected())
- {
- it->second.disconnect();
- }
- mAvatarNameCacheConnections.erase(it);
- }
+ mAvatarNameCacheConnection.disconnect();
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h
index a019715bfa..b7f4a01139 100755
--- a/indra/newview/llpanelgroupgeneral.h
+++ b/indra/newview/llpanelgroupgeneral.h
@@ -63,7 +63,7 @@ public:
virtual void setupCtrls (LLPanel* parent);
- void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name, const LLUUID& av_id);
+ void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name);
private:
void reset();
@@ -111,8 +111,7 @@ private:
LLComboBox *mComboMature;
LLGroupMgrGroupData::member_list_t::iterator mMemberProgress;
- typedef std::map<LLUUID, boost::signals2::connection> avatar_name_cache_connection_map_t;
- avatar_name_cache_connection_map_t mAvatarNameCacheConnections;
+ boost::signals2::connection mAvatarNameCacheConnection;
};
#endif
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 94998f3c52..fdcd1f5ebb 100755
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -743,20 +743,17 @@ LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab()
mChanged(FALSE),
mPendingMemberUpdate(FALSE),
mHasMatch(FALSE),
- mNumOwnerAdditions(0)
+ mNumOwnerAdditions(0),
+ mAvatarNameCacheConnection()
{
}
LLPanelGroupMembersSubTab::~LLPanelGroupMembersSubTab()
{
- for (avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.begin(); it != mAvatarNameCacheConnections.end(); ++it)
+ if (mAvatarNameCacheConnection.connected())
{
- if (it->second.connected())
- {
- it->second.disconnect();
- }
+ mAvatarNameCacheConnection.disconnect();
}
- mAvatarNameCacheConnections.clear();
if (mMembersList)
{
gSavedSettings.setString("GroupMembersSortOrder", mMembersList->getSortColumnName());
@@ -1644,17 +1641,9 @@ void LLPanelGroupMembersSubTab::addMemberToList(LLGroupMemberData* data)
mHasMatch = TRUE;
}
-void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name, const LLUUID& av_id)
+void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name)
{
- avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(av_id);
- if (it != mAvatarNameCacheConnections.end())
- {
- if (it->second.connected())
- {
- it->second.disconnect();
- }
- mAvatarNameCacheConnections.erase(it);
- }
+ mAvatarNameCacheConnection.disconnect();
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
if (!gdatap
@@ -1727,16 +1716,12 @@ void LLPanelGroupMembersSubTab::updateMembers()
else
{
// If name is not cached, onNameCache() should be called when it is cached and add this member to list.
- avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(mMemberProgress->first);
- if (it != mAvatarNameCacheConnections.end())
+ // *TODO : Add one callback per fetched avatar name
+ if (mAvatarNameCacheConnection.connected())
{
- if (it->second.connected())
- {
- it->second.disconnect();
- }
- mAvatarNameCacheConnections.erase(it);
+ mAvatarNameCacheConnection.disconnect();
}
- mAvatarNameCacheConnections[mMemberProgress->first] = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupMembersSubTab::onNameCache, this, gdatap->getMemberVersion(), mMemberProgress->second, _2, _1));
+ mAvatarNameCacheConnection = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupMembersSubTab::onNameCache, this, gdatap->getMemberVersion(), mMemberProgress->second, _2));
}
}
diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h
index baa2d40c7e..0cf272f3ee 100755
--- a/indra/newview/llpanelgrouproles.h
+++ b/indra/newview/llpanelgrouproles.h
@@ -189,7 +189,7 @@ public:
virtual void setGroupID(const LLUUID& id);
void addMemberToList(LLGroupMemberData* data);
- void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name, const LLUUID& av_id);
+ void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name);
protected:
typedef std::map<LLUUID, LLRoleMemberChangeType> role_change_data_map_t;
@@ -215,8 +215,7 @@ protected:
U32 mNumOwnerAdditions;
LLGroupMgrGroupData::member_list_t::iterator mMemberProgress;
- typedef std::map<LLUUID, boost::signals2::connection> avatar_name_cache_connection_map_t;
- avatar_name_cache_connection_map_t mAvatarNameCacheConnections;
+ boost::signals2::connection mAvatarNameCacheConnection;
};
class LLPanelGroupRolesSubTab : public LLPanelGroupSubTab