diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index 5fcdc8bbf..46b67d1de 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -172,6 +172,8 @@ BOOL LLFloaterProperties::postBuild() getChild("BtnCreator")->setCommitCallback(boost::bind(&LLFloaterProperties::onClickCreator,this)); // owner information getChild("BtnOwner")->setCommitCallback(boost::bind(&LLFloaterProperties::onClickOwner,this)); + // last owner information + getChild("BtnLastOwner")->setCommitCallback(boost::bind(&LLFloaterProperties::onClickLastOwner,this)); // acquired date // owner permissions // Permissions debug text @@ -227,6 +229,8 @@ void LLFloaterProperties::refresh() "BtnCreator", "LabelOwnerName", "BtnOwner", + "LabelLastOwnerName", + "BtnLastOwner", "CheckOwnerModify", "CheckOwnerCopy", "CheckOwnerTransfer", @@ -341,6 +345,21 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) getChild("LabelCreatorName")->setValue(getString("unknown")); } + if (perm.getLastOwner().notNull()) + { + std::string name; + gCacheName->getFullName(perm.getLastOwner(), name); + getChildView("LabelLastOwnerTitle")->setEnabled(true); + getChildView("LabelLastOwnerName")->setEnabled(true); + getChild("LabelLastOwnerName")->setValue(name); + } + else + { + getChildView("LabelLastOwnerTitle")->setEnabled(false); + getChildView("LabelLastOwnerName")->setEnabled(false); + getChild("LabelLastOwnerName")->setValue(getString("unknown")); + } + //////////////// // OWNER NAME // //////////////// @@ -617,6 +636,11 @@ void LLFloaterProperties::onClickOwner() } } +void LLFloaterProperties::onClickLastOwner() +{ + if (const LLInventoryItem* item = findItem()) LLAvatarActions::showProfile(item->getPermissions().getLastOwner()); +} + // static void LLFloaterProperties::onCommitName() { diff --git a/indra/newview/llfloaterproperties.h b/indra/newview/llfloaterproperties.h index 69c5eead2..d2640f07d 100644 --- a/indra/newview/llfloaterproperties.h +++ b/indra/newview/llfloaterproperties.h @@ -76,6 +76,7 @@ protected: // ui callbacks void onClickCreator(); void onClickOwner(); + void onClickLastOwner(); void onCommitName(); void onCommitDescription(); void onCommitPermissions(); diff --git a/indra/newview/skins/default/xui/en-us/floater_avatar_picker.xml b/indra/newview/skins/default/xui/en-us/floater_avatar_picker.xml index b18d5e3cf..5a8c8c44b 100644 --- a/indra/newview/skins/default/xui/en-us/floater_avatar_picker.xml +++ b/indra/newview/skins/default/xui/en-us/floater_avatar_picker.xml @@ -63,7 +63,10 @@ Name: - Description: - Creator: Nicole Linden -