From df96fc652b452dbc9bd2daa7398ada1feb235fff Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Fri, 7 Sep 2018 16:40:33 +0300 Subject: MAINT-9108 Disable "Copy" perm checkbox for settings type objects --- indra/newview/llsidepaneliteminfo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llsidepaneliteminfo.cpp') diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index a486a29aa2..3ec8e1e911 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -301,6 +301,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); @@ -637,7 +638,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) 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); -- cgit v1.2.3 From aafb9bebf48f79d06c82e601dd19cf2f2d70de9e Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 20 Sep 2018 15:39:06 -0700 Subject: SL-9636: Hide the anyone, group share and for sale checks in the properties panel for settings. (didn't do others items it may apply to) --- indra/newview/llsidepaneliteminfo.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'indra/newview/llsidepaneliteminfo.cpp') diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 3ec8e1e911..e6ea5c3784 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -631,7 +631,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) LLUICtrl* edit_cost = getChild("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); @@ -657,6 +657,25 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) edit_cost->setEnabled(FALSE); } + // Hide any properties that are not relevant to settings + if (is_settings) + { + getChild("GroupLabel")->setEnabled(false); + getChild("GroupLabel")->setVisible(false); + getChild("CheckShareWithGroup")->setEnabled(false); + getChild("CheckShareWithGroup")->setVisible(false); + getChild("AnyoneLabel")->setEnabled(false); + getChild("AnyoneLabel")->setVisible(false); + getChild("CheckEveryoneCopy")->setEnabled(false); + getChild("CheckEveryoneCopy")->setVisible(false); + getChild("CheckPurchase")->setEnabled(false); + getChild("CheckPurchase")->setVisible(false); + getChild("ComboBoxSaleType")->setEnabled(false); + getChild("ComboBoxSaleType")->setVisible(false); + getChild("Edit Cost")->setEnabled(false); + getChild("Edit Cost")->setVisible(false); + } + // Set values. getChild("CheckPurchase")->setValue(is_for_sale); getChild("CheckNextOwnerModify")->setValue(LLSD(BOOL(next_owner_mask & PERM_MODIFY))); -- cgit v1.2.3