diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp index c4abc4ac7..01dd84dc1 100644 --- a/indra/newview/llfloaterinspect.cpp +++ b/indra/newview/llfloaterinspect.cpp @@ -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) diff --git a/indra/newview/llfloaterinspect.h b/indra/newview/llfloaterinspect.h index 643639692..3769cedf7 100644 --- a/indra/newview/llfloaterinspect.h +++ b/indra/newview/llfloaterinspect.h @@ -60,6 +60,7 @@ public: virtual void onFocusReceived(); void onClickCreatorProfile(); void onClickOwnerProfile(); + void onClickLastOwnerProfile(); void onSelectObject(); LLScrollListCtrl* mObjectList; diff --git a/indra/newview/skins/default/xui/en-us/floater_inspect.xml b/indra/newview/skins/default/xui/en-us/floater_inspect.xml index e10b2fe06..2e5adeb24 100644 --- a/indra/newview/skins/default/xui/en-us/floater_inspect.xml +++ b/indra/newview/skins/default/xui/en-us/floater_inspect.xml @@ -1,6 +1,6 @@ + tool_tip="See profile of the highlighted object's owner" width="152" > +