summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/app_settings/settings.xml385
-rwxr-xr-xindra/newview/llagent.cpp4
-rwxr-xr-xindra/newview/llagentwearables.cpp50
-rwxr-xr-xindra/newview/llfloaterbvhpreview.cpp2
-rwxr-xr-xindra/newview/llfloatergesture.cpp26
-rwxr-xr-xindra/newview/llfloaternamedesc.cpp6
-rwxr-xr-xindra/newview/llfloaterperms.cpp205
-rwxr-xr-xindra/newview/llfloaterperms.h54
-rwxr-xr-xindra/newview/llfloaterpreference.cpp6
-rwxr-xr-xindra/newview/llfloaterpreference.h1
-rwxr-xr-xindra/newview/llmeshrepository.cpp6
-rwxr-xr-xindra/newview/llpanelcontents.cpp12
-rwxr-xr-xindra/newview/llviewerfloaterreg.cpp2
-rwxr-xr-xindra/newview/llviewermenufile.cpp12
-rwxr-xr-xindra/newview/llviewerobject.cpp2
-rwxr-xr-xindra/newview/llviewerobjectlist.cpp12
-rwxr-xr-xindra/newview/llviewerregion.cpp6
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_perm_prefs.xml108
-rw-r--r--indra/newview/skins/default/xui/en/floater_perms_default.xml505
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_inventory_add.xml7
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_viewer.xml7
-rwxr-xr-xindra/newview/skins/default/xui/en/notifications.xml11
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_preferences_advanced.xml11
23 files changed, 1177 insertions, 263 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index d9093c2a6d..9cb63c6518 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -3533,17 +3533,6 @@
<key>Value</key>
<string>http://events.secondlife.com/viewer/embed/event/</string>
</map>
- <key>EveryoneCopy</key>
- <map>
- <key>Comment</key>
- <string>Everyone can copy the newly created objects</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>FastCacheFetchEnabled</key>
<map>
<key>Comment</key>
@@ -6426,39 +6415,6 @@
<key>Value</key>
<integer>130</integer>
</map>
- <key>NextOwnerCopy</key>
- <map>
- <key>Comment</key>
- <string>Newly created objects 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>NextOwnerModify</key>
- <map>
- <key>Comment</key>
- <string>Newly created objects 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>NextOwnerTransfer</key>
- <map>
- <key>Comment</key>
- <string>Newly created objects 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>NewCacheLocation</key>
<map>
<key>Comment</key>
@@ -10289,17 +10245,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>ShareWithGroup</key>
- <map>
- <key>Comment</key>
- <string>Newly created objects are shared with the currently active group</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>ShowAdvancedGraphicsSettings</key>
<map>
<key>Comment</key>
@@ -14540,6 +14485,336 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>ObjectsNextOwnerCopy</key>
+ <map>
+ <key>Comment</key>
+ <string>Newly created objects 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>ObjectsNextOwnerModify</key>
+ <map>
+ <key>Comment</key>
+ <string>Newly created objects 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>ObjectsNextOwnerTransfer</key>
+ <map>
+ <key>Comment</key>
+ <string>Newly created objects 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>ObjectsEveryoneCopy</key>
+ <map>
+ <key>Comment</key>
+ <string>Everyone can copy the newly created object</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>ObjectsShareWithGroup</key>
+ <map>
+ <key>Comment</key>
+ <string>Newly created objects are shared with the currently active group</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>UploadsNextOwnerCopy</key>
+ <map>
+ <key>Comment</key>
+ <string>Newly uploaded items 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>UploadsNextOwnerModify</key>
+ <map>
+ <key>Comment</key>
+ <string>Newly uploaded items 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>UploadsNextOwnerTransfer</key>
+ <map>
+ <key>Comment</key>
+ <string>Newly uploaded items 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>UploadsEveryoneCopy</key>
+ <map>
+ <key>Comment</key>
+ <string>Everyone can copy the newly uploaded item</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>UploadsShareWithGroup</key>
+ <map>
+ <key>Comment</key>
+ <string>Newly uploaded items are shared with the currently active group</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>ScriptsNextOwnerCopy</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>ScriptsNextOwnerModify</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>ScriptsNextOwnerTransfer</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>ScriptsEveryoneCopy</key>
+ <map>
+ <key>Comment</key>
+ <string>Everyone can copy the newly created script</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>ScriptsShareWithGroup</key>
+ <map>
+ <key>Comment</key>
+ <string>Newly created scripts are shared with the currently active group</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>NotecardsNextOwnerCopy</key>
+ <map>
+ <key>Comment</key>
+ <string>Newly created notecards can be copied by next owner</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ <key>NotecardsNextOwnerModify</key>
+ <map>
+ <key>Comment</key>
+ <string>Newly created notecards can be modified by next owner</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ <key>NotecardsNextOwnerTransfer</key>
+ <map>
+ <key>Comment</key>
+ <string>Newly created notecards 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>NotecardsEveryoneCopy</key>
+ <map>
+ <key>Comment</key>
+ <string>Everyone can copy the newly created notecard</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>NotecardsShareWithGroup</key>
+ <map>
+ <key>Comment</key>
+ <string>Newly created notecards are shared with the currently active group</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>GesturesNextOwnerCopy</key>
+ <map>
+ <key>Comment</key>
+ <string>Newly created gestures can be copied by next owner</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ <key>GesturesNextOwnerModify</key>
+ <map>
+ <key>Comment</key>
+ <string>Newly created gestures can be modified by next owner</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ <key>GesturesNextOwnerTransfer</key>
+ <map>
+ <key>Comment</key>
+ <string>Newly created gestures 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>GesturesEveryoneCopy</key>
+ <map>
+ <key>Comment</key>
+ <string>Everyone can copy the newly created gesture</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>GesturesShareWithGroup</key>
+ <map>
+ <key>Comment</key>
+ <string>Newly created gestures are shared with the currently active group</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>WearablesNextOwnerCopy</key>
+ <map>
+ <key>Comment</key>
+ <string>Newly created clothing or body part 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>WearablesNextOwnerModify</key>
+ <map>
+ <key>Comment</key>
+ <string>Newly created clothing or body part 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>WearablesNextOwnerTransfer</key>
+ <map>
+ <key>Comment</key>
+ <string>Newly created clothing or body part 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>WearablesEveryoneCopy</key>
+ <map>
+ <key>Comment</key>
+ <string>Everyone can copy the newly created clothing or body part</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>WearablesShareWithGroup</key>
+ <map>
+ <key>Comment</key>
+ <string>Newly created clothing or body part is shared with the currently active group</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>PathfindingRetrieveNeighboringRegion</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 325707bbf1..7d2b4f6269 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -47,6 +47,7 @@
#include "llfirstuse.h"
#include "llfloatercamera.h"
#include "llfloaterimcontainer.h"
+#include "llfloaterperms.h"
#include "llfloaterreg.h"
#include "llfloatertools.h"
#include "llgroupactions.h"
@@ -897,6 +898,9 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
// Update all of the regions.
LLWorld::getInstance()->updateAgentOffset(mAgentOriginGlobal);
+
+ // Send default object permissions to simulator
+ LLFloaterPermsDefault::updateCap(false);
}
// Pass new region along to metrics components that care about this level of detail.
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index fa810aac76..c741f6403d 100755
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -49,6 +49,7 @@
#include "llvoavatarself.h"
#include "llviewerwearable.h"
#include "llwearablelist.h"
+#include "llfloaterperms.h"
#include <boost/scoped_ptr.hpp>
@@ -65,6 +66,19 @@ void wear_and_edit_cb(const LLUUID& inv_item)
{
if (inv_item.isNull()) return;
+ LLViewerInventoryItem* item = gInventory.getItem(inv_item);
+ if (!item) return;
+
+ LLPermissions perm = item->getPermissions();
+ perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Wearables"));
+ perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Wearables"));
+ perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Wearables"));
+ item->setPermissions(perm);
+
+ item->updateServer(FALSE);
+ gInventory.updateItem(item);
+ gInventory.notifyObservers();
+
// Request editing the item after it gets worn.
gAgentWearables.requestEditingWearable(inv_item);
@@ -72,6 +86,28 @@ void wear_and_edit_cb(const LLUUID& inv_item)
LLAppearanceMgr::instance().wearItemOnAvatar(inv_item);
}
+class LLCreateWearableCallback : public LLInventoryCallback
+{
+ void fire(const LLUUID& inv_item)
+ {
+ if (inv_item.isNull())
+ return;
+
+ LLViewerInventoryItem* item = gInventory.getItem(inv_item);
+ if (!item) return;
+
+ LLPermissions perm = item->getPermissions();
+ perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Wearables"));
+ perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Wearables"));
+ perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Wearables"));
+ item->setPermissions(perm);
+
+ item->updateServer(FALSE);
+ gInventory.updateItem(item);
+ gInventory.notifyObservers();
+ }
+};
+
///////////////////////////////////////////////////////////////////////////////
// HACK: For EXT-3923: Pants item shows in inventory with skin icon and messes with "current look"
@@ -482,6 +518,7 @@ void LLAgentWearables::saveWearableAs(const LLWearableType::EType type,
LLViewerWearable* new_wearable = LLWearableList::instance().createCopy(
old_wearable,
trunc_name);
+
LLPointer<LLInventoryCallback> cb =
new addWearableToAgentInventoryCallback(
LLPointer<LLRefCount>(NULL),
@@ -1817,10 +1854,15 @@ void LLAgentWearables::createWearable(LLWearableType::EType type, bool wear, con
folder_id = gInventory.findCategoryUUIDForType(folder_type);
}
- create_inventory_item(gAgent.getID(), gAgent.getSessionID(),
- folder_id, wearable->getTransactionID(), wearable->getName(),
- wearable->getDescription(), asset_type, inv_type, wearable->getType(),
- wearable->getPermissions().getMaskNextOwner(),
+ create_inventory_item(gAgent.getID(),
+ gAgent.getSessionID(),
+ folder_id,
+ wearable->getTransactionID(),
+ wearable->getName(),
+ wearable->getDescription(),
+ asset_type, inv_type,
+ wearable->getType(),
+ LLFloaterPerms::getNextOwnerPerms("Wearables"),
cb);
}
diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp
index f2deb6a805..a992443ce1 100755
--- a/indra/newview/llfloaterbvhpreview.cpp
+++ b/indra/newview/llfloaterbvhpreview.cpp
@@ -1002,7 +1002,7 @@ void LLFloaterBvhPreview::onBtnOK(void* userdata)
0,
LLFolderType::FT_NONE,
LLInventoryType::IT_ANIMATION,
- LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(),
+ LLFloaterPerms::getNextOwnerPerms("Uploads"), LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"),
name,
callback, expected_upload_cost, userdata);
diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp
index 56051ff684..59f5b2b346 100755
--- a/indra/newview/llfloatergesture.cpp
+++ b/indra/newview/llfloatergesture.cpp
@@ -48,6 +48,7 @@
#include "llviewermenu.h"
#include "llviewerinventory.h"
#include "llviewercontrol.h"
+#include "llfloaterperms.h"
BOOL item_name_precedes( LLInventoryItem* a, LLInventoryItem* b )
{
@@ -74,6 +75,17 @@ public:
void fire(const LLUUID &inv_item)
{
LLPreviewGesture::show(inv_item, LLUUID::null);
+
+ LLInventoryItem* item = gInventory.getItem(inv_item);
+ if (item)
+ {
+ LLPermissions perm = item->getPermissions();
+ perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Gestures"));
+ perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Gestures"));
+ perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Gestures"));
+ item->setPermissions(perm);
+ item->updateServer(FALSE);
+ }
}
};
@@ -449,9 +461,17 @@ void LLFloaterGesture::onClickPlay()
void LLFloaterGesture::onClickNew()
{
LLPointer<LLInventoryCallback> cb = new GestureShowCallback();
- create_inventory_item(gAgent.getID(), gAgent.getSessionID(),
- LLUUID::null, LLTransactionID::tnull, "New Gesture", "", LLAssetType::AT_GESTURE,
- LLInventoryType::IT_GESTURE, NOT_WEARABLE, PERM_MOVE | PERM_TRANSFER, cb);
+ create_inventory_item(gAgent.getID(),
+ gAgent.getSessionID(),
+ LLUUID::null,
+ LLTransactionID::tnull,
+ "New Gesture",
+ "",
+ LLAssetType::AT_GESTURE,
+ LLInventoryType::IT_GESTURE,
+ NOT_WEARABLE,
+ PERM_MOVE | LLFloaterPerms::getNextOwnerPerms("Gestures"),
+ cb);
}
void LLFloaterGesture::onActivateBtnClick()
diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp
index 27b1c3b9cd..ee7f413a59 100755
--- a/indra/newview/llfloaternamedesc.cpp
+++ b/indra/newview/llfloaternamedesc.cpp
@@ -45,6 +45,7 @@
#include "lluictrlfactory.h"
#include "llstring.h"
#include "lleconomy.h"
+#include "llpermissions.h"
// linden includes
#include "llassetstorage.h"
@@ -167,11 +168,14 @@ void LLFloaterNameDesc::onBtnOK( )
S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass).
void *nruserdata = NULL;
std::string display_name = LLStringUtil::null;
+
upload_new_resource(mFilenameAndPath, // file
getChild<LLUICtrl>("name_form")->getValue().asString(),
getChild<LLUICtrl>("description_form")->getValue().asString(),
0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE,
- LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(),
+ LLFloaterPerms::getNextOwnerPerms("Uploads"),
+ LLFloaterPerms::getGroupPerms("Uploads"),
+ LLFloaterPerms::getEveryonePerms("Uploads"),
display_name, callback, expected_upload_cost, nruserdata);
closeFloater(false);
}
diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp
index 80b55c3cbb..dc4969f5e6 100755
--- a/indra/newview/llfloaterperms.cpp
+++ b/indra/newview/llfloaterperms.cpp
@@ -1,7 +1,7 @@
/**
* @file llfloaterperms.cpp
* @brief Asset creation permission preferences.
- * @author Coco
+ * @author Jonathan Yap
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
@@ -32,101 +32,202 @@
#include "llviewerwindow.h"
#include "lluictrlfactory.h"
#include "llpermissions.h"
-
+#include "llagent.h"
+#include "llviewerregion.h"
+#include "llnotificationsutil.h"
LLFloaterPerms::LLFloaterPerms(const LLSD& seed)
: LLFloater(seed)
{
- mCommitCallbackRegistrar.add("Perms.Copy", boost::bind(&LLFloaterPerms::onCommitCopy, this));
- mCommitCallbackRegistrar.add("Perms.OK", boost::bind(&LLFloaterPerms::onClickOK, this));
- mCommitCallbackRegistrar.add("Perms.Cancel", boost::bind(&LLFloaterPerms::onClickCancel, this));
-
}
BOOL LLFloaterPerms::postBuild()
{
- mCloseSignal.connect(boost::bind(&LLFloaterPerms::cancel, this));
-
+ return TRUE;
+}
+
+//static
+U32 LLFloaterPerms::getGroupPerms(std::string prefix)
+{
+ return gSavedSettings.getBOOL(prefix+"ShareWithGroup") ? PERM_COPY | PERM_MOVE | PERM_MODIFY : PERM_NONE;
+}
+
+//static
+U32 LLFloaterPerms::getEveryonePerms(std::string prefix)
+{
+ return gSavedSettings.getBOOL(prefix+"EveryoneCopy") ? PERM_COPY : PERM_NONE;
+}
+
+//static
+U32 LLFloaterPerms::getNextOwnerPerms(std::string prefix)
+{
+ U32 flags = PERM_MOVE;
+ if ( gSavedSettings.getBOOL(prefix+"NextOwnerCopy") )
+ {
+ flags |= PERM_COPY;
+ }
+ if ( gSavedSettings.getBOOL(prefix+"NextOwnerModify") )
+ {
+ flags |= PERM_MODIFY;
+ }
+ if ( gSavedSettings.getBOOL(prefix+"NextOwnerTransfer") )
+ {
+ flags |= PERM_TRANSFER;
+ }
+ return flags;
+}
+
+//static
+U32 LLFloaterPerms::getNextOwnerPermsInverted(std::string prefix)
+{
+ // Sets bits for permissions that are off
+ U32 flags = PERM_MOVE;
+ if ( !gSavedSettings.getBOOL(prefix+"NextOwnerCopy") )
+ {
+ flags |= PERM_COPY;
+ }
+ if ( !gSavedSettings.getBOOL(prefix+"NextOwnerModify") )
+ {
+ flags |= PERM_MODIFY;
+ }
+ if ( !gSavedSettings.getBOOL(prefix+"NextOwnerTransfer") )
+ {
+ flags |= PERM_TRANSFER;
+ }
+ return flags;
+}
+
+static bool mCapSent = false;
+
+LLFloaterPermsDefault::LLFloaterPermsDefault(const LLSD& seed)
+ : LLFloater(seed)
+{
+ mCommitCallbackRegistrar.add("PermsDefault.Copy", boost::bind(&LLFloaterPermsDefault::onCommitCopy, this, _2));
+ mCommitCallbackRegistrar.add("PermsDefault.OK", boost::bind(&LLFloaterPermsDefault::onClickOK, this));
+ mCommitCallbackRegistrar.add("PermsDefault.Cancel", boost::bind(&LLFloaterPermsDefault::onClickCancel, this));
+}
+
+
+// String equivalents of enum Categories - initialization order must match enum order!
+const std::string LLFloaterPermsDefault::sCategoryNames[CAT_LAST] =
+{
+ "Objects",
+ "Uploads",
+ "Scripts",
+ "Notecards",
+ "Gestures",
+ "Wearables"
+};
+
+
+BOOL LLFloaterPermsDefault::postBuild()
+{
+ mCloseSignal.connect(boost::bind(&LLFloaterPermsDefault::cancel, this));
+
refresh();
- return TRUE;
+ return true;
}
-void LLFloaterPerms::onClickOK()
+void LLFloaterPermsDefault::onClickOK()
{
ok();
closeFloater();
}
-void LLFloaterPerms::onClickCancel()
+void LLFloaterPermsDefault::onClickCancel()
{
cancel();
closeFloater();
}
-void LLFloaterPerms::onCommitCopy()
+void LLFloaterPermsDefault::onCommitCopy(const LLSD& user_data)
{
// Implements fair use
- BOOL copyable = gSavedSettings.getBOOL("NextOwnerCopy");
+ std::string prefix = user_data.asString();
+
+ BOOL copyable = gSavedSettings.getBOOL(prefix+"NextOwnerCopy");
if(!copyable)
{
- gSavedSettings.setBOOL("NextOwnerTransfer", TRUE);
+ gSavedSettings.setBOOL(prefix+"NextOwnerTransfer", TRUE);
}
- LLCheckBoxCtrl* xfer = getChild<LLCheckBoxCtrl>("next_owner_transfer");
+ LLCheckBoxCtrl* xfer = getChild<LLCheckBoxCtrl>(prefix+"_transfer");
xfer->setEnabled(copyable);
}
-void LLFloaterPerms::ok()
+class LLFloaterPermsResponder : public LLHTTPClient::Responder
{
- refresh(); // Changes were already applied to saved settings. Refreshing internal values makes it official.
-}
+public:
+ LLFloaterPermsResponder(): LLHTTPClient::Responder() {}
-void LLFloaterPerms::cancel()
-{
- gSavedSettings.setBOOL("ShareWithGroup", mShareWithGroup);
- gSavedSettings.setBOOL("EveryoneCopy", mEveryoneCopy);
- gSavedSettings.setBOOL("NextOwnerCopy", mNextOwnerCopy);
- gSavedSettings.setBOOL("NextOwnerModify", mNextOwnerModify);
- gSavedSettings.setBOOL("NextOwnerTransfer", mNextOwnerTransfer);
-}
+ void error(U32 status, const std::string& reason)
+ {
+ LLSD args;
+ args["REASON"] = reason;
+ LLNotificationsUtil::add("DefaultObjectPermissions", args);
+ }
+ void result(const LLSD& content)
+ {
+ LLFloaterPermsDefault::setCapSent(true);
+ LL_INFOS("FloaterPermsResponder") << "Sent default permissions to simulator" << LL_ENDL;
+ }
+};
-void LLFloaterPerms::refresh()
+void LLFloaterPermsDefault::updateCap(bool alwaysUpdate)
{
- mShareWithGroup = gSavedSettings.getBOOL("ShareWithGroup");
- mEveryoneCopy = gSavedSettings.getBOOL("EveryoneCopy");
- mNextOwnerCopy = gSavedSettings.getBOOL("NextOwnerCopy");
- mNextOwnerModify = gSavedSettings.getBOOL("NextOwnerModify");
- mNextOwnerTransfer = gSavedSettings.getBOOL("NextOwnerTransfer");
+ if(!alwaysUpdate && mCapSent)
+ {
+ return;
+ }
+
+ std::string object_url = gAgent.getRegion()->getCapability("DefaultObjectPermissions");
+
+ if(!object_url.empty())
+ {
+ LLSD report = LLSD::emptyMap();
+ report["Group"] = (LLSD::Integer)LLFloaterPerms::getGroupPerms(sCategoryNames[CAT_OBJECTS]);
+ report["Everyone"] = (LLSD::Integer)LLFloaterPerms::getEveryonePerms(sCategoryNames[CAT_OBJECTS]);
+ report["NextOwner"] = (LLSD::Integer)LLFloaterPerms::getNextOwnerPerms(sCategoryNames[CAT_OBJECTS]);
+ LLHTTPClient::post(object_url, report, new LLFloaterPermsResponder());
+ }
}
-//static
-U32 LLFloaterPerms::getGroupPerms(std::string prefix)
-{
- return gSavedSettings.getBOOL(prefix+"ShareWithGroup") ? PERM_COPY : PERM_NONE;
+void LLFloaterPermsDefault::setCapSent(bool cap_sent)
+{
+ mCapSent = cap_sent;
}
-//static
-U32 LLFloaterPerms::getEveryonePerms(std::string prefix)
+void LLFloaterPermsDefault::ok()
{
- return gSavedSettings.getBOOL(prefix+"EveryoneCopy") ? PERM_COPY : PERM_NONE;
+// Changes were already applied automatically to saved settings.
+// Refreshing internal values makes it official.
+ refresh();
+
+// We know some setting has changed but not which one. Just in case it was a setting for
+// object permissions tell the server what the values are.
+ updateCap(true);
}
-//static
-U32 LLFloaterPerms::getNextOwnerPerms(std::string prefix)
+void LLFloaterPermsDefault::cancel()
{
- U32 flags = PERM_MOVE;
- if ( gSavedSettings.getBOOL(prefix+"NextOwnerCopy") )
+ for (U32 iter = CAT_OBJECTS; iter < CAT_LAST; iter++)
{
- flags |= PERM_COPY;
- }
- if ( gSavedSettings.getBOOL(prefix+"NextOwnerModify") )
- {
- flags |= PERM_MODIFY;
+ gSavedSettings.setBOOL(sCategoryNames[iter]+"NextOwnerCopy", mNextOwnerCopy[iter]);
+ gSavedSettings.setBOOL(sCategoryNames[iter]+"NextOwnerModify", mNextOwnerModify[iter]);
+ gSavedSettings.setBOOL(sCategoryNames[iter]+"NextOwnerTransfer", mNextOwnerTransfer[iter]);
+ gSavedSettings.setBOOL(sCategoryNames[iter]+"ShareWithGroup", mShareWithGroup[iter]);
+ gSavedSettings.setBOOL(sCategoryNames[iter]+"EveryoneCopy", mEveryoneCopy[iter]);
}
- if ( gSavedSettings.getBOOL(prefix+"NextOwnerTransfer") )
+}
+
+void LLFloaterPermsDefault::refresh()
+{
+ for (U32 iter = CAT_OBJECTS; iter < CAT_LAST; iter++)
{
- flags |= PERM_TRANSFER;
+ mShareWithGroup[iter] = gSavedSettings.getBOOL(sCategoryNames[iter]+"ShareWithGroup");
+ mEveryoneCopy[iter] = gSavedSettings.getBOOL(sCategoryNames[iter]+"EveryoneCopy");
+ mNextOwnerCopy[iter] = gSavedSettings.getBOOL(sCategoryNames[iter]+"NextOwnerCopy");
+ mNextOwnerModify[iter] = gSavedSettings.getBOOL(sCategoryNames[iter]+"NextOwnerModify");
+ mNextOwnerTransfer[iter] = gSavedSettings.getBOOL(sCategoryNames[iter]+"NextOwnerTransfer");
}
- return flags;
}
-
diff --git a/indra/newview/llfloaterperms.h b/indra/newview/llfloaterperms.h
index 6b65f4b0cd..b4b5d58aa5 100755
--- a/indra/newview/llfloaterperms.h
+++ b/indra/newview/llfloaterperms.h
@@ -1,7 +1,7 @@
/**
* @file llfloaterperms.h
* @brief Asset creation permission preferences.
- * @author Coco
+ * @author Jonathan Yap
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
@@ -36,26 +36,56 @@ class LLFloaterPerms : public LLFloater
public:
/*virtual*/ BOOL postBuild();
- void ok();
- void cancel();
- void onClickOK();
- void onClickCancel();
- void onCommitCopy();
+
// Convenience methods to get current permission preference bitfields from saved settings:
static U32 getEveryonePerms(std::string prefix=""); // prefix + "EveryoneCopy"
static U32 getGroupPerms(std::string prefix=""); // prefix + "ShareWithGroup"
static U32 getNextOwnerPerms(std::string prefix=""); // bitfield for prefix + "NextOwner" + "Copy", "Modify", and "Transfer"
+ static U32 getNextOwnerPermsInverted(std::string prefix="");
private:
LLFloaterPerms(const LLSD& seed);
+
+};
+
+class LLFloaterPermsDefault : public LLFloater
+{
+ friend class LLFloaterReg;
+
+public:
+ /*virtual*/ BOOL postBuild();
+ void ok();
+ void cancel();
+ void onClickOK();
+ void onClickCancel();
+ void onCommitCopy(const LLSD& user_data);
+ static void updateCap(bool alwaysUpdate);
+ static void setCapSent(bool cap_sent);
+
+// Update instantiation of sCategoryNames in the .cpp file to match if you change this!
+enum Categories
+{
+ CAT_OBJECTS,
+ CAT_UPLOADS,
+ CAT_SCRIPTS,
+ CAT_NOTECARDS,
+ CAT_GESTURES,
+ CAT_WEARABLES,
+ CAT_LAST
+};
+
+private:
+ LLFloaterPermsDefault(const LLSD& seed);
void refresh();
- BOOL // cached values only for implementing cancel.
- mShareWithGroup,
- mEveryoneCopy,
- mNextOwnerCopy,
- mNextOwnerModify,
- mNextOwnerTransfer;
+ static const std::string sCategoryNames[CAT_LAST];
+
+ // cached values only for implementing cancel.
+ bool mShareWithGroup[CAT_LAST];
+ bool mEveryoneCopy[CAT_LAST];
+ bool mNextOwnerCopy[CAT_LAST];
+ bool mNextOwnerModify[CAT_LAST];
+ bool mNextOwnerTransfer[CAT_LAST];
};
#endif
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 87ae36716d..b5976cbc99 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -346,6 +346,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.Proxy", boost::bind(&LLFloaterPreference::onClickProxySettings, this));
mCommitCallbackRegistrar.add("Pref.TranslationSettings", boost::bind(&LLFloaterPreference::onClickTranslationSettings, this));
mCommitCallbackRegistrar.add("Pref.AutoReplace", boost::bind(&LLFloaterPreference::onClickAutoReplace, this));
+ mCommitCallbackRegistrar.add("Pref.PermsDefault", boost::bind(&LLFloaterPreference::onClickPermsDefault, this));
mCommitCallbackRegistrar.add("Pref.SpellChecker", boost::bind(&LLFloaterPreference::onClickSpellChecker, this));
sSkin = gSavedSettings.getString("SkinCurrent");
@@ -1682,6 +1683,11 @@ void LLFloaterPreference::onClickActionChange()
mClickActionDirty = true;
}
+void LLFloaterPreference::onClickPermsDefault()
+{
+ LLFloaterReg::showInstance("perms_default");
+}
+
void LLFloaterPreference::onDeleteTranscripts()
{
LLSD args;
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index cb180f6f1e..e287631b1a 100755
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -164,6 +164,7 @@ public:
void onClickBlockList();
void onClickProxySettings();
void onClickTranslationSettings();
+ void onClickPermsDefault();
void onClickAutoReplace();
void onClickSpellChecker();
void applyUIColor(LLUICtrl* ctrl, const LLSD& param);
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 2e02805c02..ff73c42ec9 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -1497,9 +1497,9 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
result["asset_type"] = "mesh";
result["inventory_type"] = "object";
result["description"] = "(No Description)";
- result["next_owner_mask"] = LLSD::Integer(LLFloaterPerms::getNextOwnerPerms());
- result["group_mask"] = LLSD::Integer(LLFloaterPerms::getGroupPerms());
- result["everyone_mask"] = LLSD::Integer(LLFloaterPerms::getEveryonePerms());
+ result["next_owner_mask"] = LLSD::Integer(LLFloaterPerms::getNextOwnerPerms("Uploads"));
+ result["group_mask"] = LLSD::Integer(LLFloaterPerms::getGroupPerms("Uploads"));
+ result["everyone_mask"] = LLSD::Integer(LLFloaterPerms::getEveryonePerms("Uploads"));
res["mesh_list"] = LLSD::emptyArray();
res["texture_list"] = LLSD::emptyArray();
diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp
index 1a427338e5..697841ab88 100755
--- a/indra/newview/llpanelcontents.cpp
+++ b/indra/newview/llpanelcontents.cpp
@@ -59,6 +59,7 @@
#include "llviewerregion.h"
#include "llviewerwindow.h"
#include "llworld.h"
+#include "llfloaterperms.h"
//
// Imported globals
@@ -156,12 +157,15 @@ void LLPanelContents::onClickNewScript(void *userdata)
{
LLPermissions perm;
perm.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null);
+
+ // Parameters are base, owner, everyone, group, next
perm.initMasks(
PERM_ALL,
PERM_ALL,
- PERM_NONE,
- PERM_NONE,
- PERM_MOVE | PERM_TRANSFER);
+ // *NOTE: this does not work, needs server change
+ LLFloaterPerms::getEveryonePerms("Scripts"),
+ LLFloaterPerms::getGroupPerms("Scripts"),
+ PERM_MOVE | LLFloaterPerms::getNextOwnerPerms("Scripts"));
std::string desc;
LLViewerAssetType::generateDescriptionFor(LLAssetType::AT_LSL_TEXT, desc);
LLPointer<LLViewerInventoryItem> new_item =
@@ -179,6 +183,8 @@ void LLPanelContents::onClickNewScript(void *userdata)
time_corrected());
object->saveScript(new_item, TRUE, true);
+ std::string name = new_item->getName();
+
// *NOTE: In order to resolve SL-22177, we needed to create
// the script first, and then you have to click it in
// inventory to edit it.
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 4ce049df03..3d0eb0c6e7 100755
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -261,6 +261,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("pathfinding_linksets", "floater_pathfinding_linksets.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPathfindingLinksets>);
LLFloaterReg::add("pathfinding_console", "floater_pathfinding_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPathfindingConsole>);
LLFloaterReg::add("people", "floater_people.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
+ LLFloaterReg::add("perms_default", "floater_perms_default.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPermsDefault>);
LLFloaterReg::add("places", "floater_places.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>);
LLFloaterReg::add("prefs_proxy", "floater_preferences_proxy.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreferenceProxy>);
@@ -269,7 +270,6 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("prefs_translation", "floater_translation_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTranslationSettings>);
LLFloaterReg::add("prefs_spellchecker", "floater_spellcheck.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSpellCheckerSettings>);
LLFloaterReg::add("prefs_autoreplace", "floater_autoreplace.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAutoReplaceSettings>);
- LLFloaterReg::add("perm_prefs", "floater_perm_prefs.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPerms>);
LLFloaterReg::add("picks", "floater_picks.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
LLFloaterReg::add("pref_joystick", "floater_joystick.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterJoystick>);
LLFloaterReg::add("preview_anim", "floater_preview_animation.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewAnim>, "preview");
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index be78603e2d..16e75a4ad7 100755
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -442,9 +442,9 @@ class LLFileUploadBulk : public view_listener_t
0,
LLFolderType::FT_NONE,
LLInventoryType::IT_NONE,
- LLFloaterPerms::getNextOwnerPerms(),
- LLFloaterPerms::getGroupPerms(),
- LLFloaterPerms::getEveryonePerms(),
+ LLFloaterPerms::getNextOwnerPerms("Uploads"),
+ LLFloaterPerms::getGroupPerms("Uploads"),
+ LLFloaterPerms::getEveryonePerms("Uploads"),
display_name,
callback,
expected_upload_cost,
@@ -1004,9 +1004,9 @@ void upload_done_callback(
0,
LLFolderType::FT_NONE,
LLInventoryType::IT_NONE,
- PERM_NONE,
- PERM_NONE,
- PERM_NONE,
+ LLFloaterPerms::getNextOwnerPerms("Uploads"),
+ LLFloaterPerms::getGroupPerms("Uploads"),
+ LLFloaterPerms::getEveryonePerms("Uploads"),
display_name,
callback,
expected_upload_cost, // assuming next in a group of uploads is of roughly the same type, i.e. same upload cost
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 1544e66431..7de72dc2cd 100755
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -100,6 +100,7 @@
#include "lltrans.h"
#include "llsdutil.h"
#include "llmediaentry.h"
+#include "llfloaterperms.h"
//#define DEBUG_UPDATE_TYPE
@@ -2503,6 +2504,7 @@ void LLViewerObject::saveScript(
* interaction with doUpdateInventory() called below.
*/
lldebugs << "LLViewerObject::saveScript() " << item->getUUID() << " " << item->getAssetUUID() << llendl;
+
LLPointer<LLViewerInventoryItem> task_item =
new LLViewerInventoryItem(item->getUUID(), mID, item->getPermissions(),
item->getAssetUUID(), item->getType(),
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index b4e287c446..34d36dd887 100755
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -76,6 +76,7 @@
#include "object_flags.h"
#include "llappviewer.h"
+#include "llfloaterperms.h"
extern F32 gMinObjectDistance;
extern BOOL gAnimateTextures;
@@ -265,6 +266,17 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
// llinfos << "DEBUG selecting " << objectp->mID << " "
// << objectp->mLocalID << llendl;
LLSelectMgr::getInstance()->selectObjectAndFamily(objectp);
+
+ // This is a bit of a hack. Because the server ensures one of either COPY or TRANSFER is always be on
+ // to set the bits we want it is first necessary to set them all on and then clear the ones that
+ // are not needed.
+ LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_NEXT_OWNER, TRUE, PERM_COPY | PERM_MODIFY | PERM_TRANSFER);
+ LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_NEXT_OWNER, FALSE, LLFloaterPerms::getNextOwnerPermsInverted("Objects"));
+
+ LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_EVERYONE, TRUE, LLFloaterPerms::getEveryonePerms("Objects"));
+
+ LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_GROUP, TRUE, LLFloaterPerms::getGroupPerms("Objects"));
+
dialog_refresh_all();
}
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 379638ef19..c6e67355c3 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -71,6 +71,7 @@
#include "stringize.h"
#include "llviewercontrol.h"
#include "llsdserialize.h"
+#include "llfloaterperms.h"
#ifdef LL_WINDOWS
#pragma warning(disable:4355)
@@ -1572,6 +1573,10 @@ void LLViewerRegion::unpackRegionHandshake()
msg->nextBlock("RegionInfo");
msg->addU32("Flags", 0x0 );
msg->sendReliable(host);
+
+ // Supplying false in this call means only send the default permissions to the simulator if
+ // it has never been sent. Once this data is sent the simulator will pass this data to new
+ // simulators as the agent moves around.
}
void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
@@ -1583,6 +1588,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("ChatSessionRequest");
capabilityNames.append("CopyInventoryFromNotecard");
capabilityNames.append("CreateInventoryCategory");
+ capabilityNames.append("DefaultObjectPermissions");
capabilityNames.append("DispatchRegionInfo");
capabilityNames.append("EnvironmentSettings");
capabilityNames.append("EstateChangeInfo");
diff --git a/indra/newview/skins/default/xui/en/floater_perm_prefs.xml b/indra/newview/skins/default/xui/en/floater_perm_prefs.xml
deleted file mode 100755
index ff454e3ebf..0000000000
--- a/indra/newview/skins/default/xui/en/floater_perm_prefs.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater
- legacy_header_height="18"
- height="180"
- layout="topleft"
- name="perm prefs"
- help_topic="perm_prefs"
- save_rect="true"
- title="DEFAULT UPLOAD PERMISSIONS"
- width="315">
- <panel
- follows="left|top|right|bottom"
- height="120"
- label="Permissions"
- layout="topleft"
- left="10"
- name="permissions"
- top="20"
- width="315">
- <check_box
- control_name="ShareWithGroup"
- height="16"
- label="Share with group"
- layout="topleft"
- left="10"
- name="share_with_group"
- top="5"
- width="150" />
- <check_box
- control_name="EveryoneCopy"
- height="16"
- label="Allow anyone to copy"
- layout="topleft"
- left_delta="0"
- name="everyone_copy"
- top_pad="5"
- width="150" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left_delta="0"
- name="NextOwnerLabel"
- top_pad="5"
- width="200">
- Next owner can:
- </text>
- <check_box
- control_name="NextOwnerModify"
- height="16"
- label="Modify"
- layout="topleft"
- left_delta="0"
- name="next_owner_modify"
- top_pad="5"
- width="150" />
- <check_box
- control_name="NextOwnerCopy"
- height="16"
- label="Copy"
- layout="topleft"
- left_delta="0"
- name="next_owner_copy"
- top_pad="5"
- width="150" >
- <check_box.commit_callback
- function="Perms.Copy" />
- </check_box>
- <check_box
- enabled_control="NextOwnerCopy"
- control_name="NextOwnerTransfer"
- enabled="false"
- height="16"
- initial_value="true"
- label="Resell/Give away"
- layout="topleft"
- left_delta="0"
- name="next_owner_transfer"
- top_pad="5"
- width="150" />
- </panel>
- <button
- height="20"
- label="OK"
- label_selected="OK"
- layout="topleft"
- left="90"
- name="ok"
- top="150"
- width="100">
- <button.commit_callback
- function="Perms.OK" />
- </button>
- <button
- height="20"
- label="Cancel"
- label_selected="Cancel"
- layout="topleft"
- left_pad="5"
- name="cancel"
- top_delta="0"
- width="100">
- <button.commit_callback
- function="Perms.Cancel" />
- </button>
-</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_perms_default.xml b/indra/newview/skins/default/xui/en/floater_perms_default.xml
new file mode 100644
index 0000000000..9c3b92bc83
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_perms_default.xml
@@ -0,0 +1,505 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ legacy_header_height="18"
+ height="250"
+ layout="topleft"
+ name="perms default"
+ help_topic="perms_default"
+ save_rect="true"
+ title="DEFAULT CREATION PERMISSIONS"
+ width="700">
+ <panel
+ follows="left|top|right|bottom"
+ height="200"
+ label="Default Permissions"
+ layout="topleft"
+ left="10"
+ name="default permissions"
+ top="20"
+ width="690">
+
+ <view_border
+ bevel_style="none"
+ height="18"
+ top="8"
+ left="0"
+ width="430" />
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ halign="right"
+ layout="topleft"
+ left="0"
+ top="10"
+ width="115">
+ Next owner:
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ halign="center"
+ layout="topleft"
+ left_pad="5"
+ top="10"
+ width="100">
+ Copy
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ halign="center"
+ layout="topleft"
+ left_pad="5"
+ top="10"
+ width="100">
+ Modify
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ halign="center"
+ layout="topleft"
+ left_pad="5"
+ top="10"
+ width="100">
+ Transfer
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="32"
+ halign="center"
+ layout="topleft"
+ left_pad="5"
+ top="10"
+ word_wrap="true"
+ width="100">
+ Share with group
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="32"
+ halign="center"
+ layout="topleft"
+ left_pad="5"
+ top="10"
+ word_wrap="true"
+ width="120">
+ Allow anyone to copy
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="0"
+ top_pad="10"
+ tool_tip="Set default permissions for when Objects are created"
+ width="100">
+ Objects
+ </text>
+ <icon
+ follows="left|top"
+ height="16"
+ image_name="Inv_Object"
+ layout="topleft"
+ left_pad="2"
+ width="18"/>
+ <check_box
+ control_name="ObjectsNextOwnerCopy"
+ height="16"
+ layout="topleft"
+ name="objects_c"
+ left_pad="45"
+ top_delta="0"
+ width="100">
+ <check_box.commit_callback
+ function="PermsDefault.Copy"
+ parameter="Objects" />
+ </check_box>
+ <check_box
+ control_name="ObjectsNextOwnerModify"
+ height="16"
+ layout="topleft"
+ name="objects_m"
+ left_pad="0"
+ top_delta="0"
+ width="100" />
+ <check_box
+ enabled_control="ObjectsNextOwnerCopy"
+ control_name="ObjectsNextOwnerTransfer"
+ height="16"
+ layout="topleft"
+ name="Objects_transfer"
+ left_pad="0"
+ top_delta="0"
+ width="100" />
+ <check_box
+ control_name="ObjectsShareWithGroup"
+ height="16"
+ layout="topleft"
+ name="objects_s"
+ left_pad="0"
+ top_delta="0"
+ width="120" />
+ <check_box
+ control_name="ObjectsEveryoneCopy"
+ height="16"
+ layout="topleft"
+ name="objects_a"
+ left_pad="0"
+ top_delta="0"
+ width="100" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="0"
+ tool_tip="Set default permissions for uploaded items"
+ width="100">
+ Uploads
+ </text>
+ <icon
+ follows="left|top"
+ height="16"
+ image_name="Inv_Texture"
+ layout="topleft"
+ left_pad="2"
+ width="18"/>
+ <check_box
+ control_name="UploadsNextOwnerCopy"
+ height="16"
+ layout="topleft"
+ name="uploads_c"
+ left_pad="45"
+ top_delta="0"
+ width="100">
+ <check_box.commit_callback
+ function="PermsDefault.Copy"
+ parameter="Uploads" />
+ </check_box>
+ <check_box
+ control_name="UploadsNextOwnerModify"
+ height="16"
+ layout="topleft"
+ name="uploads_m"
+ left_pad="0"
+ top_delta="0"
+ width="100" />
+ <check_box
+ enabled_control="UploadsNextOwnerCopy"
+ control_name="UploadsNextOwnerTransfer"
+ height="16"
+ layout="topleft"
+ name="Uploads_transfer"
+ left_pad="0"
+ top_delta="0"
+ width="100" />
+ <check_box
+ control_name="UploadsShareWithGroup"
+ height="16"
+ layout="topleft"
+ name="uploads_s"
+ left_pad="0"
+ top_delta="0"
+ width="120" />
+ <check_box
+ control_name="UploadsEveryoneCopy"
+ height="16"
+ layout="topleft"
+ name="uploads_a"
+ left_pad="0"
+ top_delta="0"
+ width="100" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="0"
+ tool_tip="Set default permissions for when Scripts are created"
+ width="100">
+ Scripts
+ </text>
+ <icon
+ follows="left|top"
+ height="16"
+ image_name="Inv_Script"
+ layout="topleft"
+ left_pad="2"
+ width="18"/>
+ <check_box
+ control_name="ScriptsNextOwnerCopy"
+ height="16"
+ layout="topleft"
+ name="scripts_c"
+ left_pad="45"
+ top_delta="0"
+ width="100">
+ <check_box.commit_callback
+ function="PermsDefault.Copy"
+ parameter="Scripts" />
+ </check_box>
+ <check_box
+ control_name="ScriptsNextOwnerModify"
+ height="16"
+ layout="topleft"
+ name="scripts_m"
+ left_pad="0"
+ top_delta="0"
+ width="100" />
+ <check_box
+ enabled_control="ScriptsNextOwnerCopy"
+ control_name="ScriptsNextOwnerTransfer"
+ height="16"
+ layout="topleft"
+ name="Scripts_transfer"
+ left_pad="0"
+ top_delta="0"
+ width="100" />
+ <check_box
+ control_name="ScriptsShareWithGroup"
+ height="16"
+ layout="topleft"
+ name="scripts_s"
+ left_pad="0"
+ top_delta="0"
+ width="120" />
+ <check_box
+ control_name="ScriptsEveryoneCopy"
+ height="16"
+ layout="topleft"
+ name="scripts_a"
+ left_pad="0"
+ top_delta="0"
+ width="100" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="0"
+ tool_tip="Set default permissions for when Notecards are created"
+ width="100">
+ Notecards
+ </text>
+ <icon
+ follows="left|top"
+ height="16"
+ image_name="Inv_Notecard"
+ layout="topleft"
+ left_pad="2"
+ width="18"/>
+ <check_box
+ control_name="NotecardsNextOwnerCopy"
+ height="16"
+ layout="topleft"
+ name="notecards_c"
+ left_pad="45"
+ top_delta="0"
+ width="100">
+ <check_box.commit_callback
+ function="PermsDefault.Copy"
+ parameter="Notecards" />
+ </check_box>
+ <check_box
+ control_name="NotecardsNextOwnerModify"
+ height="16"
+ layout="topleft"
+ name="notecards_m"
+ left_pad="0"
+ top_delta="0"
+ width="100" />
+ <check_box
+ enabled_control="NotecardsNextOwnerCopy"
+ control_name="NotecardsNextOwnerTransfer"
+ height="16"
+ layout="topleft"
+ name="Notecards_transfer"
+ left_pad="0"
+ top_delta="0"
+ width="100" />
+ <check_box
+ control_name="NotecardsShareWithGroup"
+ height="16"
+ layout="topleft"
+ name="notecards_s"
+ left_pad="0"
+ top_delta="0"
+ width="120" />
+ <check_box
+ control_name="NotecardsEveryoneCopy"
+ height="16"
+ layout="topleft"
+ name="notecards_a"
+ left_pad="0"
+ top_delta="0"
+ width="100" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="0"
+ tool_tip="Set default permissions for when Gestures are created"
+ width="100">
+ Gestures
+ </text>
+ <icon
+ follows="left|top"
+ height="16"
+ image_name="Inv_Gesture"
+ layout="topleft"
+ left_pad="2"
+ width="18"/>
+ <check_box
+ control_name="GesturesNextOwnerCopy"
+ height="16"
+ layout="topleft"
+ name="gestures_c"
+ left_pad="45"
+ top_delta="0"
+ width="100">
+ <check_box.commit_callback
+ function="PermsDefault.Copy"
+ parameter="Gestures" />
+ </check_box>
+ <check_box
+ control_name="GesturesNextOwnerModify"
+ height="16"
+ layout="topleft"
+ name="gestures_m"
+ left_pad="0"
+ top_delta="0"
+ width="100" />
+ <check_box
+ enabled_control="GesturesNextOwnerCopy"
+ control_name="GesturesNextOwnerTransfer"
+ height="16"
+ layout="topleft"
+ name="Gestures_transfer"
+ left_pad="0"
+ top_delta="0"
+ width="100" />
+ <check_box
+ control_name="GesturesShareWithGroup"
+ height="16"
+ layout="topleft"
+ name="gestures_s"
+ left_pad="0"
+ top_delta="0"
+ width="120" />
+ <check_box
+ control_name="GesturesEveryoneCopy"
+ height="16"
+ layout="topleft"
+ name="gestures_a"
+ left_pad="0"
+ top_delta="0"
+ width="100" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="0"
+ tool_tip="Set default permissions for when Clothing or Body Parts are created"
+ width="100">
+ Wearables
+ </text>
+ <icon
+ follows="left|top"
+ height="16"
+ image_name="Inv_BodyShape"
+ layout="topleft"
+ left_pad="2"
+ width="18"/>
+ <check_box
+ control_name="WearablesNextOwnerCopy"
+ height="16"
+ layout="topleft"
+ name="wearables_c"
+ left_pad="45"
+ top_delta="0"
+ width="100">
+ <check_box.commit_callback
+ function="PermsDefault.Copy"
+ parameter="Wearables" />
+ </check_box>
+ <check_box
+ control_name="WearablesNextOwnerModify"
+ height="16"
+ layout="topleft"
+ name="wearables_m"
+ left_pad="0"
+ top_delta="0"
+ width="100" />
+ <check_box
+ enabled_control="WearablesNextOwnerCopy"
+ control_name="WearablesNextOwnerTransfer"
+ height="16"
+ layout="topleft"
+ name="Wearables_transfer"
+ left_pad="0"
+ top_delta="0"
+ width="100" />
+ <check_box
+ control_name="WearablesShareWithGroup"
+ height="16"
+ layout="topleft"
+ name="wearables_s"
+ left_pad="0"
+ top_delta="0"
+ width="120" />
+ <check_box
+ control_name="WearablesEveryoneCopy"
+ height="16"
+ layout="topleft"
+ name="wearables_a"
+ left_pad="0"
+ top_delta="0"
+ width="100" />
+ </panel>
+ <button
+ height="20"
+ label="OK"
+ label_selected="OK"
+ layout="topleft"
+ name="ok"
+ left="480"
+ width="100">
+ <button.commit_callback
+ function="PermsDefault.OK" />
+ </button>
+ <button
+ height="20"
+ label="Cancel"
+ label_selected="Cancel"
+ layout="topleft"
+ left_pad="5"
+ name="cancel"
+ top_delta="0"
+ width="100">
+ <button.commit_callback
+ function="PermsDefault.Cancel" />
+ </button>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/menu_inventory_add.xml b/indra/newview/skins/default/xui/en/menu_inventory_add.xml
index 29720a680b..afeb1bf226 100755
--- a/indra/newview/skins/default/xui/en/menu_inventory_add.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory_add.xml
@@ -63,13 +63,6 @@
function="File.UploadBulk"
parameter="" />
</menu_item_call>
- <menu_item_call
- label="Set Default Upload Permissions"
- name="perm prefs">
- <menu_item_call.on_click
- function="Floater.Toggle"
- parameter="perm_prefs" />
- </menu_item_call>
</menu>
<menu_item_call
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 95a7839337..554c7c95e4 100755
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -1264,13 +1264,6 @@
function="File.UploadBulk"
parameter="" />
</menu_item_call>
- <menu_item_call
- label="Set Default Upload Permissions"
- name="perm prefs">
- <menu_item_call.on_click
- function="Floater.Toggle"
- parameter="perm_prefs" />
- </menu_item_call>
</menu>
<menu_item_separator/>
<menu_item_call
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 964deb35a7..1ab665edd4 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -10209,5 +10209,16 @@ Cannot create large prims that intersect other players. Please re-try when othe
name="okignore"
yestext="OK"/>
</notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="DefaultObjectPermissions"
+ type="alert">
+ There was a problem saving the default permissions due to the following reason: [REASON]. Please try setting the default permissions later.
+ <tag>fail</tag>
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
+ </notification>
</notifications>
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
index 50fd57494f..335f1614d8 100755
--- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
@@ -222,4 +222,15 @@
name="show_develop_menu_check"
top_pad="5"
width="237"/>
+ <button
+ height="20"
+ label="Default Creation Permissions"
+ layout="topleft"
+ name="Default Creation Permissions"
+ left="30"
+ top_pad = "20"
+ width="250">
+ <button.commit_callback
+ function="Pref.PermsDefault" />
+ </button>
</panel>