From 1b64453199cb8c31886b1debe6b5268d731f2298 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 10 Oct 2014 11:41:06 +0300 Subject: MAINT-4554 FIXED Show group name and open group profile for group-owned objects. --- indra/newview/llfloaterinspect.cpp | 53 ++++++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 11 deletions(-) (limited to 'indra/newview/llfloaterinspect.cpp') diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp index 5a1dfc99ab..568fc74c49 100755 --- a/indra/newview/llfloaterinspect.cpp +++ b/indra/newview/llfloaterinspect.cpp @@ -32,6 +32,7 @@ #include "llfloatertools.h" #include "llavataractions.h" #include "llavatarnamecache.h" +#include "llgroupactions.h" #include "llscrolllistctrl.h" #include "llscrolllistitem.h" #include "llselectmgr.h" @@ -147,8 +148,17 @@ void LLFloaterInspect::onClickOwnerProfile() LLSelectNode* node = mObjectSelection->getFirstNode(&func); if(node) { - const LLUUID& owner_id = node->mPermissions->getOwner(); - LLAvatarActions::showProfile(owner_id); + if(node->mPermissions->isGroupOwned()) + { + const LLUUID& idGroup = node->mPermissions->getGroup(); + LLGroupActions::show(idGroup); + } + else + { + const LLUUID& owner_id = node->mPermissions->getOwner(); + LLAvatarActions::showProfile(owner_id); + } + } } } @@ -219,21 +229,42 @@ void LLFloaterInspect::refresh() const LLUUID& idCreator = obj->mPermissions->getCreator(); LLAvatarName av_name; - // Only work with the names if we actually get a result - // from the name cache. If not, defer setting the - // actual name and set a placeholder. - if (LLAvatarNameCache::get(idOwner, &av_name)) + if(obj->mPermissions->isGroupOwned()) { - owner_name = av_name.getCompleteName(); + std::string group_name; + const LLUUID& idGroup = obj->mPermissions->getGroup(); + if(gCacheName->getGroupName(idGroup, group_name)) + { + owner_name = group_name; + } + else + { + owner_name = LLTrans::getString("RetrievingData"); + if (mOwnerNameCacheConnection.connected()) + { + mOwnerNameCacheConnection.disconnect(); + } + mOwnerNameCacheConnection = gCacheName->getGroup(idGroup, boost::bind(&LLFloaterInspect::onGetOwnerNameCallback, this)); + } } else { - owner_name = LLTrans::getString("RetrievingData"); - if (mOwnerNameCacheConnection.connected()) + // Only work with the names if we actually get a result + // from the name cache. If not, defer setting the + // actual name and set a placeholder. + if (LLAvatarNameCache::get(idOwner, &av_name)) + { + owner_name = av_name.getCompleteName(); + } + else { - mOwnerNameCacheConnection.disconnect(); + owner_name = LLTrans::getString("RetrievingData"); + if (mOwnerNameCacheConnection.connected()) + { + mOwnerNameCacheConnection.disconnect(); + } + mOwnerNameCacheConnection = LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::onGetOwnerNameCallback, this)); } - mOwnerNameCacheConnection = LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::onGetOwnerNameCallback, this)); } if (LLAvatarNameCache::get(idCreator, &av_name)) -- cgit v1.2.3 From cfddb46b00fc5b2ecce90af7561e4f5c058f366f Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 24 Oct 2014 13:38:52 +0300 Subject: MAINT-4554 FIXED Display owner as [groupname] (group) for group-owned object --- indra/newview/llfloaterinspect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloaterinspect.cpp') diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp index 568fc74c49..10088d20c2 100755 --- a/indra/newview/llfloaterinspect.cpp +++ b/indra/newview/llfloaterinspect.cpp @@ -235,7 +235,7 @@ void LLFloaterInspect::refresh() const LLUUID& idGroup = obj->mPermissions->getGroup(); if(gCacheName->getGroupName(idGroup, group_name)) { - owner_name = group_name; + owner_name = "[" + group_name + "] (group)"; } else { -- cgit v1.2.3