diff options
-rw-r--r-- | indra/newview/llagentwearables.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llfloatergesture.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llfloaterperms.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpanelcontents.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llviewerobject.cpp | 11 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_perm_prefs.xml | 108 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_perms_default.xml | 23 |
8 files changed, 20 insertions, 150 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 7017357346..654a785a1a 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -66,21 +66,18 @@ class LLWearAndEditCallback : public LLInventoryCallback { void fire(const LLUUID& inv_item) { -llwarns << "DBG 1" << llendl; if (inv_item.isNull()) return; -llwarns << "DBG 2" << llendl; LLViewerInventoryItem* item = gInventory.getItem(inv_item); if (!item) return; -llwarns << "DBG 3" << llendl; LLPermissions perm = item->getPermissions(); perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Wearables")); perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Wearables")); perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Wearables")); item->setPermissions(perm); -llwarns << "DBG 4" << llendl; + item->updateServer(FALSE); gInventory.updateItem(item); gInventory.notifyObservers(); @@ -108,6 +105,7 @@ class LLCreateWearableCallback : public LLInventoryCallback perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Wearables")); item->setPermissions(perm); + item->updateServer(FALSE); gInventory.updateItem(item); gInventory.notifyObservers(); } @@ -521,6 +519,7 @@ void LLAgentWearables::saveWearableAs(const LLWearableType::EType type, LLWearable* new_wearable = LLWearableList::instance().createCopy( old_wearable, trunc_name); + LLPointer<LLInventoryCallback> cb = new addWearableToAgentInventoryCallback( LLPointer<LLRefCount>(NULL), diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index dcc245ee20..59f5b2b346 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -84,6 +84,7 @@ public: perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Gestures")); perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Gestures")); item->setPermissions(perm); + item->updateServer(FALSE); } } }; diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index 3853dd0ef6..4e9acfc780 100644 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -47,7 +47,7 @@ BOOL LLFloaterPerms::postBuild() //static U32 LLFloaterPerms::getGroupPerms(std::string prefix) { - return gSavedSettings.getBOOL(prefix+"ShareWithGroup") ? PERM_COPY : PERM_NONE; + return gSavedSettings.getBOOL(prefix+"ShareWithGroup") ? PERM_COPY | PERM_MOVE | PERM_MODIFY : PERM_NONE; } //static diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index db4b679c50..ac0cf460c0 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -183,6 +183,16 @@ void LLPanelContents::onClickNewScript(void *userdata) time_corrected()); object->saveScript(new_item, TRUE, true); + std::string name = new_item->getName(); +llwarns << "DBG " << new_item->getUUID() << llendl; + +// LLPermissions perm = new_item->getPermissions(); + perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Scripts")); + perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Scripts")); + perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Scripts")); + new_item->setPermissions(perm); + + // *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/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 83a195738a..a7ba150294 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1025,9 +1025,9 @@ void CreateScriptCallback::fire(const LLUUID& inv_item) LLPermissions perm = item->getPermissions(); perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Scripts")); perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Scripts")); - item->setPermissions(perm); + item->updateServer(FALSE); gInventory.updateItem(item); gInventory.notifyObservers(); } @@ -1047,8 +1047,9 @@ void CreateGestureCallback::fire(const LLUUID& inv_item) perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Gestures")); item->setPermissions(perm); - gInventory.updateItem(item); - gInventory.notifyObservers(); + item->updateServer(FALSE); + gInventory.updateItem(item); + gInventory.notifyObservers(); LLPreviewGesture* preview = LLPreviewGesture::show(inv_item, LLUUID::null); // Force to be entirely onscreen. @@ -1068,6 +1069,7 @@ void CreateNotecardCallback::fire(const LLUUID& inv_item) perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Notecards")); item->setPermissions(perm); + item->updateServer(FALSE); gInventory.updateItem(item); gInventory.notifyObservers(); } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 57549e025c..ff714f24b4 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2555,17 +2555,6 @@ void LLViewerObject::doUpdateInventory( doInventoryCallback(); ++mInventorySerialNum; } - - if(is_new && mInventory) - { - std::string name = item->getName(); -llwarns << "DBG " << name << llendl; - LLPermissions perm = item->getPermissions(); - perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Scripts")); - perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Scripts")); - perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Scripts")); - item->setPermissions(perm); - } } // save a script, which involves removing the old one, and rezzing 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 100644 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 index ac19be8d15..15077330fd 100644 --- a/indra/newview/skins/default/xui/en/floater_perms_default.xml +++ b/indra/newview/skins/default/xui/en/floater_perms_default.xml @@ -8,7 +8,6 @@ save_rect="true" title="DEFAULT CREATION PERMISSIONS" width="700"> - <panel follows="left|top|right|bottom" height="200" @@ -18,7 +17,6 @@ name="default permissions" top="20" width="690"> - <text type="string" length="1" @@ -31,7 +29,6 @@ width="100"> Copy </text> - <text type="string" length="1" @@ -44,7 +41,6 @@ width="100"> Modify </text> - <text type="string" length="1" @@ -57,7 +53,6 @@ width="100"> Transfer </text> - <text type="string" length="1" @@ -71,7 +66,6 @@ width="100"> Share with group </text> - <text type="string" length="1" @@ -85,8 +79,6 @@ width="120"> Allow anyone to copy </text> - - <text type="string" length="1" @@ -106,7 +98,6 @@ layout="topleft" left_pad="2" width="18"/> - <check_box control_name="ObjectsNextOwnerCopy" height="16" @@ -152,7 +143,6 @@ left_pad="0" top_delta="0" width="100" /> - <text type="string" length="1" @@ -171,7 +161,6 @@ layout="topleft" left_pad="2" width="18"/> - <check_box control_name="UploadsNextOwnerCopy" height="16" @@ -217,7 +206,6 @@ left_pad="0" top_delta="0" width="100" /> - <text type="string" length="1" @@ -236,7 +224,6 @@ layout="topleft" left_pad="2" width="18"/> - <check_box control_name="ScriptsNextOwnerCopy" height="16" @@ -282,7 +269,6 @@ left_pad="0" top_delta="0" width="100" /> - <text type="string" length="1" @@ -301,7 +287,6 @@ layout="topleft" left_pad="2" width="18"/> - <check_box control_name="NotecardsNextOwnerCopy" height="16" @@ -347,7 +332,6 @@ left_pad="0" top_delta="0" width="100" /> - <text type="string" length="1" @@ -366,7 +350,6 @@ layout="topleft" left_pad="2" width="18"/> - <check_box control_name="GesturesNextOwnerCopy" height="16" @@ -412,8 +395,6 @@ left_pad="0" top_delta="0" width="100" /> - - <text type="string" length="1" @@ -432,7 +413,6 @@ layout="topleft" left_pad="2" width="18"/> - <check_box control_name="WearablesNextOwnerCopy" height="16" @@ -478,9 +458,7 @@ left_pad="0" top_delta="0" width="100" /> - </panel> - <button height="20" label="OK" @@ -492,7 +470,6 @@ <button.commit_callback function="PermsDefault.OK" /> </button> - <button height="20" label="Cancel" |