diff options
| author | Simon Linden <simon@lindenlab.com> | 2014-07-18 22:28:33 +0000 |
|---|---|---|
| committer | Simon Linden <simon@lindenlab.com> | 2014-07-18 22:28:33 +0000 |
| commit | 7714c7679da7c6c28c3f3f09af6b586a680dc26c (patch) | |
| tree | f14c766b090f50cbb866123305f676e831ef483b /indra/newview/llfloatergesture.cpp | |
| parent | 1655887f30e40ea390b6dca9f64ac5e84309be05 (diff) | |
| parent | ff3827f278d2d53f565bc585edc4db5bc5e5dc38 (diff) | |
Merge in downstream viewer-tiger
Diffstat (limited to 'indra/newview/llfloatergesture.cpp')
| -rwxr-xr-x | indra/newview/llfloatergesture.cpp | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index 1452d53265..7da65a9a7c 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() @@ -617,9 +637,10 @@ void LLFloaterGesture::addToCurrentOutFit() uuid_vec_t ids; getSelectedIds(ids); LLAppearanceMgr* am = LLAppearanceMgr::getInstance(); + LLPointer<LLInventoryCallback> cb = new LLUpdateAppearanceOnDestroy; for(uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); it++) { - am->addCOFItemLink(*it); + am->addCOFItemLink(*it, cb); } } |
