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)meow-7.2.2
parent
5c997d5ebc
commit
aafb9bebf4
|
|
@ -209,6 +209,12 @@ bool LLInventoryType::cannotRestrictPermissions(LLInventoryType::EType type)
|
|||
}
|
||||
}
|
||||
|
||||
// Should show permissions that apply only to objects rezed in world.
|
||||
bool LLInventoryType::showInWorldPermissions(LLInventoryType::EType type)
|
||||
{
|
||||
return (type != IT_SETTINGS);
|
||||
}
|
||||
|
||||
bool inventory_and_asset_types_match(LLInventoryType::EType inventory_type,
|
||||
LLAssetType::EType asset_type)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -134,6 +134,8 @@ public:
|
|||
// true if this type cannot have restricted permissions.
|
||||
static bool cannotRestrictPermissions(EType type);
|
||||
|
||||
static bool showInWorldPermissions(EType type);
|
||||
|
||||
private:
|
||||
// don't instantiate or derive one of these objects
|
||||
LLInventoryType( void );
|
||||
|
|
|
|||
|
|
@ -631,7 +631,7 @@ 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);
|
||||
|
|
@ -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<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)));
|
||||
|
|
|
|||
Loading…
Reference in New Issue