IRC Feature Request: Show Last Owner in item properties

Translators should add these new bits (floater_inventory_item_properties.xml_
(also tossed in xml change I should've staged in 4da47de90c)
This commit is contained in:
Lirusaito
2013-07-13 17:40:19 -04:00
parent 4ef32a3805
commit 02253563ce
4 changed files with 69 additions and 26 deletions

View File

@@ -172,6 +172,8 @@ BOOL LLFloaterProperties::postBuild()
getChild<LLUICtrl>("BtnCreator")->setCommitCallback(boost::bind(&LLFloaterProperties::onClickCreator,this));
// owner information
getChild<LLUICtrl>("BtnOwner")->setCommitCallback(boost::bind(&LLFloaterProperties::onClickOwner,this));
// last owner information
getChild<LLUICtrl>("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<LLUICtrl>("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<LLUICtrl>("LabelLastOwnerName")->setValue(name);
}
else
{
getChildView("LabelLastOwnerTitle")->setEnabled(false);
getChildView("LabelLastOwnerName")->setEnabled(false);
getChild<LLUICtrl>("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()
{

View File

@@ -76,6 +76,7 @@ protected:
// ui callbacks
void onClickCreator();
void onClickOwner();
void onClickLastOwner();
void onCommitName();
void onCommitDescription();
void onCommitPermissions();

View File

@@ -63,7 +63,10 @@
</text>
<button bottom_delta="-3" left_delta="25" width="90" height="20" follows="top|right"
label="Refresh List" label_selected="Refresh List" halign="center"
font="SansSerif" mouse_opaque="true" name="RefreshFriends" scale_image="TRUE" />
font="SansSerif" mouse_opaque="true" name="RefreshFriends" scale_image="TRUE">
<button.commit_callback
function="Refresh.FriendList"/>
</button>
<scroll_list background_visible="true" bottom_delta="-115" column_padding="5"
draw_border="true" draw_heading="false" draw_stripes="true"
follows="left|top|right|bottom" height="110" left="10" mouse_opaque="true"

View File

@@ -1,74 +1,89 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater can_close="true" can_drag_on_left="false" can_minimize="true"
can_resize="false" height="320" min_height="100" min_width="100"
can_resize="false" height="340" min_height="100" min_width="100"
name="item properties" rect_control="PropertiesRect"
title="Inventory Item Properties" width="350">
<icon bottom="-21" follows="top|right" height="16" image_name="icon_lock.tga"
left="294" mouse_opaque="true" name="IconLocked" width="16" />
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-35" drop_shadow_visible="true" follows="left|top"
bottom_delta="-14" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
mouse_opaque="true" name="LabelItemNameTitle" v_pad="0" width="78">
Name:
</text>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-41"
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-6"
enabled="true" follows="left|top|right" font="SansSerifSmall" height="16"
is_unicode="false" left="88" max_length="63" mouse_opaque="true"
name="LabelItemName" width="252" />
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-55" drop_shadow_visible="true" follows="left|top"
bottom_delta="-14" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
mouse_opaque="true" name="LabelItemDescTitle" v_pad="0" width="78">
Description:
</text>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-61"
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-6"
enabled="true" follows="left|top|right" font="SansSerifSmall" height="16"
is_unicode="false" left="88" max_length="127" mouse_opaque="true"
name="LabelItemDesc" width="252" spell_check="true" />
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-81" drop_shadow_visible="true" follows="left|top"
bottom_delta="-20" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
mouse_opaque="true" name="LabelCreatorTitle" v_pad="0" width="78">
Creator:
</text>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-81" drop_shadow_visible="true" follows="left|top"
bottom_delta="0" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="78"
mouse_opaque="true" name="LabelCreatorName" v_pad="0" width="200">
Nicole Linden
</text>
<button bottom="-81" follows="top|right" font="SansSerifSmall" halign="center"
<button bottom_delta="0" follows="top|right" font="SansSerifSmall" halign="center"
height="16" label="Profile..." label_selected="" left_delta="174"
mouse_opaque="true" name="BtnCreator" width="78" />
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-101" drop_shadow_visible="true" follows="left|top"
bottom_delta="-20" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
mouse_opaque="true" name="LabelOwnerTitle" v_pad="0" width="78">
Owner:
</text>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-101" drop_shadow_visible="true" follows="left|top"
bottom_delta="0" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="78"
mouse_opaque="true" name="LabelOwnerName" v_pad="0" width="200">
Thrax Linden
</text>
<button bottom="-101" follows="top|right" font="SansSerifSmall" halign="center"
<button bottom_delta="0" follows="top|right" font="SansSerifSmall" halign="center"
height="16" label="Profile..." label_selected="" left_delta="174"
mouse_opaque="true" name="BtnOwner" width="78" />
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-121" drop_shadow_visible="true" follows="left|top"
bottom_delta="-20" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
mouse_opaque="true" name="LabelLastOwnerTitle" v_pad="0" width="78">
Last Owner:
</text>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom_delta="0" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="78"
mouse_opaque="true" name="LabelLastOwnerName" v_pad="0" width="200">
OnceUponA Linden
</text>
<button bottom_delta="0" follows="top|right" font="SansSerifSmall" halign="center"
height="16" label="Profile..." label_selected="" left_delta="174"
mouse_opaque="true" name="BtnOwner" width="78" />
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom_delta="-16" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
mouse_opaque="true" name="LabelAcquiredTitle" v_pad="0" width="78">
Acquired:
</text>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-121" drop_shadow_visible="true" follows="left|top"
bottom_delta="0" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="78"
mouse_opaque="true" name="LabelAcquiredDate" v_pad="0" width="252">
Wed May 24 12:50:46 2006
</text>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-135" drop_shadow_visible="true" follows="left|top"
bottom_delta="-10" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
mouse_opaque="true" name="OwnerLabel" v_pad="0" width="78">
You can:
@@ -76,40 +91,40 @@
<check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16"
initial_value="false" label="Modify" left="10" mouse_opaque="true"
name="CheckOwnerModify" radio_style="false" width="78" />
<check_box bottom="-155" follows="left|top" font="SansSerifSmall" height="16"
<check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16"
initial_value="false" label="Copy" left_delta="78" mouse_opaque="true"
name="CheckOwnerCopy" radio_style="false" width="88" />
<check_box bottom="-155" follows="left|top" font="SansSerifSmall" height="16"
<check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16"
initial_value="false" label="Transfer" left_delta="88"
mouse_opaque="true" name="CheckOwnerTransfer" radio_style="false"
width="106" />
<check_box name="CheckOwnerExport" label="Export" bottom_delta="0" follows="left|top" left_delta="88" enabled="false"/>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-165" drop_shadow_visible="true" follows="left|top"
bottom_delta="-10" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
mouse_opaque="true" name="BaseMaskDebug" v_pad="0" width="330">
B:
</text>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-165" drop_shadow_visible="true" follows="left|top"
bottom_delta="0" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="60"
mouse_opaque="true" name="OwnerMaskDebug" v_pad="0" width="270">
O:
</text>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-165" drop_shadow_visible="true" follows="left|top"
bottom_delta="0" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="60"
mouse_opaque="true" name="GroupMaskDebug" v_pad="0" width="210">
G:
</text>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-165" drop_shadow_visible="true" follows="left|top"
bottom_delta="0" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="60"
mouse_opaque="true" name="EveryoneMaskDebug" v_pad="0" width="150">
E:
</text>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-165" drop_shadow_visible="true" follows="left|top"
bottom_delta="0" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="60"
mouse_opaque="true" name="NextMaskDebug" v_pad="0" width="90">
N:
@@ -159,7 +174,7 @@
mouse_opaque="true" name="CheckNextOwnerTransfer" radio_style="false"
width="106" />
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-275" drop_shadow_visible="true" follows="left|top"
bottom_delta="-20" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
mouse_opaque="true" name="SaleLabel" v_pad="0" width="330">
Mark Item:
@@ -167,7 +182,7 @@
<check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16"
initial_value="false" label="For Sale" left="10" mouse_opaque="true"
name="CheckPurchase" radio_style="false" width="78" />
<radio_group bottom="-295" draw_border="false" follows="left|top|right" height="16"
<radio_group bottom_delta="0" draw_border="false" follows="left|top|right" height="16"
left_delta="78" mouse_opaque="true" name="RadioSaleType" width="252">
<radio_item bottom="-16" follows="left|top" height="16" left="0" mouse_opaque="true"
name="radio" width="70">
@@ -179,12 +194,12 @@
</radio_item>
</radio_group>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-315" drop_shadow_visible="true" follows="left|top"
bottom_delta="-20" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="42"
mouse_opaque="true" name="TextPrice" v_pad="0" width="56">
Price: [CURRENCY]
</text>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-315"
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0"
enabled="true" follows="left|top|right" font="SansSerifSmall" height="16"
is_unicode="false" left_delta="56" max_length="25" mouse_opaque="true"
name="Edit Cost" width="242" />