Feature Request: Next owner perms for scripts
In System->Building preferences, on the top right side.
This commit is contained in:
@@ -14527,6 +14527,39 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>ScriptNextOwnerCopy</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Newly created scripts can be copied by next owner</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>ScriptNextOwnerModify</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Newly created scripts can be modified by next owner</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>ScriptNextOwnerTransfer</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Newly created scripts can be resold or given away by next owner</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>SearchURLDefault</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -79,7 +79,7 @@ LLPrefsAscentSys::LLPrefsAscentSys()
|
||||
|
||||
//Build -------------------------------------------------------------------------------
|
||||
getChild<LLUICtrl>("next_owner_copy")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitCheckBox, this, _1, _2));
|
||||
childSetEnabled("next_owner_transfer", gSavedSettings.getBOOL("NextOwnerCopy"));
|
||||
getChild<LLUICtrl>("script_next_owner_copy")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitCheckBox, this, _1, _2));
|
||||
getChild<LLUICtrl>("material")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitComboBox, this, _1, _2));
|
||||
getChild<LLUICtrl>("combobox shininess")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitComboBox, this, _1, _2));
|
||||
getChild<LLTextureCtrl>("texture control")->setDefaultImageAssetID(LLUUID(gSavedSettings.getString("EmeraldBuildPrefs_Texture")));
|
||||
@@ -122,7 +122,10 @@ void LLPrefsAscentSys::onCommitCheckBox(LLUICtrl* ctrl, const LLSD& value)
|
||||
else if (name == "next_owner_copy")
|
||||
{
|
||||
if (!enabled) gSavedSettings.setBOOL("NextOwnerTransfer", true);
|
||||
childSetEnabled("next_owner_transfer", enabled);
|
||||
}
|
||||
else if (name == "script_next_owner_copy")
|
||||
{
|
||||
if (!enabled) gSavedSettings.setBOOL("ScriptNextOwnerTransfer", true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,6 +217,9 @@ void LLPrefsAscentSys::refreshValues()
|
||||
mNextCopy = gSavedSettings.getBOOL("NextOwnerCopy");
|
||||
mNextMod = gSavedSettings.getBOOL("NextOwnerModify");
|
||||
mNextTrans = gSavedSettings.getBOOL("NextOwnerTransfer");
|
||||
mScriptNextCopy = gSavedSettings.getBOOL("ScriptNextOwnerCopy");
|
||||
mScriptNextMod = gSavedSettings.getBOOL("ScriptNextOwnerModify");
|
||||
mScriptNextTrans = gSavedSettings.getBOOL("ScriptNextOwnerTransfer");
|
||||
mShiny = gSavedSettings.getString("EmeraldBuildPrefs_Shiny");
|
||||
mTemporary = gSavedSettings.getBOOL("EmeraldBuildPrefs_Temporary");
|
||||
mTexture = gSavedSettings.getString("EmeraldBuildPrefs_Texture");
|
||||
@@ -353,6 +359,9 @@ void LLPrefsAscentSys::cancel()
|
||||
gSavedSettings.setBOOL("NextOwnerCopy", mNextCopy);
|
||||
gSavedSettings.setBOOL("NextOwnerModify", mNextMod);
|
||||
gSavedSettings.setBOOL("NextOwnerTransfer", mNextTrans);
|
||||
gSavedSettings.setBOOL("ScriptNextOwnerCopy", mScriptNextCopy);
|
||||
gSavedSettings.setBOOL("ScriptNextOwnerModify", mScriptNextMod);
|
||||
gSavedSettings.setBOOL("ScriptNextOwnerTransfer", mScriptNextTrans);
|
||||
gSavedSettings.setBOOL("EmeraldBuildPrefs_Phantom", mPhantom);
|
||||
gSavedSettings.setBOOL("EmeraldBuildPrefs_Physical", mPhysical);
|
||||
gSavedSettings.setString("EmeraldBuildPrefs_Shiny", mShiny);
|
||||
|
||||
@@ -127,6 +127,9 @@ private:
|
||||
bool mNextCopy;
|
||||
bool mNextMod;
|
||||
bool mNextTrans;
|
||||
bool mScriptNextCopy;
|
||||
bool mScriptNextMod;
|
||||
bool mScriptNextTrans;
|
||||
std::string mShiny;
|
||||
bool mTemporary;
|
||||
std::string mTexture;
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
#include "llagentwearables.h"
|
||||
#include "llappearancemgr.h"
|
||||
#include "llfloaterperms.h"
|
||||
#include "llfoldervieweventlistener.h"
|
||||
#include "llimview.h"
|
||||
#include "llinventorybridge.h"
|
||||
@@ -304,7 +305,7 @@ void do_create(LLInventoryModel *model, LLInventoryPanel *ptr, std::string type,
|
||||
parent_id,
|
||||
LLAssetType::AT_LSL_TEXT,
|
||||
LLInventoryType::IT_LSL,
|
||||
PERM_MOVE | PERM_TRANSFER);
|
||||
LLFloaterPerms::getNextOwnerPerms("Script"));
|
||||
}
|
||||
else if ("notecard" == type)
|
||||
{
|
||||
|
||||
@@ -36,39 +36,17 @@
|
||||
#include "llpanelcontents.h"
|
||||
|
||||
// linden library includes
|
||||
#include "llerror.h"
|
||||
#include "llrect.h"
|
||||
#include "llstring.h"
|
||||
#include "llmaterialtable.h"
|
||||
#include "llfontgl.h"
|
||||
#include "m3math.h"
|
||||
#include "llpermissionsflags.h"
|
||||
#include "lleconomy.h"
|
||||
#include "material_codes.h"
|
||||
#include "llinventorydefines.h"
|
||||
|
||||
// project includes
|
||||
#include "llui.h"
|
||||
#include "llspinctrl.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "lltextbox.h"
|
||||
#include "llbutton.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llfloaterbulkpermission.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llviewerassettype.h"
|
||||
#include "llworld.h"
|
||||
#include "llviewerobject.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llresmgr.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llpreviewscript.h"
|
||||
#include "lltool.h"
|
||||
#include "lltoolmgr.h"
|
||||
#include "lltoolcomp.h"
|
||||
#include "llfloaterbulkpermission.h"
|
||||
#include "llfloaterperms.h"
|
||||
#include "llpanelobjectinventory.h"
|
||||
#include "llpreviewscript.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llviewerassettype.h"
|
||||
#include "llviewerobject.h"
|
||||
// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c)
|
||||
#include "rlvhandler.h"
|
||||
#include "rlvlocks.h"
|
||||
@@ -208,7 +186,7 @@ void LLPanelContents::onClickNewScript(void *userdata)
|
||||
PERM_ALL,
|
||||
PERM_NONE,
|
||||
PERM_NONE,
|
||||
PERM_MOVE | PERM_TRANSFER);
|
||||
LLFloaterPerms::getNextOwnerPerms("Script"));
|
||||
std::string desc;
|
||||
LLViewerAssetType::generateDescriptionFor(LLAssetType::AT_LSL_TEXT, desc);
|
||||
LLPointer<LLViewerInventoryItem> new_item =
|
||||
|
||||
@@ -64,23 +64,14 @@
|
||||
#include "llagent.h"
|
||||
#include "llmenugl.h"
|
||||
#include "roles_constants.h"
|
||||
#include "llfloatersearchreplace.h"
|
||||
#include "llfloaterperms.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llviewerinventory.h"
|
||||
#include "llviewermenu.h"
|
||||
#include "llviewerobject.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llkeyboard.h"
|
||||
#include "llscrollcontainer.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "lltooldraganddrop.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "lltextbox.h"
|
||||
#include "llslider.h"
|
||||
#include "lldir.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llfloatersearchreplace.h"
|
||||
#include "llviewerstats.h"
|
||||
#include "llviewertexteditor.h"
|
||||
#include "llviewerwindow.h"
|
||||
@@ -88,7 +79,6 @@
|
||||
#include "llmediactrl.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "lltrans.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llappviewer.h"
|
||||
|
||||
#include "llsdserialize.h"
|
||||
@@ -1914,7 +1904,7 @@ void LLLiveLSLEditor::loadAsset()
|
||||
mScriptEd->enableSave(FALSE);
|
||||
LLPermissions perm;
|
||||
perm.init(gAgent.getID(), gAgent.getID(), LLUUID::null, gAgent.getGroupID());
|
||||
perm.initMasks(PERM_ALL, PERM_ALL, PERM_NONE, PERM_NONE, PERM_MOVE | PERM_TRANSFER);
|
||||
perm.initMasks(PERM_ALL, PERM_ALL, PERM_NONE, PERM_NONE, LLFloaterPerms::getNextOwnerPerms("Script"));
|
||||
mItem = new LLViewerInventoryItem(mItemUUID,
|
||||
mObjectUUID,
|
||||
perm,
|
||||
|
||||
@@ -135,10 +135,15 @@
|
||||
<combo_item name="Plastic" value="Plastic">Plastic</combo_item>
|
||||
<combo_item name="Rubber" value="Rubber">Rubber</combo_item>
|
||||
</combo_box>
|
||||
<text bottom="-19" left_delta="85" name="text_box7" halign="center" width="115">Next Owner Perms</text>
|
||||
<check_box follows="top" height="16" initial_value="false" label="Copy permission" tool_tip="Next owner can make copies of creations" name="next_owner_copy" control_name="NextOwnerCopy"/>
|
||||
<check_box follows="top" height="16" initial_value="false" label="Modify permission" tool_tip="Next owner can edit creations" name="next_owner_modify" control_name="NextOwnerModify"/>
|
||||
<check_box follows="top" height="16" initial_value="true" label="Transfer permission" tool_tip="Next owner can give(or sell) creations" name="next_owner_transfer" control_name="NextOwnerTransfer"/>
|
||||
<text bottom="-19" left_delta="85" name="text_box7" halign="center" width="145">Next Owner Perms</text>
|
||||
<text bottom="-34" left_delta="0" name="text_box8" halign="center" width="65">Objects</text>
|
||||
<check_box follows="top" height="16" initial_value="false" label="Copy" tool_tip="Next owner can make copies of creations" name="next_owner_copy" control_name="NextOwnerCopy"/>
|
||||
<check_box follows="top" height="16" initial_value="false" label="Modify" tool_tip="Next owner can edit creations" name="next_owner_modify" control_name="NextOwnerModify"/>
|
||||
<check_box follows="top" height="16" initial_value="true" label="Transfer" tool_tip="Next owner can give(or sell) creations" name="next_owner_transfer" control_name="NextOwnerTransfer" enabled_control="NextOwnerCopy"/>
|
||||
<text bottom="-34" left_delta="85" name="text_box9" halign="center" width="65">Scripts</text>
|
||||
<check_box follows="top" height="16" label="Copy" tool_tip="Next owner can make copies of scripts" name="script_next_owner_copy" control_name="ScriptNextOwnerCopy"/>
|
||||
<check_box follows="top" height="16" label="Modify" tool_tip="Next owner can edit scripts" name="script_next_owner_modify" control_name="ScriptNextOwnerModify"/>
|
||||
<check_box follows="top" height="16" label="Transfer" tool_tip="Next owner can give(or sell) scripts" name="script_next_owner_transfer" control_name="ScriptNextOwnerTransfer" enabled_control="ScriptNextOwnerCopy"/>
|
||||
<check_box bottom="-131" left="5" follows="top" height="16" label="Phantom" name="EmPhantomToggle" control_name="EmeraldBuildPrefs_Phantom"/>
|
||||
<check_box follows="top" height="16" label="Physical" name="EmPhysicalToggle" control_name="EmeraldBuildPrefs_Physical"/>
|
||||
<check_box follows="top" height="16" label="Temporary" name="EmTemporaryToggle" control_name="EmeraldBuildPrefs_Temporary"/>
|
||||
|
||||
Reference in New Issue
Block a user