void JCFloaterAnimList::RevokeSelected(void *userdata ) { JCFloaterAnimList *self = (JCFloaterAnimList*)userdata; LLDynamicArray<LLUUID> ids; std::vector< LLScrollListItem * > items = self->mAnimList->getAllSelected(); for( std::vector< LLScrollListItem * >::iterator itr = items.begin(); itr != items.end(); itr++ ) { LLScrollListItem *item = *itr; const LLUUID &id = item->getColumn(LIST_OBJECT_UUID)->getValue().asUUID(); if( ids.find(id) == LLDynamicArray<LLUUID>::FAIL ) { ids.put(id); } } if( !ids.empty() ) { for(LLDynamicArray<LLUUID>::iterator itr = ids.begin(); itr != ids.end(); ++itr) { LLUUID id = *itr; LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_RevokePermissions); msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); msg->nextBlockFast(_PREHASH_Data); msg->addUUIDFast(_PREHASH_ObjectID, id); msg->addU32Fast(_PREHASH_ObjectPermissions, U32_MAX); gAgent.sendReliableMessage(); } } }
void JCFloaterAnimList::StopSelected(void *userdata ) { JCFloaterAnimList *self = (JCFloaterAnimList*)userdata; LLDynamicArray<LLUUID> ids; std::vector< LLScrollListItem * > items = self->mAnimList->getAllSelected(); for( std::vector< LLScrollListItem * >::iterator itr = items.begin(); itr != items.end(); itr++ ) { LLScrollListItem *item = *itr; const LLUUID &id = item->getColumn(LIST_ANIMATION_UUID)->getValue().asUUID(); if( ids.find(id) == LLDynamicArray<LLUUID>::FAIL ) { ids.put(id); } } gAgent.sendAnimationRequests(ids,ANIM_REQUEST_STOP); }
void LLFloaterExploreAnimations::StopSelected(void *userdata ) { LLFloaterExploreAnimations *self = (LLFloaterExploreAnimations*)userdata; LLDynamicArray<LLUUID> ids; std::vector< LLScrollListItem * > items = self->getChild<LLScrollListCtrl>("anim_list")->getAllSelected(); for( std::vector< LLScrollListItem * >::iterator itr = items.begin(); itr != items.end(); itr++ ) { LLScrollListItem *item = *itr; const LLUUID &id = item->getValue().asUUID(); if( ids.find(id) == LLDynamicArray<LLUUID>::FAIL ) { ids.put(id); } } gAgent.sendAnimationRequests(ids,ANIM_REQUEST_STOP); }