diff options
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rw-r--r-- | indra/newview/lltooldraganddrop.cpp | 228 |
1 files changed, 114 insertions, 114 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index efe2366a83..bae4f2136f 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -103,7 +103,7 @@ public: class LLDroppableItem : public LLInventoryCollectFunctor { public: - LLDroppableItem(BOOL is_transfer) : + LLDroppableItem(bool is_transfer) : mCountLosing(0), mIsTransfer(is_transfer) {} virtual ~LLDroppableItem() {} virtual bool operator()(LLInventoryCategory* cat, @@ -112,7 +112,7 @@ public: protected: S32 mCountLosing; - BOOL mIsTransfer; + bool mIsTransfer; }; bool LLDroppableItem::operator()(LLInventoryCategory* cat, @@ -288,7 +288,7 @@ LLToolDragAndDrop::LLToolDragAndDrop() mSource(SOURCE_AGENT), mCursor(UI_CURSOR_NO), mLastAccept(ACCEPT_NO), - mDrop(FALSE), + mDrop(false), mCurItemIndex(0) { @@ -300,7 +300,7 @@ void LLToolDragAndDrop::setDragStart(S32 x, S32 y) mDragStartY = y; } -BOOL LLToolDragAndDrop::isOverThreshold(S32 x,S32 y) +bool LLToolDragAndDrop::isOverThreshold(S32 x,S32 y) { static LLCachedControl<S32> drag_and_drop_threshold(gSavedSettings,"DragAndDropDistanceThreshold", 3); @@ -339,7 +339,7 @@ void LLToolDragAndDrop::beginDrag(EDragAndDropType type, mSourceID = source_id; mObjectID = object_id; - setMouseCapture( TRUE ); + setMouseCapture( true ); LLToolMgr::getInstance()->setTransientTool( this ); mCursor = UI_CURSOR_NO; if ((mCargoTypes[0] == DAD_CATEGORY) @@ -409,7 +409,7 @@ void LLToolDragAndDrop::beginMultiDrag( mSource = source; mSourceID = source_id; - setMouseCapture( TRUE ); + setMouseCapture( true ); LLToolMgr::getInstance()->setTransientTool( this ); mCursor = UI_CURSOR_NO; if ((mSource == SOURCE_AGENT) || (mSource == SOURCE_LIBRARY)) @@ -458,7 +458,7 @@ void LLToolDragAndDrop::endDrag() { mEndDragSignal(); LLSelectMgr::getInstance()->unhighlightAll(); - setMouseCapture(FALSE); + setMouseCapture(false); } void LLToolDragAndDrop::onMouseCaptureLost() @@ -478,7 +478,7 @@ bool LLToolDragAndDrop::handleMouseUp( S32 x, S32 y, MASK mask ) if (hasMouseCapture()) { EAcceptance acceptance = ACCEPT_NO; - dragOrDrop( x, y, mask, TRUE, &acceptance ); + dragOrDrop( x, y, mask, true, &acceptance ); endDrag(); } return true; @@ -548,7 +548,7 @@ ECursorType LLToolDragAndDrop::acceptanceToCursor( EAcceptance acceptance ) case ACCEPT_POSTPONED: break; default: - llassert( FALSE ); + llassert( false ); } return mCursor; @@ -557,7 +557,7 @@ ECursorType LLToolDragAndDrop::acceptanceToCursor( EAcceptance acceptance ) bool LLToolDragAndDrop::handleHover( S32 x, S32 y, MASK mask ) { EAcceptance acceptance = ACCEPT_NO; - dragOrDrop( x, y, mask, FALSE, &acceptance ); + dragOrDrop( x, y, mask, false, &acceptance ); ECursorType cursor = acceptanceToCursor(acceptance); gViewerWindow->getWindow()->setCursor( cursor ); @@ -566,16 +566,16 @@ bool LLToolDragAndDrop::handleHover( S32 x, S32 y, MASK mask ) return true; } -BOOL LLToolDragAndDrop::handleKey(KEY key, MASK mask) +bool LLToolDragAndDrop::handleKey(KEY key, MASK mask) { if (key == KEY_ESCAPE) { // cancel drag and drop operation endDrag(); - return TRUE; + return true; } - return FALSE; + return false; } bool LLToolDragAndDrop::handleToolTip(S32 x, S32 y, MASK mask) @@ -600,12 +600,12 @@ void LLToolDragAndDrop::handleDeselect() } // protected -void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, +void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, bool drop, EAcceptance* acceptance) { *acceptance = ACCEPT_YES_MULTI; - BOOL handled = FALSE; + bool handled = false; LLView* top_view = gFocusMgr.getTopCtrl(); LLViewerInventoryItem* item; @@ -625,7 +625,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, if (top_view) { - handled = TRUE; + handled = true; for (mCurItemIndex = 0; mCurItemIndex < (S32)mCargoIDs.size(); mCurItemIndex++) { @@ -636,7 +636,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, LLInventoryObject* cargo = locateInventory(item, cat); if (cargo) { - handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, FALSE, + handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, false, mCargoTypes[mCurItemIndex], (void*)cargo, &item_acceptance, @@ -644,7 +644,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, } else if (is_uuid_dragged) { - handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, FALSE, + handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, false, mCargoTypes[mCurItemIndex], (void*)&mCargoIDs[mCurItemIndex], &item_acceptance, @@ -677,7 +677,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, LLInventoryObject* cargo = locateInventory(item, cat); if (cargo) { - handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, TRUE, + handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, true, mCargoTypes[mCurItemIndex], (void*)cargo, &item_acceptance, @@ -685,7 +685,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, } else if (is_uuid_dragged) { - handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, FALSE, + handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, false, mCargoTypes[mCurItemIndex], (void*)&mCargoIDs[mCurItemIndex], &item_acceptance, @@ -701,7 +701,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, if (!handled) { - handled = TRUE; + handled = true; LLRootView* root_view = gViewerWindow->getRootView(); @@ -714,7 +714,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, // fix for EXT-3191 if (cargo) { - handled = handled && root_view->handleDragAndDrop(x, y, mask, FALSE, + handled = handled && root_view->handleDragAndDrop(x, y, mask, false, mCargoTypes[mCurItemIndex], (void*)cargo, &item_acceptance, @@ -722,7 +722,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, } else if (is_uuid_dragged) { - handled = handled && root_view->handleDragAndDrop(x, y, mask, FALSE, + handled = handled && root_view->handleDragAndDrop(x, y, mask, false, mCargoTypes[mCurItemIndex], (void*)&mCargoIDs[mCurItemIndex], &item_acceptance, @@ -752,7 +752,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, LLInventoryObject* cargo = locateInventory(item, cat); if (cargo) { - handled = handled && root_view->handleDragAndDrop(x, y, mask, TRUE, + handled = handled && root_view->handleDragAndDrop(x, y, mask, true, mCargoTypes[mCurItemIndex], (void*)cargo, &item_acceptance, @@ -760,7 +760,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, } else if (is_uuid_dragged) { - handled = handled && root_view->handleDragAndDrop(x, y, mask, TRUE, + handled = handled && root_view->handleDragAndDrop(x, y, mask, true, mCargoTypes[mCurItemIndex], (void*)&mCargoIDs[mCurItemIndex], &item_acceptance, @@ -796,18 +796,18 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, } } -void LLToolDragAndDrop::dragOrDrop3D( S32 x, S32 y, MASK mask, BOOL drop, EAcceptance* acceptance ) +void LLToolDragAndDrop::dragOrDrop3D( S32 x, S32 y, MASK mask, bool drop, EAcceptance* acceptance ) { mDrop = drop; if (mDrop) { // don't allow drag and drop onto rigged or transparent objects - pick(gViewerWindow->pickImmediate(x, y, FALSE, FALSE)); + pick(gViewerWindow->pickImmediate(x, y, false, false)); } else { // don't allow drag and drop onto transparent objects - gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, FALSE); + gViewerWindow->pickAsync(x, y, mask, pickCallback, false, false); } *acceptance = mLastAccept; @@ -890,7 +890,7 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info) (U32)mLastAccept, (U32)callMemberFunction(*this, LLDragAndDropDictionary::instance().get(dad_type, target)) - (hit_obj, hit_face, pick_info.mKeyMask, FALSE)); + (hit_obj, hit_face, pick_info.mKeyMask, false)); } if (mDrop && ((U32)mLastAccept >= ACCEPT_YES_COPY_SINGLE)) @@ -905,7 +905,7 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info) const EDragAndDropType dad_type = mCargoTypes[item_index]; // Call the right implementation function callMemberFunction(*this, LLDragAndDropDictionary::instance().get(dad_type, target)) - (hit_obj, hit_face, pick_info.mKeyMask, TRUE); + (hit_obj, hit_face, pick_info.mKeyMask, true); } } else @@ -936,12 +936,12 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info) } // static -BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, +bool LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, LLInventoryItem* item, LLToolDragAndDrop::ESource source, const LLUUID& src_id) { - if (!item) return FALSE; + if (!item) return false; // Always succeed if.... // material is from the library @@ -949,7 +949,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, if (SOURCE_LIBRARY == source) { // dropping a material from the library always just works. - return TRUE; + return true; } // In case the inventory has not been loaded (e.g. due to some recent operation @@ -970,7 +970,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, args["ERROR_MESSAGE"] = "Unable to add texture.\nPlease wait a few seconds and try again."; } LLNotificationsUtil::add("ErrorMessage", args); - return FALSE; + return false; } // Make sure to verify both id and type since 'null' // is a shared default for some asset types. @@ -980,7 +980,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, // then it can always be added to a side. // This saves some work if the task's inventory is already loaded // and ensures that the asset item is only added once. - return TRUE; + return true; } LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); @@ -989,7 +989,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, // Check that we can add the material as inventory to the object if (willObjectAcceptInventory(hit_obj,item) < ACCEPT_YES_COPY_SINGLE ) { - return FALSE; + return false; } // make sure the object has the material in it's inventory. if (SOURCE_AGENT == source) @@ -1012,7 +1012,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, else { LL_WARNS() << "Unable to find source object." << LL_ENDL; - return FALSE; + return false; } } // Add the asset item to the target object's inventory. @@ -1038,7 +1038,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, // Check that we can add the asset as inventory to the object if (willObjectAcceptInventory(hit_obj,item) < ACCEPT_YES_COPY_SINGLE ) { - return FALSE; + return false; } // *FIX: may want to make sure agent can paint hit_obj. @@ -1065,7 +1065,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, // Check that we can add the material as inventory to the object if (willObjectAcceptInventory(hit_obj,item) < ACCEPT_YES_COPY_SINGLE ) { - return FALSE; + return false; } // *FIX: may want to make sure agent can paint hit_obj. @@ -1079,7 +1079,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, // we should return false here. This will requre a separate listener // since without listener, we have no way to receive update } - return TRUE; + return true; } void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj, @@ -1107,7 +1107,7 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj, return; } LLUUID asset_id = item->getAssetUUID(); - BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id); + bool success = handleDropMaterialProtections(hit_obj, item, source, src_id); if (!success) { return; @@ -1192,7 +1192,7 @@ void LLToolDragAndDrop::dropMaterialOneFace(LLViewerObject* hit_obj, // SL-20013 must save asset_id before handleDropMaterialProtections since our item instance // may be deleted if it is moved into task inventory LLUUID asset_id = item->getAssetUUID(); - BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id); + bool success = handleDropMaterialProtections(hit_obj, item, source, src_id); if (!success) { return; @@ -1227,7 +1227,7 @@ void LLToolDragAndDrop::dropMaterialAllFaces(LLViewerObject* hit_obj, // SL-20013 must save asset_id before handleDropMaterialProtections since our item instance // may be deleted if it is moved into task inventory LLUUID asset_id = item->getAssetUUID(); - BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id); + bool success = handleDropMaterialProtections(hit_obj, item, source, src_id); if (!success) { @@ -1258,7 +1258,7 @@ void LLToolDragAndDrop::dropMesh(LLViewerObject* hit_obj, return; } LLUUID asset_id = item->getAssetUUID(); - BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id); + bool success = handleDropMaterialProtections(hit_obj, item, source, src_id); if(!success) { return; @@ -1266,7 +1266,7 @@ void LLToolDragAndDrop::dropMesh(LLViewerObject* hit_obj, LLSculptParams sculpt_params; sculpt_params.setSculptTexture(asset_id, LL_SCULPT_TYPE_MESH); - hit_obj->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, TRUE); + hit_obj->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, true); dialog_refresh_all(); } @@ -1364,7 +1364,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj, return; } LLUUID asset_id = item->getAssetUUID(); - BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id); + bool success = handleDropMaterialProtections(hit_obj, item, source, src_id); if (!success) { return; @@ -1427,7 +1427,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj, void LLToolDragAndDrop::dropScript(LLViewerObject* hit_obj, LLInventoryItem* item, - BOOL active, + bool active, ESource source, const LLUUID& src_id) { @@ -1473,7 +1473,7 @@ void LLToolDragAndDrop::dropScript(LLViewerObject* hit_obj, gFloaterTools->dirty(); // VEFFECT: SetScript - LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); + LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true); effectp->setSourceObject(gAgentAvatarp); effectp->setTargetObject(hit_obj); effectp->setDuration(LL_HUD_DUR_SHORT); @@ -1482,9 +1482,9 @@ void LLToolDragAndDrop::dropScript(LLViewerObject* hit_obj, } void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, - BOOL bypass_sim_raycast, - BOOL from_task_inventory, - BOOL remove_from_inventory) + bool bypass_sim_raycast, + bool from_task_inventory, + bool remove_from_inventory) { LLViewerRegion* regionp = LLWorld::getInstance()->getRegionFromPosGlobal(mLastHitPos); if (!regionp) @@ -1512,7 +1512,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, if (!remove_from_inventory && !item->getPermissions().allowCopyBy(gAgent.getID())) { - remove_from_inventory = TRUE; + remove_from_inventory = true; } // Limit raycast to a single object. @@ -1540,7 +1540,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, LLUUID source_id = from_task_inventory ? mSourceID : LLUUID::null; // Select the object only if we're editing. - BOOL rez_selected = LLToolMgr::getInstance()->inEdit(); + bool rez_selected = LLToolMgr::getInstance()->inEdit(); LLVector3 ray_start = regionp->getPosRegionFromGlobal(mLastCameraPos); @@ -1548,7 +1548,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, // currently the ray's end point is an approximation, // and is sometimes too short (causing failure.) so we // double the ray's length: - if (bypass_sim_raycast == FALSE) + if (bypass_sim_raycast == false) { LLVector3 ray_direction = ray_start - ray_end; ray_end = ray_end - ray_direction; @@ -1583,7 +1583,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, msg->addVector3Fast(_PREHASH_RayStart, ray_start); msg->addVector3Fast(_PREHASH_RayEnd, ray_end); msg->addUUIDFast(_PREHASH_RayTargetID, ray_target_id ); - msg->addBOOLFast(_PREHASH_RayEndIsIntersection, FALSE); + msg->addBOOLFast(_PREHASH_RayEndIsIntersection, false); msg->addBOOLFast(_PREHASH_RezSelected, rez_selected); msg->addBOOLFast(_PREHASH_RemoveItem, remove_from_inventory); @@ -1635,7 +1635,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, } // VEFFECT: DropObject - LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); + LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true); effectp->setSourceObject(gAgentAvatarp); effectp->setPositionGlobal(mLastHitPos); effectp->setDuration(LL_HUD_DUR_SHORT); @@ -1698,7 +1698,7 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj, } // VEFFECT: AddToInventory - LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); + LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true); effectp->setSourceObject(gAgentAvatarp); effectp->setTargetObject(hit_obj); effectp->setDuration(LL_HUD_DUR_SHORT); @@ -1733,10 +1733,10 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL return ACCEPT_NO; } - //BOOL copy = (perm.allowCopyBy(gAgent.getID(), + //bool copy = (perm.allowCopyBy(gAgent.getID(), // gAgent.getGroupID()) // && (obj->mPermModify || obj->mFlagAllowInventoryAdd)); - BOOL worn = FALSE; + bool worn = false; LLVOAvatarSelf* my_avatar = NULL; switch(item->getType()) { @@ -1744,14 +1744,14 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL my_avatar = gAgentAvatarp; if(my_avatar && my_avatar->isWearingAttachment(item->getUUID())) { - worn = TRUE; + worn = true; } break; case LLAssetType::AT_BODYPART: case LLAssetType::AT_CLOTHING: if(gAgentWearables.isWearingItem(item->getUUID())) { - worn = TRUE; + worn = true; } break; case LLAssetType::AT_CALLINGCARD: @@ -1762,16 +1762,16 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL break; } const LLPermissions& perm = item->getPermissions(); - BOOL modify = (obj->permModify() || obj->flagAllowInventoryAdd()); - BOOL transfer = FALSE; + bool modify = (obj->permModify() || obj->flagAllowInventoryAdd()); + bool transfer = false; if((obj->permYouOwner() && (perm.getOwner() == gAgent.getID())) || perm.allowOperationBy(PERM_TRANSFER, gAgent.getID())) { - transfer = TRUE; + transfer = true; } - BOOL volume = (LL_PCODE_VOLUME == obj->getPCode()); - BOOL attached = obj->isAttachment(); - BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE; + bool volume = (LL_PCODE_VOLUME == obj->getPCode()); + bool attached = obj->isAttachment(); + bool unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? true : false; if(attached && !unrestricted) { // Attachments are in world and in inventory simultaneously, @@ -1806,7 +1806,7 @@ static void give_inventory_cb(const LLSD& notification, const LLSD& response) LLViewerInventoryCategory * inv_cat = gInventory.getCategory(payload["item_id"]); if (NULL == inv_item && NULL == inv_cat) { - llassert( FALSE ); + llassert( false ); return; } bool successfully_shared; @@ -1865,7 +1865,7 @@ static void get_name_cb(const LLUUID& id, // function used as drag-and-drop handler for simple agent give inventory requests //static -bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_id, BOOL drop, +bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_id, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -1943,7 +1943,7 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_ break; } - return TRUE; + return true; } @@ -1953,14 +1953,14 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_ /// EAcceptance LLToolDragAndDrop::dad3dNULL( - LLViewerObject*, S32, MASK, BOOL) + LLViewerObject*, S32, MASK, bool) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dNULL()" << LL_ENDL; return ACCEPT_NO; } EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezAttachmentFromInv()" << LL_ENDL; // must be in the user's inventory @@ -2019,7 +2019,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { if (mSource == SOURCE_WORLD) { @@ -2039,21 +2039,21 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand( } EAcceptance accept; - BOOL remove_inventory; + bool remove_inventory; // Get initial settings based on shift key if (mask & MASK_SHIFT) { // For now, always make copy //accept = ACCEPT_YES_SINGLE; - //remove_inventory = TRUE; + //remove_inventory = true; accept = ACCEPT_YES_COPY_SINGLE; - remove_inventory = FALSE; + remove_inventory = false; } else { accept = ACCEPT_YES_COPY_SINGLE; - remove_inventory = FALSE; + remove_inventory = false; } // check if the item can be copied. If not, send that to the sim @@ -2061,7 +2061,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand( if(!item->getPermissions().allowCopyBy(gAgent.getID())) { accept = ACCEPT_YES_SINGLE; - remove_inventory = TRUE; + remove_inventory = true; } // Check if it's in the trash. @@ -2073,14 +2073,14 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand( if(drop) { - dropObject(obj, TRUE, FALSE, remove_inventory); + dropObject(obj, true, false, remove_inventory); } return accept; } EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { // handle objects coming from object inventory if (mSource == SOURCE_WORLD) @@ -2117,20 +2117,20 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject( } EAcceptance accept; - BOOL remove_inventory; + bool remove_inventory; if (mask & MASK_SHIFT) { // For now, always make copy //accept = ACCEPT_YES_SINGLE; - //remove_inventory = TRUE; + //remove_inventory = true; accept = ACCEPT_YES_COPY_SINGLE; - remove_inventory = FALSE; + remove_inventory = false; } else { accept = ACCEPT_YES_COPY_SINGLE; - remove_inventory = FALSE; + remove_inventory = false; } // check if the item can be copied. If not, send that to the sim @@ -2138,7 +2138,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject( if(!item->getPermissions().allowCopyBy(gAgent.getID())) { accept = ACCEPT_YES_SINGLE; - remove_inventory = TRUE; + remove_inventory = true; } // Check if it's in the trash. @@ -2146,19 +2146,19 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject( if(gInventory.isObjectDescendentOf(item->getUUID(), trash_id)) { accept = ACCEPT_YES_SINGLE; - remove_inventory = TRUE; + remove_inventory = true; } if(drop) { - dropObject(obj, FALSE, FALSE, remove_inventory); + dropObject(obj, false, false, remove_inventory); } return accept; } EAcceptance LLToolDragAndDrop::dad3dRezScript( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezScript()" << LL_ENDL; @@ -2178,7 +2178,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezScript( { // rez in the script active by default, rez in inactive if the // control key is being held down. - BOOL active = ((mask & MASK_CONTROL) == 0); + bool active = ((mask & MASK_CONTROL) == 0); LLViewerObject* root_object = obj; if (obj && obj->getParent()) @@ -2196,7 +2196,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezScript( } EAcceptance LLToolDragAndDrop::dad3dApplyToObject( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop, EDragAndDropType cargo_type) + LLViewerObject* obj, S32 face, MASK mask, bool drop, EDragAndDropType cargo_type) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dApplyToObject()" << LL_ENDL; @@ -2308,7 +2308,7 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject( } // VEFFECT: SetTexture - LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); + LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true); effectp->setSourceObject(gAgentAvatarp); effectp->setTargetObject(obj); effectp->setDuration(LL_HUD_DUR_SHORT); @@ -2321,19 +2321,19 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject( EAcceptance LLToolDragAndDrop::dad3dTextureObject( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { return dad3dApplyToObject(obj, face, mask, drop, DAD_TEXTURE); } EAcceptance LLToolDragAndDrop::dad3dMaterialObject( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { return dad3dApplyToObject(obj, face, mask, drop, DAD_MATERIAL); } EAcceptance LLToolDragAndDrop::dad3dMeshObject( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { return dad3dApplyToObject(obj, face, mask, drop, DAD_MESH); } @@ -2341,7 +2341,7 @@ EAcceptance LLToolDragAndDrop::dad3dMeshObject( /* EAcceptance LLToolDragAndDrop::dad3dTextureSelf( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dTextureAvatar()" << LL_ENDL; if(drop) @@ -2356,7 +2356,7 @@ EAcceptance LLToolDragAndDrop::dad3dTextureSelf( */ EAcceptance LLToolDragAndDrop::dad3dWearItem( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dWearItem()" << LL_ENDL; LLViewerInventoryItem* item; @@ -2389,7 +2389,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearItem( } EAcceptance LLToolDragAndDrop::dad3dActivateGesture( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dActivateGesture()" << LL_ENDL; LLViewerInventoryItem* item; @@ -2438,7 +2438,7 @@ EAcceptance LLToolDragAndDrop::dad3dActivateGesture( } EAcceptance LLToolDragAndDrop::dad3dWearCategory( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dWearCategory()" << LL_ENDL; LLViewerInventoryItem* item; @@ -2485,7 +2485,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory( if(drop) { - BOOL append = ( (mask & MASK_SHIFT) ? TRUE : FALSE ); + bool append = ( (mask & MASK_SHIFT) ? true : false ); LLAppearanceMgr::instance().wearInventoryCategory(category, false, append); } return ACCEPT_YES_MULTI; @@ -2507,7 +2507,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory( EAcceptance LLToolDragAndDrop::dad3dUpdateInventory( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dadUpdateInventory()" << LL_ENDL; @@ -2540,14 +2540,14 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventory( return rv; } -BOOL LLToolDragAndDrop::dadUpdateInventory(LLViewerObject* obj, BOOL drop) +bool LLToolDragAndDrop::dadUpdateInventory(LLViewerObject* obj, bool drop) { EAcceptance rv = dad3dUpdateInventory(obj, -1, MASK_NONE, drop); return (rv >= ACCEPT_YES_COPY_SINGLE); } EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dUpdateInventoryCategory()" << LL_ENDL; if (obj == NULL) @@ -2663,7 +2663,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory( EAcceptance LLToolDragAndDrop::dad3dRezCategoryOnObject( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { if ((mask & MASK_CONTROL)) { @@ -2676,15 +2676,15 @@ EAcceptance LLToolDragAndDrop::dad3dRezCategoryOnObject( } -BOOL LLToolDragAndDrop::dadUpdateInventoryCategory(LLViewerObject* obj, - BOOL drop) +bool LLToolDragAndDrop::dadUpdateInventoryCategory(LLViewerObject* obj, + bool drop) { EAcceptance rv = dad3dUpdateInventoryCategory(obj, -1, MASK_NONE, drop); return (rv >= ACCEPT_YES_COPY_SINGLE); } EAcceptance LLToolDragAndDrop::dad3dGiveInventoryObject( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dGiveInventoryObject()" << LL_ENDL; @@ -2722,7 +2722,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventoryObject( EAcceptance LLToolDragAndDrop::dad3dGiveInventory( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dGiveInventory()" << LL_ENDL; // item has to be in agent inventory. @@ -2745,7 +2745,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventory( } EAcceptance LLToolDragAndDrop::dad3dGiveInventoryCategory( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dGiveInventoryCategory()" << LL_ENDL; if(drop && obj) @@ -2763,7 +2763,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventoryCategory( EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnLand( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezFromObjectOnLand()" << LL_ENDL; LLViewerInventoryItem* item = NULL; @@ -2778,13 +2778,13 @@ EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnLand( } if(drop) { - dropObject(obj, TRUE, TRUE, FALSE); + dropObject(obj, true, true, false); } return ACCEPT_YES_SINGLE; } EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnObject( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezFromObjectOnObject()" << LL_ENDL; LLViewerInventoryItem* item; @@ -2813,13 +2813,13 @@ EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnObject( } if(drop) { - dropObject(obj, FALSE, TRUE, FALSE); + dropObject(obj, false, true, false); } return ACCEPT_YES_SINGLE; } EAcceptance LLToolDragAndDrop::dad3dCategoryOnLand( - LLViewerObject *obj, S32 face, MASK mask, BOOL drop) + LLViewerObject *obj, S32 face, MASK mask, bool drop) { return ACCEPT_NO; /* @@ -2857,7 +2857,7 @@ EAcceptance LLToolDragAndDrop::dad3dCategoryOnLand( // This shortcuts alot of steps to make a basic object // w/ an inventory and a special permissions set EAcceptance LLToolDragAndDrop::dad3dAssetOnLand( - LLViewerObject *obj, S32 face, MASK mask, BOOL drop) + LLViewerObject *obj, S32 face, MASK mask, bool drop) { return ACCEPT_NO; /* |