diff options
Diffstat (limited to 'indra/newview/llsidepaneliteminfo.cpp')
-rw-r--r-- | indra/newview/llsidepaneliteminfo.cpp | 24 |
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))); |