diff options
author | simon <none@none> | 2015-04-15 15:07:13 -0700 |
---|---|---|
committer | simon <none@none> | 2015-04-15 15:07:13 -0700 |
commit | a219cf1c98527faa0e7addeb9660f679208bb0e7 (patch) | |
tree | 78a14774f7ff79dd92c022caa2d9d68ec85fba85 /indra/newview/llfloaterinspect.cpp | |
parent | b5324afb6f2e45deefb9b79e7e2192bc686b181a (diff) | |
parent | a647b8f1cbab13f07ea889c80df28414bc906129 (diff) |
Merge viewer-release
Diffstat (limited to 'indra/newview/llfloaterinspect.cpp')
-rwxr-xr-x | indra/newview/llfloaterinspect.cpp | 53 |
1 files changed, 42 insertions, 11 deletions
diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp index 5a1dfc99ab..10088d20c2 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 + "] (group)"; + } + 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)) |