Export perm added to UI!
Code added, Along with all the potential PERM_EXPORT bits... Actual PERM_EXPORT bit still needs to be added. SimulatorFeature comes next.
This commit is contained in:
@@ -197,6 +197,7 @@ LLFloaterProperties::LLFloaterProperties(const std::string& name, const LLRect&
|
|||||||
// everyone permissions
|
// everyone permissions
|
||||||
childSetCommitCallback("CheckEveryoneCopy",&onCommitPermissions, this);
|
childSetCommitCallback("CheckEveryoneCopy",&onCommitPermissions, this);
|
||||||
childSetCommitCallback("CheckEveryoneMove",&onCommitPermissions, this);
|
childSetCommitCallback("CheckEveryoneMove",&onCommitPermissions, this);
|
||||||
|
childSetCommitCallback("CheckExport", &onCommitPermissions, this);
|
||||||
// next owner permissions
|
// next owner permissions
|
||||||
childSetCommitCallback("CheckNextOwnerModify",&onCommitPermissions, this);
|
childSetCommitCallback("CheckNextOwnerModify",&onCommitPermissions, this);
|
||||||
childSetCommitCallback("CheckNextOwnerCopy",&onCommitPermissions, this);
|
childSetCommitCallback("CheckNextOwnerCopy",&onCommitPermissions, this);
|
||||||
@@ -251,11 +252,13 @@ void LLFloaterProperties::refresh()
|
|||||||
"CheckOwnerModify",
|
"CheckOwnerModify",
|
||||||
"CheckOwnerCopy",
|
"CheckOwnerCopy",
|
||||||
"CheckOwnerTransfer",
|
"CheckOwnerTransfer",
|
||||||
|
"CheckOwnerExport",
|
||||||
"CheckGroupCopy",
|
"CheckGroupCopy",
|
||||||
"CheckGroupMod",
|
"CheckGroupMod",
|
||||||
"CheckGroupMove",
|
"CheckGroupMove",
|
||||||
"CheckEveryoneCopy",
|
"CheckEveryoneCopy",
|
||||||
"CheckEveryoneMove",
|
"CheckEveryoneMove",
|
||||||
|
"CheckExport",
|
||||||
"CheckNextOwnerModify",
|
"CheckNextOwnerModify",
|
||||||
"CheckNextOwnerCopy",
|
"CheckNextOwnerCopy",
|
||||||
"CheckNextOwnerTransfer",
|
"CheckNextOwnerTransfer",
|
||||||
@@ -436,6 +439,8 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
|
|||||||
childSetValue("CheckOwnerCopy",LLSD((BOOL)(owner_mask & PERM_COPY)));
|
childSetValue("CheckOwnerCopy",LLSD((BOOL)(owner_mask & PERM_COPY)));
|
||||||
childSetEnabled("CheckOwnerTransfer",FALSE);
|
childSetEnabled("CheckOwnerTransfer",FALSE);
|
||||||
childSetValue("CheckOwnerTransfer",LLSD((BOOL)(owner_mask & PERM_TRANSFER)));
|
childSetValue("CheckOwnerTransfer",LLSD((BOOL)(owner_mask & PERM_TRANSFER)));
|
||||||
|
childSetEnabled("CheckOwnerExport",false);
|
||||||
|
// childSetValue("CheckOwnerExport", (bool)(owner_mask & PERM_EXPORT));
|
||||||
|
|
||||||
///////////////////////
|
///////////////////////
|
||||||
// DEBUG PERMISSIONS //
|
// DEBUG PERMISSIONS //
|
||||||
@@ -519,6 +524,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
|
|||||||
childSetEnabled("CheckEveryoneCopy",false);
|
childSetEnabled("CheckEveryoneCopy",false);
|
||||||
childSetEnabled("CheckEveryoneMove",false);
|
childSetEnabled("CheckEveryoneMove",false);
|
||||||
}
|
}
|
||||||
|
childSetEnabled("CheckExport", gAgent.getID() == item->getCreatorUUID());
|
||||||
|
|
||||||
// Set values.
|
// Set values.
|
||||||
BOOL is_group_copy = (group_mask & PERM_COPY) ? TRUE : FALSE;
|
BOOL is_group_copy = (group_mask & PERM_COPY) ? TRUE : FALSE;
|
||||||
@@ -531,6 +537,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
|
|||||||
|
|
||||||
childSetValue("CheckEveryoneCopy",LLSD((BOOL)(everyone_mask & PERM_COPY)));
|
childSetValue("CheckEveryoneCopy",LLSD((BOOL)(everyone_mask & PERM_COPY)));
|
||||||
childSetValue("CheckEveryoneMove",LLSD((BOOL)(everyone_mask & PERM_MOVE)));
|
childSetValue("CheckEveryoneMove",LLSD((BOOL)(everyone_mask & PERM_MOVE)));
|
||||||
|
//childSetValue("CheckExport", everyone_mask & PERM_EXPORT);
|
||||||
|
|
||||||
///////////////
|
///////////////
|
||||||
// SALE INFO //
|
// SALE INFO //
|
||||||
@@ -750,6 +757,11 @@ void LLFloaterProperties::onCommitPermissions(LLUICtrl* ctrl, void* data)
|
|||||||
perm.setEveryoneBits(gAgent.getID(), gAgent.getGroupID(),
|
perm.setEveryoneBits(gAgent.getID(), gAgent.getGroupID(),
|
||||||
CheckEveryoneCopy->get(), PERM_COPY);
|
CheckEveryoneCopy->get(), PERM_COPY);
|
||||||
}
|
}
|
||||||
|
LLCheckBoxCtrl* CheckExport = self->getChild<LLCheckBoxCtrl>("CheckExport");
|
||||||
|
if(CheckExport)
|
||||||
|
{
|
||||||
|
// perm.setEveryoneBits(gAgent.getID(), gAgent.getGroupID(), CheckExport->get(), PERM_EXPORT);
|
||||||
|
}
|
||||||
|
|
||||||
LLCheckBoxCtrl* CheckNextOwnerModify = self->getChild<LLCheckBoxCtrl>("CheckNextOwnerModify");
|
LLCheckBoxCtrl* CheckNextOwnerModify = self->getChild<LLCheckBoxCtrl>("CheckNextOwnerModify");
|
||||||
if(CheckNextOwnerModify)
|
if(CheckNextOwnerModify)
|
||||||
|
|||||||
@@ -112,6 +112,8 @@ BOOL LLPanelPermissions::postBuild()
|
|||||||
|
|
||||||
childSetCommitCallback("checkbox allow everyone copy",LLPanelPermissions::onCommitEveryoneCopy,this);
|
childSetCommitCallback("checkbox allow everyone copy",LLPanelPermissions::onCommitEveryoneCopy,this);
|
||||||
|
|
||||||
|
getChild<LLUICtrl>("checkbox allow export")->setCommitCallback(boost::bind(&LLPanelPermissions::onCommitExport, this));
|
||||||
|
|
||||||
childSetCommitCallback("checkbox for sale",LLPanelPermissions::onCommitSaleInfo,this);
|
childSetCommitCallback("checkbox for sale",LLPanelPermissions::onCommitSaleInfo,this);
|
||||||
|
|
||||||
childSetCommitCallback("Edit Cost",LLPanelPermissions::onCommitSaleInfo,this);
|
childSetCommitCallback("Edit Cost",LLPanelPermissions::onCommitSaleInfo,this);
|
||||||
@@ -223,10 +225,13 @@ void LLPanelPermissions::refresh()
|
|||||||
childSetEnabled("checkbox share with group",false);
|
childSetEnabled("checkbox share with group",false);
|
||||||
childSetEnabled("button deed",false);
|
childSetEnabled("button deed",false);
|
||||||
|
|
||||||
|
childSetEnabled("text anyone can", false);
|
||||||
childSetValue("checkbox allow everyone move",FALSE);
|
childSetValue("checkbox allow everyone move",FALSE);
|
||||||
childSetEnabled("checkbox allow everyone move",false);
|
childSetEnabled("checkbox allow everyone move",false);
|
||||||
childSetValue("checkbox allow everyone copy",FALSE);
|
childSetValue("checkbox allow everyone copy",FALSE);
|
||||||
childSetEnabled("checkbox allow everyone copy",false);
|
childSetEnabled("checkbox allow everyone copy",false);
|
||||||
|
childSetValue("checkbox allow export", false);
|
||||||
|
childSetEnabled("checkbox allow export", false);
|
||||||
|
|
||||||
//Next owner can:
|
//Next owner can:
|
||||||
childSetEnabled("Next owner can:",false);
|
childSetEnabled("Next owner can:",false);
|
||||||
@@ -620,6 +625,8 @@ void LLPanelPermissions::refresh()
|
|||||||
LLStringUtil::replaceChar(perm_string, 'C', 'c');
|
LLStringUtil::replaceChar(perm_string, 'C', 'c');
|
||||||
if (diff_mask & PERM_TRANSFER)
|
if (diff_mask & PERM_TRANSFER)
|
||||||
LLStringUtil::replaceChar(perm_string, 'T', 't');
|
LLStringUtil::replaceChar(perm_string, 'T', 't');
|
||||||
|
/* if (diff_mask & PERM_EXPORT)
|
||||||
|
LLStringUtil::replaceChar(perm_string, 'E', 'e');*/
|
||||||
}
|
}
|
||||||
childSetText("B:",perm_string);
|
childSetText("B:",perm_string);
|
||||||
childSetVisible("B:",true);
|
childSetVisible("B:",true);
|
||||||
@@ -688,15 +695,18 @@ void LLPanelPermissions::refresh()
|
|||||||
if (has_change_perm_ability)
|
if (has_change_perm_ability)
|
||||||
{
|
{
|
||||||
childSetEnabled("checkbox share with group",true);
|
childSetEnabled("checkbox share with group",true);
|
||||||
|
childSetEnabled("text anyone can", true);
|
||||||
childSetEnabled("checkbox allow everyone move",owner_mask_on & PERM_MOVE);
|
childSetEnabled("checkbox allow everyone move",owner_mask_on & PERM_MOVE);
|
||||||
childSetEnabled("checkbox allow everyone copy",owner_mask_on & PERM_COPY && owner_mask_on & PERM_TRANSFER);
|
childSetEnabled("checkbox allow everyone copy",owner_mask_on & PERM_COPY && owner_mask_on & PERM_TRANSFER);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
childSetEnabled("checkbox share with group", FALSE);
|
childSetEnabled("checkbox share with group", FALSE);
|
||||||
|
childSetEnabled("text anyone can", false);
|
||||||
childSetEnabled("checkbox allow everyone move", FALSE);
|
childSetEnabled("checkbox allow everyone move", FALSE);
|
||||||
childSetEnabled("checkbox allow everyone copy", FALSE);
|
childSetEnabled("checkbox allow everyone copy", FALSE);
|
||||||
}
|
}
|
||||||
|
childSetEnabled("checkbox allow export", mCreatorID == gAgent.getID());
|
||||||
|
|
||||||
if (has_change_sale_ability && (owner_mask_on & PERM_TRANSFER))
|
if (has_change_sale_ability && (owner_mask_on & PERM_TRANSFER))
|
||||||
{
|
{
|
||||||
@@ -779,6 +789,23 @@ void LLPanelPermissions::refresh()
|
|||||||
childSetValue("checkbox allow everyone copy",TRUE);
|
childSetValue("checkbox allow everyone copy",TRUE);
|
||||||
childSetTentative("checkbox allow everyone copy",true);
|
childSetTentative("checkbox allow everyone copy",true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Export
|
||||||
|
/* if(everyone_mask_on & PERM_EXPORT)
|
||||||
|
{
|
||||||
|
childSetValue("checkbox allow export", true);
|
||||||
|
childSetTentative("checkbox allow export", false);
|
||||||
|
}
|
||||||
|
else if(everyone_mask_on & PERM_EXPORT)
|
||||||
|
{
|
||||||
|
childSetValue("checkbox allow export", false);
|
||||||
|
childSetTentative("checkbox allow export", false);
|
||||||
|
}
|
||||||
|
else*/
|
||||||
|
{
|
||||||
|
childSetValue("checkbox allow export", true);
|
||||||
|
childSetTentative("checkbox allow export", true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(valid_next_perms)
|
if(valid_next_perms)
|
||||||
@@ -1064,6 +1091,11 @@ void LLPanelPermissions::onCommitEveryoneCopy(LLUICtrl *ctrl, void *data)
|
|||||||
onCommitPerm(ctrl, data, PERM_EVERYONE, PERM_COPY);
|
onCommitPerm(ctrl, data, PERM_EVERYONE, PERM_COPY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLPanelPermissions::onCommitExport()
|
||||||
|
{
|
||||||
|
// perm.setEveryoneBits(gAgent.getID(), gAgent.getGroupID(), childGetValue("checkbox allow export"), PERM_EXPORT);
|
||||||
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLPanelPermissions::onCommitNextOwnerModify(LLUICtrl* ctrl, void* data)
|
void LLPanelPermissions::onCommitNextOwnerModify(LLUICtrl* ctrl, void* data)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ protected:
|
|||||||
static void onCommitEveryoneMove(LLUICtrl *ctrl, void *data);
|
static void onCommitEveryoneMove(LLUICtrl *ctrl, void *data);
|
||||||
static void onCommitEveryoneCopy(LLUICtrl *ctrl, void *data);
|
static void onCommitEveryoneCopy(LLUICtrl *ctrl, void *data);
|
||||||
//static void onCommitEveryoneModify(LLUICtrl *ctrl, void *data);
|
//static void onCommitEveryoneModify(LLUICtrl *ctrl, void *data);
|
||||||
|
void onCommitExport();
|
||||||
|
|
||||||
static void onCommitNextOwnerModify(LLUICtrl* ctrl, void* data);
|
static void onCommitNextOwnerModify(LLUICtrl* ctrl, void* data);
|
||||||
static void onCommitNextOwnerCopy(LLUICtrl* ctrl, void* data);
|
static void onCommitNextOwnerCopy(LLUICtrl* ctrl, void* data);
|
||||||
|
|||||||
@@ -80,9 +80,10 @@
|
|||||||
initial_value="false" label="Copy" left_delta="78" mouse_opaque="true"
|
initial_value="false" label="Copy" left_delta="78" mouse_opaque="true"
|
||||||
name="CheckOwnerCopy" radio_style="false" width="88" />
|
name="CheckOwnerCopy" radio_style="false" width="88" />
|
||||||
<check_box bottom="-155" follows="left|top" font="SansSerifSmall" height="16"
|
<check_box bottom="-155" follows="left|top" font="SansSerifSmall" height="16"
|
||||||
initial_value="false" label="Resell/Give away" left_delta="88"
|
initial_value="false" label="Transfer" left_delta="88"
|
||||||
mouse_opaque="true" name="CheckOwnerTransfer" radio_style="false"
|
mouse_opaque="true" name="CheckOwnerTransfer" radio_style="false"
|
||||||
width="106" />
|
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"
|
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||||
bottom="-165" drop_shadow_visible="true" follows="left|top"
|
bottom="-165" drop_shadow_visible="true" follows="left|top"
|
||||||
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
|
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
|
||||||
@@ -140,6 +141,7 @@
|
|||||||
<check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16"
|
<check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16"
|
||||||
initial_value="false" label="Move" left_delta="88" mouse_opaque="true"
|
initial_value="false" label="Move" left_delta="88" mouse_opaque="true"
|
||||||
name="CheckEveryoneMove" radio_style="false" width="88" />
|
name="CheckEveryoneMove" radio_style="false" width="88" />
|
||||||
|
<check_box name="CheckExport" label="Export" bottom_delta="0" follows="left|top" left_delta="88"/>
|
||||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||||
bottom_delta="-13" drop_shadow_visible="true" follows="left|top"
|
bottom_delta="-13" drop_shadow_visible="true" follows="left|top"
|
||||||
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
|
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
|
||||||
@@ -153,7 +155,7 @@
|
|||||||
initial_value="false" label="Copy" left_delta="78" mouse_opaque="true"
|
initial_value="false" label="Copy" left_delta="78" mouse_opaque="true"
|
||||||
name="CheckNextOwnerCopy" radio_style="false" width="88" />
|
name="CheckNextOwnerCopy" radio_style="false" width="88" />
|
||||||
<check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16"
|
<check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16"
|
||||||
initial_value="false" label="Resell/Give away" left_delta="88"
|
initial_value="false" label="Transfer" left_delta="88"
|
||||||
mouse_opaque="true" name="CheckNextOwnerTransfer" radio_style="false"
|
mouse_opaque="true" name="CheckNextOwnerTransfer" radio_style="false"
|
||||||
width="106" />
|
width="106" />
|
||||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||||
|
|||||||
@@ -429,12 +429,14 @@
|
|||||||
mouse_opaque="true" name="button deed" scale_image="TRUE"
|
mouse_opaque="true" name="button deed" scale_image="TRUE"
|
||||||
tool_tip="Group shared objects can be deeded by a group officer."
|
tool_tip="Group shared objects can be deeded by a group officer."
|
||||||
width="78" />
|
width="78" />
|
||||||
<check_box bottom_delta="-18" follows="left|top" font="SansSerifSmall" height="16"
|
<text name="text anyone can" bottom_delta="-12" left="10" follows="left|top">Anyone can:</text>
|
||||||
initial_value="false" label="Allow anyone to move" left="10"
|
<check_box bottom_delta="-24" follows="left|top" font="SansSerifSmall" height="16"
|
||||||
|
initial_value="false" label="Move"
|
||||||
mouse_opaque="true" name="checkbox allow everyone move" width="142" />
|
mouse_opaque="true" name="checkbox allow everyone move" width="142" />
|
||||||
<check_box bottom_delta="-18" follows="left|top" font="SansSerifSmall" height="16"
|
<check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16"
|
||||||
initial_value="false" label="Allow anyone to copy" left="10"
|
initial_value="false" label="Copy" left_delta="60"
|
||||||
mouse_opaque="true" name="checkbox allow everyone copy" width="141" />
|
mouse_opaque="true" name="checkbox allow everyone copy" width="141" />
|
||||||
|
<check_box name="checkbox export" label="Export" bottom_delta="0" left_delta="60" follows="left|top"/>
|
||||||
<check_box bottom_delta="-18" follows="left|top" font="SansSerifSmall" height="16"
|
<check_box bottom_delta="-18" follows="left|top" font="SansSerifSmall" height="16"
|
||||||
initial_value="false" label="Show in search" left="10" name="search_check"
|
initial_value="false" label="Show in search" left="10" name="search_check"
|
||||||
tool_tip="Let people see this object in search results" width="78" />
|
tool_tip="Let people see this object in search results" width="78" />
|
||||||
|
|||||||
Reference in New Issue
Block a user