summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterinspect.cpp
diff options
context:
space:
mode:
authorcallum_linden <none@none>2015-05-18 12:00:36 -0700
committercallum_linden <none@none>2015-05-18 12:00:36 -0700
commit80aa29eaec78d267b4fa1822cfbd3a33b268066a (patch)
tree1ce0483bd490750e367bfe53a19ec312cdc0bd27 /indra/newview/llfloaterinspect.cpp
parentd214c2854110520d5574f675bcc12f64bfd42090 (diff)
parentfde0868231a25b8c9ce03a86cb53f1738d35688d (diff)
Merge with Viewer Release (after Viewer Release updated with Viewer Tools Update)
Diffstat (limited to 'indra/newview/llfloaterinspect.cpp')
-rwxr-xr-xindra/newview/llfloaterinspect.cpp53
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))