summaryrefslogtreecommitdiff
path: root/indra/newview/llsidepaneliteminfo.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2020-05-05 00:37:16 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2020-05-05 00:37:16 +0300
commitec9b9898635e90dcdc3579e2121ef11f8ca2a0a8 (patch)
tree859eb8101847d3c8be18adc6bf9aa0e775a792e7 /indra/newview/llsidepaneliteminfo.cpp
parent80447f5e6bfd9843413c7a79074d11373e6c4061 (diff)
parent7c0f3db180e50aad3866a8ac1b1c88cccf74c68d (diff)
Merge branch 'DRTVWR-501-maint' into DRTVWR-503-maint
# Conflicts: # indra/newview/llinventorybridge.cpp # indra/newview/llinventorypanel.cpp # indra/newview/lltexturectrl.cpp # indra/newview/skins/default/xui/de/floater_texture_ctrl.xml # indra/newview/skins/default/xui/es/floater_texture_ctrl.xml # indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml # indra/newview/skins/default/xui/it/floater_texture_ctrl.xml # indra/newview/skins/default/xui/ja/floater_texture_ctrl.xml # indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml # indra/newview/skins/default/xui/ru/floater_texture_ctrl.xml # indra/newview/skins/default/xui/tr/floater_texture_ctrl.xml # indra/newview/skins/default/xui/zh/floater_texture_ctrl.xml
Diffstat (limited to 'indra/newview/llsidepaneliteminfo.cpp')
-rw-r--r--indra/newview/llsidepaneliteminfo.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index d508621b41..b23e24a222 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -336,6 +336,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
BOOL is_complete = item->isFinished();
const BOOL cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(item->getInventoryType());
const BOOL is_calling_card = (item->getInventoryType() == LLInventoryType::IT_CALLINGCARD);
+ const BOOL is_settings = (item->getInventoryType() == LLInventoryType::IT_SETTINGS);
const LLPermissions& perm = item->getPermissions();
const BOOL can_agent_manipulate = gAgent.allowOperation(PERM_OWNER, perm,
GP_OBJECT_MANIPULATE);
@@ -665,14 +666,14 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
LLUICtrl* edit_cost = getChild<LLUICtrl>("Edit Cost");
// Check for ability to change values.
- if (is_obj_modify && can_agent_sell
+ if (is_obj_modify && can_agent_sell
&& gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE))
{
getChildView("CheckPurchase")->setEnabled(is_complete);
getChildView("NextOwnerLabel")->setEnabled(TRUE);
getChildView("CheckNextOwnerModify")->setEnabled((base_mask & PERM_MODIFY) && !cannot_restrict_permissions);
- getChildView("CheckNextOwnerCopy")->setEnabled((base_mask & PERM_COPY) && !cannot_restrict_permissions);
+ getChildView("CheckNextOwnerCopy")->setEnabled((base_mask & PERM_COPY) && !cannot_restrict_permissions && !is_settings);
getChildView("CheckNextOwnerTransfer")->setEnabled((next_owner_mask & PERM_COPY) && !cannot_restrict_permissions);
combo_sale_type->setEnabled(is_complete && is_for_sale);
@@ -691,6 +692,25 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
edit_cost->setEnabled(FALSE);
}
+ // Hide any properties that are not relevant to settings
+ if (is_settings)
+ {
+ getChild<LLUICtrl>("GroupLabel")->setEnabled(false);
+ getChild<LLUICtrl>("GroupLabel")->setVisible(false);
+ getChild<LLUICtrl>("CheckShareWithGroup")->setEnabled(false);
+ getChild<LLUICtrl>("CheckShareWithGroup")->setVisible(false);
+ getChild<LLUICtrl>("AnyoneLabel")->setEnabled(false);
+ getChild<LLUICtrl>("AnyoneLabel")->setVisible(false);
+ getChild<LLUICtrl>("CheckEveryoneCopy")->setEnabled(false);
+ getChild<LLUICtrl>("CheckEveryoneCopy")->setVisible(false);
+ getChild<LLUICtrl>("CheckPurchase")->setEnabled(false);
+ getChild<LLUICtrl>("CheckPurchase")->setVisible(false);
+ getChild<LLUICtrl>("ComboBoxSaleType")->setEnabled(false);
+ getChild<LLUICtrl>("ComboBoxSaleType")->setVisible(false);
+ getChild<LLUICtrl>("Edit Cost")->setEnabled(false);
+ getChild<LLUICtrl>("Edit Cost")->setVisible(false);
+ }
+
// Set values.
getChild<LLUICtrl>("CheckPurchase")->setValue(is_for_sale);
getChild<LLUICtrl>("CheckNextOwnerModify")->setValue(LLSD(BOOL(next_owner_mask & PERM_MODIFY)));