diff options
Diffstat (limited to 'linden/indra/newview/llfloaterbulkpermission.cpp')
-rw-r--r-- | linden/indra/newview/llfloaterbulkpermission.cpp | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/linden/indra/newview/llfloaterbulkpermission.cpp b/linden/indra/newview/llfloaterbulkpermission.cpp index d4e1e98..6721661 100644 --- a/linden/indra/newview/llfloaterbulkpermission.cpp +++ b/linden/indra/newview/llfloaterbulkpermission.cpp | |||
@@ -281,6 +281,35 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, Invent | |||
281 | LLInventoryItem* item = (LLInventoryItem*)((LLInventoryObject*)(*it)); | 281 | LLInventoryItem* item = (LLInventoryItem*)((LLInventoryObject*)(*it)); |
282 | LLViewerInventoryItem* new_item = (LLViewerInventoryItem*)item; | 282 | LLViewerInventoryItem* new_item = (LLViewerInventoryItem*)item; |
283 | LLPermissions perm(new_item->getPermissions()); | 283 | LLPermissions perm(new_item->getPermissions()); |
284 | U32 flags = new_item->getFlags(); | ||
285 | |||
286 | U32 desired_next_owner_perms = LLFloaterPerms::getNextOwnerPerms("BulkChange"); | ||
287 | U32 desired_everyone_perms = LLFloaterPerms::getEveryonePerms("BulkChange"); | ||
288 | U32 desired_group_perms = LLFloaterPerms::getGroupPerms("BulkChange"); | ||
289 | |||
290 | // If next owner permissions have changed (and this is an object) | ||
291 | // then set the slam permissions flag so that they are applied on rez. | ||
292 | if((perm.getMaskNextOwner() != desired_next_owner_perms) | ||
293 | && (new_item->getType() == LLAssetType::AT_OBJECT)) | ||
294 | { | ||
295 | flags |= LLInventoryItem::II_FLAGS_OBJECT_SLAM_PERM; | ||
296 | } | ||
297 | // If everyone permissions have changed (and this is an object) | ||
298 | // then set the overwrite everyone permissions flag so they | ||
299 | // are applied on rez. | ||
300 | if ((perm.getMaskEveryone() != desired_everyone_perms) | ||
301 | && (new_item->getType() == LLAssetType::AT_OBJECT)) | ||
302 | { | ||
303 | flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE; | ||
304 | } | ||
305 | // If group permissions have changed (and this is an object) | ||
306 | // then set the overwrite group permissions flag so they | ||
307 | // are applied on rez. | ||
308 | if ((perm.getMaskGroup() != desired_group_perms) | ||
309 | && (new_item->getType() == LLAssetType::AT_OBJECT)) | ||
310 | { | ||
311 | flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP; | ||
312 | } | ||
284 | 313 | ||
285 | // chomp the inventory name so it fits in the scroll window nicely | 314 | // chomp the inventory name so it fits in the scroll window nicely |
286 | // and the user can see the [OK] | 315 | // and the user can see the [OK] |
@@ -303,10 +332,11 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, Invent | |||
303 | //|| something else // for next owner perms | 332 | //|| something else // for next owner perms |
304 | ) | 333 | ) |
305 | { | 334 | { |
306 | perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("BulkChange")); | 335 | perm.setMaskNext(desired_next_owner_perms); |
307 | perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("BulkChange")); | 336 | perm.setMaskEveryone(desired_everyone_perms); |
308 | perm.setMaskGroup(LLFloaterPerms::getGroupPerms("BulkChange")); | 337 | perm.setMaskGroup(desired_group_perms); |
309 | new_item->setPermissions(perm); // here's the beef | 338 | new_item->setPermissions(perm); // here's the beef |
339 | new_item->setFlags(flags); // and the tofu | ||
310 | updateInventory(object,new_item,TASK_INVENTORY_ITEM_KEY,FALSE); | 340 | updateInventory(object,new_item,TASK_INVENTORY_ITEM_KEY,FALSE); |
311 | //status_text.setArg("[STATUS]", getString("status_ok_text")); | 341 | //status_text.setArg("[STATUS]", getString("status_ok_text")); |
312 | status_text.setArg("[STATUS]", ""); | 342 | status_text.setArg("[STATUS]", ""); |