diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index 34a51e018..3cfcd4ac7 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -197,6 +197,7 @@ LLFloaterProperties::LLFloaterProperties(const std::string& name, const LLRect& // everyone permissions childSetCommitCallback("CheckEveryoneCopy",&onCommitPermissions, this); childSetCommitCallback("CheckEveryoneMove",&onCommitPermissions, this); + childSetCommitCallback("CheckExport", &onCommitPermissions, this); // next owner permissions childSetCommitCallback("CheckNextOwnerModify",&onCommitPermissions, this); childSetCommitCallback("CheckNextOwnerCopy",&onCommitPermissions, this); @@ -251,11 +252,13 @@ void LLFloaterProperties::refresh() "CheckOwnerModify", "CheckOwnerCopy", "CheckOwnerTransfer", + "CheckOwnerExport", "CheckGroupCopy", "CheckGroupMod", "CheckGroupMove", "CheckEveryoneCopy", "CheckEveryoneMove", + "CheckExport", "CheckNextOwnerModify", "CheckNextOwnerCopy", "CheckNextOwnerTransfer", @@ -436,6 +439,8 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) childSetValue("CheckOwnerCopy",LLSD((BOOL)(owner_mask & PERM_COPY))); childSetEnabled("CheckOwnerTransfer",FALSE); childSetValue("CheckOwnerTransfer",LLSD((BOOL)(owner_mask & PERM_TRANSFER))); + childSetEnabled("CheckOwnerExport",false); +// childSetValue("CheckOwnerExport", (bool)(owner_mask & PERM_EXPORT)); /////////////////////// // DEBUG PERMISSIONS // @@ -519,6 +524,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) childSetEnabled("CheckEveryoneCopy",false); childSetEnabled("CheckEveryoneMove",false); } + childSetEnabled("CheckExport", gAgent.getID() == item->getCreatorUUID()); // Set values. 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("CheckEveryoneMove",LLSD((BOOL)(everyone_mask & PERM_MOVE))); + //childSetValue("CheckExport", everyone_mask & PERM_EXPORT); /////////////// // SALE INFO // @@ -750,6 +757,11 @@ void LLFloaterProperties::onCommitPermissions(LLUICtrl* ctrl, void* data) perm.setEveryoneBits(gAgent.getID(), gAgent.getGroupID(), CheckEveryoneCopy->get(), PERM_COPY); } + LLCheckBoxCtrl* CheckExport = self->getChild("CheckExport"); + if(CheckExport) + { +// perm.setEveryoneBits(gAgent.getID(), gAgent.getGroupID(), CheckExport->get(), PERM_EXPORT); + } LLCheckBoxCtrl* CheckNextOwnerModify = self->getChild("CheckNextOwnerModify"); if(CheckNextOwnerModify) diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 99ea6e9c4..bd7e582ed 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -112,6 +112,8 @@ BOOL LLPanelPermissions::postBuild() childSetCommitCallback("checkbox allow everyone copy",LLPanelPermissions::onCommitEveryoneCopy,this); + getChild("checkbox allow export")->setCommitCallback(boost::bind(&LLPanelPermissions::onCommitExport, this)); + childSetCommitCallback("checkbox for sale",LLPanelPermissions::onCommitSaleInfo,this); childSetCommitCallback("Edit Cost",LLPanelPermissions::onCommitSaleInfo,this); @@ -223,10 +225,13 @@ void LLPanelPermissions::refresh() childSetEnabled("checkbox share with group",false); childSetEnabled("button deed",false); + childSetEnabled("text anyone can", false); childSetValue("checkbox allow everyone move",FALSE); childSetEnabled("checkbox allow everyone move",false); childSetValue("checkbox allow everyone copy",FALSE); childSetEnabled("checkbox allow everyone copy",false); + childSetValue("checkbox allow export", false); + childSetEnabled("checkbox allow export", false); //Next owner can: childSetEnabled("Next owner can:",false); @@ -620,6 +625,8 @@ void LLPanelPermissions::refresh() LLStringUtil::replaceChar(perm_string, 'C', 'c'); if (diff_mask & PERM_TRANSFER) LLStringUtil::replaceChar(perm_string, 'T', 't'); +/* if (diff_mask & PERM_EXPORT) + LLStringUtil::replaceChar(perm_string, 'E', 'e');*/ } childSetText("B:",perm_string); childSetVisible("B:",true); @@ -688,15 +695,18 @@ void LLPanelPermissions::refresh() if (has_change_perm_ability) { 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 copy",owner_mask_on & PERM_COPY && owner_mask_on & PERM_TRANSFER); } else { childSetEnabled("checkbox share with group", FALSE); + childSetEnabled("text anyone can", false); childSetEnabled("checkbox allow everyone move", FALSE); childSetEnabled("checkbox allow everyone copy", FALSE); } + childSetEnabled("checkbox allow export", mCreatorID == gAgent.getID()); if (has_change_sale_ability && (owner_mask_on & PERM_TRANSFER)) { @@ -779,6 +789,23 @@ void LLPanelPermissions::refresh() childSetValue("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) @@ -1064,6 +1091,11 @@ void LLPanelPermissions::onCommitEveryoneCopy(LLUICtrl *ctrl, void *data) onCommitPerm(ctrl, data, PERM_EVERYONE, PERM_COPY); } +void LLPanelPermissions::onCommitExport() +{ +// perm.setEveryoneBits(gAgent.getID(), gAgent.getGroupID(), childGetValue("checkbox allow export"), PERM_EXPORT); +} + // static void LLPanelPermissions::onCommitNextOwnerModify(LLUICtrl* ctrl, void* data) { diff --git a/indra/newview/llpanelpermissions.h b/indra/newview/llpanelpermissions.h index 85ac41831..a4ccfffa9 100644 --- a/indra/newview/llpanelpermissions.h +++ b/indra/newview/llpanelpermissions.h @@ -86,6 +86,7 @@ protected: static void onCommitEveryoneMove(LLUICtrl *ctrl, void *data); static void onCommitEveryoneCopy(LLUICtrl *ctrl, void *data); //static void onCommitEveryoneModify(LLUICtrl *ctrl, void *data); + void onCommitExport(); static void onCommitNextOwnerModify(LLUICtrl* ctrl, void* data); static void onCommitNextOwnerCopy(LLUICtrl* ctrl, void* data); diff --git a/indra/newview/skins/default/xui/en-us/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/en-us/floater_inventory_item_properties.xml index e29b362a2..f577635bf 100644 --- a/indra/newview/skins/default/xui/en-us/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/en-us/floater_inventory_item_properties.xml @@ -80,9 +80,10 @@ initial_value="false" label="Copy" left_delta="78" mouse_opaque="true" name="CheckOwnerCopy" radio_style="false" width="88" /> + + - Anyone can: + - +