User request: Add last owner profile button to object inspect.
This commit is contained in:
@@ -58,6 +58,7 @@ LLFloaterInspect::LLFloaterInspect(const LLSD&)
|
||||
mDirty(FALSE)
|
||||
{
|
||||
mCommitCallbackRegistrar.add("Inspect.OwnerProfile", boost::bind(&LLFloaterInspect::onClickOwnerProfile, this));
|
||||
mCommitCallbackRegistrar.add("Inspect.LastOwnerProfile", boost::bind(&LLFloaterInspect::onClickLastOwnerProfile, this));
|
||||
mCommitCallbackRegistrar.add("Inspect.CreatorProfile", boost::bind(&LLFloaterInspect::onClickCreatorProfile, this));
|
||||
mCommitCallbackRegistrar.add("Inspect.SelectObject", boost::bind(&LLFloaterInspect::onSelectObject, this));
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_inspect.xml");
|
||||
@@ -166,6 +167,36 @@ void LLFloaterInspect::onClickOwnerProfile()
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onClickLastOwnerProfile()
|
||||
{
|
||||
if(mObjectList->getAllSelected().size() == 0) return;
|
||||
LLScrollListItem* first_selected =mObjectList->getFirstSelected();
|
||||
|
||||
if (first_selected)
|
||||
{
|
||||
LLUUID selected_id = first_selected->getUUID();
|
||||
struct f : public LLSelectedNodeFunctor
|
||||
{
|
||||
LLUUID obj_id;
|
||||
f(const LLUUID& id) : obj_id(id) {}
|
||||
virtual bool apply(LLSelectNode* node)
|
||||
{
|
||||
return (obj_id == node->getObject()->getID());
|
||||
}
|
||||
} func(selected_id);
|
||||
LLSelectNode* node = mObjectSelection->getFirstNode(&func);
|
||||
if(node)
|
||||
{
|
||||
const LLUUID& last_owner_id = node->mPermissions->getLastOwner();
|
||||
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Modified: RLVa-1.0.0e
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS))
|
||||
if (last_owner_id == node->mPermissions->getOwner()) return;
|
||||
// [/RLVa:KB]
|
||||
LLAvatarActions::showProfile(last_owner_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onSelectObject()
|
||||
{
|
||||
if(LLFloaterInspect::getSelectedUUID() != LLUUID::null)
|
||||
|
||||
@@ -60,6 +60,7 @@ public:
|
||||
virtual void onFocusReceived();
|
||||
void onClickCreatorProfile();
|
||||
void onClickOwnerProfile();
|
||||
void onClickLastOwnerProfile();
|
||||
void onSelectObject();
|
||||
|
||||
LLScrollListCtrl* mObjectList;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true"
|
||||
min_height="300" min_width="400" name="inspect"
|
||||
min_height="300" min_width="480" name="inspect"
|
||||
rect_control="FloaterInspectRect" title="Inspect Objects">
|
||||
<scroll_list bottom="30" can_resize="false" column_padding="0" draw_heading="true"
|
||||
follows="top|right|left|bottom" left="10" multi_select="false"
|
||||
@@ -22,12 +22,19 @@
|
||||
<button bottom="5" follows="left|bottom" font="SansSerif" halign="center" height="20"
|
||||
label="See Owner Profile..." label_selected="" left="10"
|
||||
mouse_opaque="true" name="button owner"
|
||||
tool_tip="See profile of the highlighted object's owner" width="150" >
|
||||
tool_tip="See profile of the highlighted object's owner" width="152" >
|
||||
<button.commit_callback
|
||||
function="Inspect.OwnerProfile" />
|
||||
</button>
|
||||
<button bottom="5" follows="left|bottom" font="SansSerif" halign="center" height="20"
|
||||
label="See Creator Profile..." label_selected="" left="170"
|
||||
label="See Last Owner Profile..." label_selected="" left_delta="154"
|
||||
mouse_opaque="true" name="button last owner"
|
||||
tool_tip="See profile of the highlighted object's last owner" width="152" >
|
||||
<button.commit_callback
|
||||
function="Inspect.LastOwnerProfile" />
|
||||
</button>
|
||||
<button bottom="5" follows="left|bottom" font="SansSerif" halign="center" height="20"
|
||||
label="See Creator Profile..." label_selected="" left_delta="154"
|
||||
mouse_opaque="true" name="button creator"
|
||||
tool_tip="See profile of the highlighted object's original creator"
|
||||
width="150" >
|
||||
|
||||
Reference in New Issue
Block a user