diff options
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 672 |
1 files changed, 333 insertions, 339 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index ddb69cdfb3..f865f9e29b 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -123,7 +123,7 @@ bool isMarketplaceSendAction(const std::string& action) bool isPanelActive(const std::string& panel_name) { - LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(false); return (active_panel && (active_panel->getName() == panel_name)); } @@ -206,7 +206,7 @@ public: panel->getRootFolder()->update(); has_elements = true; } - panel->getRootFolder()->changeSelection(item, TRUE); + panel->getRootFolder()->changeSelection(item, true); } } } @@ -231,7 +231,7 @@ LLInvFVBridge::LLInvFVBridge(LLInventoryPanel* inventory, mUUID(uuid), mRoot(root), mInvType(LLInventoryType::IT_NONE), - mIsLink(FALSE), + mIsLink(false), LLFolderViewModelItemInventory(inventory->getRootViewModel()) { mInventoryPanel = inventory->getInventoryPanelHandle(); @@ -308,23 +308,23 @@ void LLInvFVBridge::setCreationDate(time_t creation_date_utc) // Can be destroyed (or moved to trash) -BOOL LLInvFVBridge::isItemRemovable() const +bool LLInvFVBridge::isItemRemovable() const { return get_is_item_removable(getInventoryModel(), mUUID); } // Can be moved to another folder -BOOL LLInvFVBridge::isItemMovable() const +bool LLInvFVBridge::isItemMovable() const { - return TRUE; + return true; } -BOOL LLInvFVBridge::isLink() const +bool LLInvFVBridge::isLink() const { return mIsLink; } -BOOL LLInvFVBridge::isLibraryItem() const +bool LLInvFVBridge::isLibraryItem() const { return gInventory.isObjectDescendentOf(getUUID(),gInventory.getLibraryRootFolderID()); } @@ -333,19 +333,19 @@ BOOL LLInvFVBridge::isLibraryItem() const /** * @brief Adds this item into clipboard storage */ -BOOL LLInvFVBridge::cutToClipboard() +bool LLInvFVBridge::cutToClipboard() { const LLInventoryObject* obj = gInventory.getObject(mUUID); if (obj && isItemMovable() && isItemRemovable()) { const LLUUID &marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); - const BOOL cut_from_marketplacelistings = gInventory.isObjectDescendentOf(mUUID, marketplacelistings_id); + const bool cut_from_marketplacelistings = gInventory.isObjectDescendentOf(mUUID, marketplacelistings_id); if (cut_from_marketplacelistings && (LLMarketplaceData::instance().isInActiveFolder(mUUID) || LLMarketplaceData::instance().isListedAndActive(mUUID))) { LLUUID parent_uuid = obj->getParentUUID(); - BOOL result = perform_cutToClipboard(); + bool result = perform_cutToClipboard(); gInventory.addChangedMask(LLInventoryObserver::STRUCTURE, parent_uuid); return result; } @@ -355,7 +355,7 @@ BOOL LLInvFVBridge::cutToClipboard() return perform_cutToClipboard(); } } - return FALSE; + return false; } // virtual @@ -369,17 +369,17 @@ bool LLInvFVBridge::isCutToClipboard() } // Callback for cutToClipboard if DAMA required... -BOOL LLInvFVBridge::callback_cutToClipboard(const LLSD& notification, const LLSD& response) +bool LLInvFVBridge::callback_cutToClipboard(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) // YES { return perform_cutToClipboard(); } - return FALSE; + return false; } -BOOL LLInvFVBridge::perform_cutToClipboard() +bool LLInvFVBridge::perform_cutToClipboard() { const LLInventoryObject* obj = gInventory.getObject(mUUID); if (obj && isItemMovable() && isItemRemovable()) @@ -387,24 +387,24 @@ BOOL LLInvFVBridge::perform_cutToClipboard() LLClipboard::instance().setCutMode(true); return LLClipboard::instance().addToClipboard(mUUID); } - return FALSE; + return false; } -BOOL LLInvFVBridge::copyToClipboard() const +bool LLInvFVBridge::copyToClipboard() const { const LLInventoryObject* obj = gInventory.getObject(mUUID); if (obj && isItemCopyable()) { return LLClipboard::instance().addToClipboard(mUUID); } - return FALSE; + return false; } void LLInvFVBridge::showProperties() { if (isMarketplaceListingsFolder()) { - LLFloaterReg::showInstance("item_properties", LLSD().with("id",mUUID),TRUE); + LLFloaterReg::showInstance("item_properties", LLSD().with("id",mUUID),true); // Force it to show on top as this floater has a tendency to hide when confirmation dialog shows up LLFloater* floater_properties = LLFloaterReg::findInstance("item_properties", LLSD().with("id",mUUID)); if (floater_properties) @@ -475,7 +475,7 @@ void LLInvFVBridge::removeBatch(std::vector<LLFolderViewModelItem*>& batch) cat = (LLViewerInventoryCategory*)model->getCategory(bridge->getUUID()); if (cat) { - gInventory.collectDescendents( cat->getUUID(), descendent_categories, descendent_items, FALSE ); + gInventory.collectDescendents( cat->getUUID(), descendent_categories, descendent_items, false ); for (j=0; j<descendent_items.size(); j++) { if(LLAssetType::AT_GESTURE == descendent_items[j]->getType()) @@ -541,7 +541,7 @@ void LLInvFVBridge::removeBatchNoCheck(std::vector<LLFolderViewModelItem*>& ba msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->addBOOLFast(_PREHASH_Stamp, TRUE); + msg->addBOOLFast(_PREHASH_Stamp, true); } msg->nextBlockFast(_PREHASH_InventoryData); msg->addUUIDFast(_PREHASH_ItemID, item->getUUID()); @@ -582,7 +582,7 @@ void LLInvFVBridge::removeBatchNoCheck(std::vector<LLFolderViewModelItem*>& ba msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->addBOOL("Stamp", TRUE); + msg->addBOOL("Stamp", true); } msg->nextBlockFast(_PREHASH_InventoryData); msg->addUUIDFast(_PREHASH_FolderID, cat->getUUID()); @@ -619,23 +619,23 @@ void LLInvFVBridge::removeBatchNoCheck(std::vector<LLFolderViewModelItem*>& ba model->notifyObservers(); } -BOOL LLInvFVBridge::isClipboardPasteable() const +bool LLInvFVBridge::isClipboardPasteable() const { - // Return FALSE on degenerated cases: empty clipboard, no inventory, no agent + // Return false on degenerated cases: empty clipboard, no inventory, no agent if (!LLClipboard::instance().hasContents() || !isAgentInventory()) { - return FALSE; + return false; } LLInventoryModel* model = getInventoryModel(); if (!model) { - return FALSE; + return false; } // In cut mode, whatever is on the clipboard is always pastable if (LLClipboard::instance().isCutMode()) { - return TRUE; + return true; } // In normal mode, we need to check each element of the clipboard to know if we can paste or not @@ -652,7 +652,7 @@ BOOL LLInvFVBridge::isClipboardPasteable() const { LLFolderBridge cat_br(mInventoryPanel.get(), mRoot, item_id); if (!cat_br.isItemCopyable(false)) - return FALSE; + return false; // Skip to the next item in the clipboard continue; } @@ -661,22 +661,22 @@ BOOL LLInvFVBridge::isClipboardPasteable() const LLItemBridge item_br(mInventoryPanel.get(), mRoot, item_id); if (!item_br.isItemCopyable(false)) { - return FALSE; + return false; } } - return TRUE; + return true; } -BOOL LLInvFVBridge::isClipboardPasteableAsLink() const +bool LLInvFVBridge::isClipboardPasteableAsLink() const { if (!LLClipboard::instance().hasContents() || !isAgentInventory()) { - return FALSE; + return false; } const LLInventoryModel* model = getInventoryModel(); if (!model) { - return FALSE; + return false; } std::vector<LLUUID> objects; @@ -689,21 +689,21 @@ BOOL LLInvFVBridge::isClipboardPasteableAsLink() const { if (!LLAssetType::lookupCanLink(item->getActualType())) { - return FALSE; + return false; } if (gInventory.isObjectDescendentOf(item->getUUID(), gInventory.getLibraryRootFolderID())) { - return FALSE; + return false; } } const LLViewerInventoryCategory *cat = model->getCategory(objects.at(i)); if (cat && LLFolderType::lookupIsProtectedType(cat->getPreferredType())) { - return FALSE; + return false; } } - return TRUE; + return true; } void disable_context_entries_if_present(LLMenuGL& menu, @@ -737,12 +737,12 @@ void disable_context_entries_if_present(LLMenuGL& menu, if (found) { - menu_item->setVisible(TRUE); + menu_item->setVisible(true); // A bit of a hack so we can remember that some UI element explicitly set this to be visible // so that some other UI element from multi-select doesn't later set this invisible. - menu_item->pushVisible(TRUE); + menu_item->pushVisible(true); - menu_item->setEnabled(FALSE); + menu_item->setEnabled(false); } } } @@ -794,7 +794,7 @@ void hide_context_entries(LLMenuGL& menu, { if (!menu_item->getLastVisible()) { - menu_item->setVisible(FALSE); + menu_item->setVisible(false); } if (menu_item->getEnabled()) @@ -809,16 +809,16 @@ void hide_context_entries(LLMenuGL& menu, menuentry_vec_t::const_iterator itor2 = std::find(exceptions.begin(), exceptions.end(), name); if (itor2 == exceptions.end()) { - menu_item->setEnabled(FALSE); + menu_item->setEnabled(false); } } } else { - menu_item->setVisible(TRUE); + menu_item->setVisible(true); // A bit of a hack so we can remember that some UI element explicitly set this to be visible // so that some other UI element from multi-select doesn't later set this invisible. - menu_item->pushVisible(TRUE); + menu_item->pushVisible(true); bool enabled = true; for (itor2 = disabled_entries.begin(); enabled && (itor2 != disabled_entries.end()); ++itor2) @@ -1077,7 +1077,7 @@ void LLInvFVBridge::addDeleteContextMenuOptions(menuentry_vec_t &items, void LLInvFVBridge::addOpenRightClickMenuOption(menuentry_vec_t &items) { const LLInventoryObject *obj = getInventoryObject(); - const BOOL is_link = (obj && obj->getIsLinkType()); + const bool is_link = (obj && obj->getIsLinkType()); if (is_link) items.push_back(std::string("Open Original")); @@ -1189,7 +1189,7 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags, LLUUID local_version_folder_id = nested_parent_id(mUUID,depth-1); LLInventoryModel::cat_array_t categories; LLInventoryModel::item_array_t items; - gInventory.collectDescendents(local_version_folder_id, categories, items, FALSE); + gInventory.collectDescendents(local_version_folder_id, categories, items, false); LLCachedControl<U32> max_depth(gSavedSettings, "InventoryOutboxMaxFolderDepth", 4); LLCachedControl<U32> max_count(gSavedSettings, "InventoryOutboxMaxFolderCount", 20); if (categories.size() >= max_count @@ -1225,9 +1225,9 @@ void LLInvFVBridge::addLinkReplaceMenuOption(menuentry_vec_t& items, menuentry_v } // *TODO: remove this -BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const +bool LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const { - BOOL rv = FALSE; + bool rv = false; const LLInventoryObject* obj = getInventoryObject(); @@ -1236,7 +1236,7 @@ BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const *type = LLViewerAssetType::lookupDragAndDropType(obj->getActualType()); if(*type == DAD_NONE) { - return FALSE; + return false; } *id = obj->getUUID(); @@ -1247,7 +1247,7 @@ BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const LLInventoryModelBackgroundFetch::instance().start(obj->getUUID()); } - rv = TRUE; + rv = true; } return rv; @@ -1276,27 +1276,27 @@ LLInventoryFilter* LLInvFVBridge::getInventoryFilter() const return panel ? &(panel->getFilter()) : NULL; } -BOOL LLInvFVBridge::isItemInTrash() const +bool LLInvFVBridge::isItemInTrash() const { LLInventoryModel* model = getInventoryModel(); - if(!model) return FALSE; + if(!model) return false; const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); return model->isObjectDescendentOf(mUUID, trash_id); } -BOOL LLInvFVBridge::isLinkedObjectInTrash() const +bool LLInvFVBridge::isLinkedObjectInTrash() const { - if (isItemInTrash()) return TRUE; + if (isItemInTrash()) return true; const LLInventoryObject *obj = getInventoryObject(); if (obj && obj->getIsLinkType()) { LLInventoryModel* model = getInventoryModel(); - if(!model) return FALSE; + if(!model) return false; const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); return model->isObjectDescendentOf(obj->getLinkedUUID(), trash_id); } - return FALSE; + return false; } bool LLInvFVBridge::isItemInOutfits() const @@ -1309,68 +1309,68 @@ bool LLInvFVBridge::isItemInOutfits() const return isCOFFolder() || (my_outfits_cat == mUUID) || model->isObjectDescendentOf(mUUID, my_outfits_cat); } -BOOL LLInvFVBridge::isLinkedObjectMissing() const +bool LLInvFVBridge::isLinkedObjectMissing() const { const LLInventoryObject *obj = getInventoryObject(); if (!obj) { - return TRUE; + return true; } if (obj->getIsLinkType() && LLAssetType::lookupIsLinkType(obj->getType())) { - return TRUE; + return true; } - return FALSE; + return false; } -BOOL LLInvFVBridge::isAgentInventory() const +bool LLInvFVBridge::isAgentInventory() const { const LLInventoryModel* model = getInventoryModel(); - if(!model) return FALSE; - if(gInventory.getRootFolderID() == mUUID) return TRUE; + if(!model) return false; + if(gInventory.getRootFolderID() == mUUID) return true; return model->isObjectDescendentOf(mUUID, gInventory.getRootFolderID()); } -BOOL LLInvFVBridge::isCOFFolder() const +bool LLInvFVBridge::isCOFFolder() const { return LLAppearanceMgr::instance().getIsInCOF(mUUID); } // *TODO : Suppress isInboxFolder() once Merchant Outbox is fully deprecated -BOOL LLInvFVBridge::isInboxFolder() const +bool LLInvFVBridge::isInboxFolder() const { const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX); if (inbox_id.isNull()) { - return FALSE; + return false; } return gInventory.isObjectDescendentOf(mUUID, inbox_id); } -BOOL LLInvFVBridge::isMarketplaceListingsFolder() const +bool LLInvFVBridge::isMarketplaceListingsFolder() const { const LLUUID folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); if (folder_id.isNull()) { - return FALSE; + return false; } return gInventory.isObjectDescendentOf(mUUID, folder_id); } -BOOL LLInvFVBridge::isItemPermissive() const +bool LLInvFVBridge::isItemPermissive() const { - return FALSE; + return false; } // static void LLInvFVBridge::changeItemParent(LLInventoryModel* model, LLViewerInventoryItem* item, const LLUUID& new_parent_id, - BOOL restamp) + bool restamp) { model->changeItemParent(item, new_parent_id, restamp); } @@ -1379,7 +1379,7 @@ void LLInvFVBridge::changeItemParent(LLInventoryModel* model, void LLInvFVBridge::changeCategoryParent(LLInventoryModel* model, LLViewerInventoryCategory* cat, const LLUUID& new_parent_id, - BOOL restamp) + bool restamp) { model->changeCategoryParent(cat, new_parent_id, restamp); } @@ -1904,7 +1904,7 @@ void LLItemBridge::restoreItem() const LLUUID new_parent = model->findCategoryUUIDForType(is_snapshot? LLFolderType::FT_SNAPSHOT_CATEGORY : LLFolderType::assetTypeToFolderType(item->getType())); // do not restamp on restore. - LLInvFVBridge::changeItemParent(model, item, new_parent, FALSE); + LLInvFVBridge::changeItemParent(model, item, new_parent, false); } } @@ -2042,29 +2042,29 @@ std::string LLItemBridge::getLabelSuffix() const if(item) { // Any type can have the link suffix... - BOOL broken_link = LLAssetType::lookupIsLinkType(item->getType()); + bool broken_link = LLAssetType::lookupIsLinkType(item->getType()); if (broken_link) return BROKEN_LINK; - BOOL link = item->getIsLinkType(); + bool link = item->getIsLinkType(); if (link) return LINK; // ...but it's a bit confusing to put nocopy/nomod/etc suffixes on calling cards. if(LLAssetType::AT_CALLINGCARD != item->getType() && item->getPermissions().getOwner() == gAgent.getID()) { - BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID()); + bool copy = item->getPermissions().allowCopyBy(gAgent.getID()); if (!copy) { suffix += " "; suffix += NO_COPY; } - BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID()); + bool mod = item->getPermissions().allowModifyBy(gAgent.getID()); if (!mod) { suffix += suffix.empty() ? " " : ","; suffix += NO_MOD; } - BOOL xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER, + bool xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()); if (!xfer) { @@ -2087,7 +2087,7 @@ time_t LLItemBridge::getCreationDate() const } -BOOL LLItemBridge::isItemRenameable() const +bool LLItemBridge::isItemRenameable() const { LLViewerInventoryItem* item = getItem(); if(item) @@ -2096,32 +2096,32 @@ BOOL LLItemBridge::isItemRenameable() const // what the calling card points to. if (item->getInventoryType() == LLInventoryType::IT_CALLINGCARD) { - return FALSE; + return false; } if (!item->isFinished()) // EXT-8662 { - return FALSE; + return false; } if (isInboxFolder()) { - return FALSE; + return false; } return (item->getPermissions().allowModifyBy(gAgent.getID())); } - return FALSE; + return false; } -BOOL LLItemBridge::renameItem(const std::string& new_name) +bool LLItemBridge::renameItem(const std::string& new_name) { if(!isItemRenameable()) - return FALSE; + return false; LLPreview::dirty(mUUID); LLInventoryModel* model = getInventoryModel(); if(!model) - return FALSE; + return false; LLViewerInventoryItem* item = getItem(); if(item && (item->getName() != new_name)) { @@ -2129,30 +2129,30 @@ BOOL LLItemBridge::renameItem(const std::string& new_name) updates["name"] = new_name; update_inventory_item(item->getUUID(),updates, NULL); } - // return FALSE because we either notified observers (& therefore + // return false because we either notified observers (& therefore // rebuilt) or we didn't update. - return FALSE; + return false; } -BOOL LLItemBridge::removeItem() +bool LLItemBridge::removeItem() { if(!isItemRemovable()) { - return FALSE; + return false; } // move it to the trash LLInventoryModel* model = getInventoryModel(); - if(!model) return FALSE; + if(!model) return false; const LLUUID& trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); LLViewerInventoryItem* item = getItem(); - if (!item) return FALSE; + if (!item) return false; if (item->getType() != LLAssetType::AT_LSL_TEXT) { - LLPreview::hide(mUUID, TRUE); + LLPreview::hide(mUUID, true); } // Already in trash - if (model->isObjectDescendentOf(mUUID, trash_id)) return FALSE; + if (model->isObjectDescendentOf(mUUID, trash_id)) return false; LLNotification::Params params("ConfirmItemDeleteHasLinks"); params.functor.function(boost::bind(&LLItemBridge::confirmRemoveItem, this, _1, _2)); @@ -2172,37 +2172,37 @@ BOOL LLItemBridge::removeItem() { // Warn if the user is will break any links when deleting this item. LLNotifications::instance().add(params); - return FALSE; + return false; } } } LLNotifications::instance().forceResponse(params, 0); model->checkTrashOverflow(); - return TRUE; + return true; } -BOOL LLItemBridge::confirmRemoveItem(const LLSD& notification, const LLSD& response) +bool LLItemBridge::confirmRemoveItem(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (option != 0) return FALSE; + if (option != 0) return false; LLInventoryModel* model = getInventoryModel(); - if (!model) return FALSE; + if (!model) return false; LLViewerInventoryItem* item = getItem(); - if (!item) return FALSE; + if (!item) return false; const LLUUID& trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); // if item is not already in trash if(item && !model->isObjectDescendentOf(mUUID, trash_id)) { // move to trash, and restamp - LLInvFVBridge::changeItemParent(model, item, trash_id, TRUE); + LLInvFVBridge::changeItemParent(model, item, trash_id, true); // delete was successful - return TRUE; + return true; } - return FALSE; + return false; } bool LLItemBridge::isItemCopyable(bool can_copy_as_link) const @@ -2252,14 +2252,14 @@ const LLUUID& LLItemBridge::getThumbnailUUID() const return LLUUID::null; } -BOOL LLItemBridge::isItemPermissive() const +bool LLItemBridge::isItemPermissive() const { LLViewerInventoryItem* item = getItem(); if(item) { return item->getIsFullPerm(); } - return FALSE; + return false; } // +=================================================+ @@ -2269,17 +2269,17 @@ BOOL LLItemBridge::isItemPermissive() const LLHandle<LLFolderBridge> LLFolderBridge::sSelf; // Can be moved to another folder -BOOL LLFolderBridge::isItemMovable() const +bool LLFolderBridge::isItemMovable() const { LLInventoryObject* obj = getInventoryObject(); if(obj) { // If it's a protected type folder, we can't move it if (LLFolderType::lookupIsProtectedType(((LLInventoryCategory*)obj)->getPreferredType())) - return FALSE; - return TRUE; + return false; + return true; } - return FALSE; + return false; } void LLFolderBridge::selectItem() @@ -2367,7 +2367,7 @@ std::string LLFolderBridge::getLabelSuffix() const { LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; - gInventory.collectDescendents(getUUID(), cat_array, item_array, TRUE); + gInventory.collectDescendents(getUUID(), cat_array, item_array, true); S32 count = item_array.size(); if(count > 0) { @@ -2421,7 +2421,7 @@ void LLFolderBridge::update() class LLIsItemRemovable : public LLFolderViewFunctor { public: - LLIsItemRemovable() : mPassed(TRUE) {} + LLIsItemRemovable() : mPassed(true) {} virtual void doFolder(LLFolderViewFolder* folder) { mPassed &= folder->getViewModelItem()->isItemRemovable(); @@ -2430,15 +2430,15 @@ public: { mPassed &= item->getViewModelItem()->isItemRemovable(); } - BOOL mPassed; + bool mPassed; }; // Can be destroyed (or moved to trash) -BOOL LLFolderBridge::isItemRemovable() const +bool LLFolderBridge::isItemRemovable() const { if (!get_is_category_removable(getInventoryModel(), mUUID)) { - return FALSE; + return false; } LLInventoryPanel* panel = mInventoryPanel.get(); @@ -2449,26 +2449,26 @@ BOOL LLFolderBridge::isItemRemovable() const folderp->applyFunctorToChildren(folder_test); if (!folder_test.mPassed) { - return FALSE; + return false; } } if (isMarketplaceListingsFolder() && (!LLMarketplaceData::instance().isSLMDataFetched() || LLMarketplaceData::instance().getActivationState(mUUID))) { - return FALSE; + return false; } - return TRUE; + return true; } -BOOL LLFolderBridge::isUpToDate() const +bool LLFolderBridge::isUpToDate() const { LLInventoryModel* model = getInventoryModel(); - if(!model) return FALSE; + if(!model) return false; LLViewerInventoryCategory* category = (LLViewerInventoryCategory*)model->getCategory(mUUID); if( !category ) { - return FALSE; + return false; } return category->getVersion() != LLViewerInventoryCategory::VERSION_UNKNOWN; @@ -2516,10 +2516,10 @@ bool LLFolderBridge::isItemCopyable(bool can_copy_as_link) const return true; } -BOOL LLFolderBridge::isClipboardPasteable() const +bool LLFolderBridge::isClipboardPasteable() const { if ( ! LLInvFVBridge::isClipboardPasteable() ) - return FALSE; + return false; // Don't allow pasting duplicates to the Calling Card/Friends subfolders, see bug EXT-1599 if ( LLFriendCardsManager::instance().isCategoryInFriendFolder( getCategory() ) ) @@ -2527,7 +2527,7 @@ BOOL LLFolderBridge::isClipboardPasteable() const LLInventoryModel* model = getInventoryModel(); if ( !model ) { - return FALSE; + return false; } std::vector<LLUUID> objects; @@ -2541,32 +2541,32 @@ BOOL LLFolderBridge::isClipboardPasteable() const const LLUUID &obj_id = objects.at(i); if ( LLFriendCardsManager::instance().isObjDirectDescendentOfCategory(model->getObject(obj_id), current_cat) ) { - return FALSE; + return false; } } } - return TRUE; + return true; } -BOOL LLFolderBridge::isClipboardPasteableAsLink() const +bool LLFolderBridge::isClipboardPasteableAsLink() const { // Check normal paste-as-link permissions if (!LLInvFVBridge::isClipboardPasteableAsLink()) { - return FALSE; + return false; } const LLInventoryModel* model = getInventoryModel(); if (!model) { - return FALSE; + return false; } const LLViewerInventoryCategory *current_cat = getCategory(); if (current_cat) { - const BOOL is_in_friend_folder = LLFriendCardsManager::instance().isCategoryInFriendFolder( current_cat ); + const bool is_in_friend_folder = LLFriendCardsManager::instance().isCategoryInFriendFolder( current_cat ); const LLUUID ¤t_cat_id = current_cat->getUUID(); std::vector<LLUUID> objects; LLClipboard::instance().pasteFromClipboard(objects); @@ -2582,7 +2582,7 @@ BOOL LLFolderBridge::isClipboardPasteableAsLink() const if ((cat_id == current_cat_id) || model->isObjectDescendentOf(current_cat_id, cat_id)) { - return FALSE; + return false; } } // Don't allow pasting duplicates to the Calling Card/Friends subfolders, see bug EXT-1599 @@ -2593,30 +2593,30 @@ BOOL LLFolderBridge::isClipboardPasteableAsLink() const // in case type of obj_id is LLInventoryItem. if ( LLFriendCardsManager::instance().isObjDirectDescendentOfCategory(model->getObject(obj_id), current_cat) ) { - return FALSE; + return false; } } } } - return TRUE; + return true; } -BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, - BOOL drop, +bool LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, + bool drop, std::string& tooltip_msg, - BOOL is_link, - BOOL user_confirm, + bool is_link, + bool user_confirm, LLPointer<LLInventoryCallback> cb) { LLInventoryModel* model = getInventoryModel(); - if (!inv_cat) return FALSE; // shouldn't happen, but in case item is incorrectly parented in which case inv_cat will be NULL - if (!model) return FALSE; - if (!isAgentAvatarValid()) return FALSE; - if (!isAgentInventory()) return FALSE; // cannot drag categories into library + if (!inv_cat) return false; // shouldn't happen, but in case item is incorrectly parented in which case inv_cat will be NULL + if (!model) return false; + if (!isAgentAvatarValid()) return false; + if (!isAgentInventory()) return false; // cannot drag categories into library LLInventoryPanel* destination_panel = mInventoryPanel.get(); if (!destination_panel) return false; @@ -2629,18 +2629,18 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); const LLUUID from_folder_uuid = inv_cat->getParentUUID(); - const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id); - const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); - const BOOL move_is_from_marketplacelistings = model->isObjectDescendentOf(cat_id, marketplacelistings_id); + const bool move_is_into_current_outfit = (mUUID == current_outfit_id); + const bool move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); + const bool move_is_from_marketplacelistings = model->isObjectDescendentOf(cat_id, marketplacelistings_id); // check to make sure source is agent inventory, and is represented there. LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource(); - const BOOL is_agent_inventory = (model->getCategory(cat_id) != NULL) + const bool is_agent_inventory = (model->getCategory(cat_id) != NULL) && (LLToolDragAndDrop::SOURCE_AGENT == source); - BOOL accept = FALSE; + bool accept = false; U64 filter_types = filter->getFilterTypes(); - BOOL use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0); + bool use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0); if (is_agent_inventory) { @@ -2649,44 +2649,44 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); const LLUUID &lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); - const BOOL move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id); - const BOOL move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id); - const BOOL move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); - const BOOL move_is_into_current_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_CURRENT_OUTFIT); - const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id); - const BOOL move_is_into_lost_and_found = model->isObjectDescendentOf(mUUID, lost_and_found_id); + const bool move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id); + const bool move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id); + const bool move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); + const bool move_is_into_current_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_CURRENT_OUTFIT); + const bool move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id); + const bool move_is_into_lost_and_found = model->isObjectDescendentOf(mUUID, lost_and_found_id); //-------------------------------------------------------------------------------- // Determine if folder can be moved. // - BOOL is_movable = TRUE; + bool is_movable = true; if (is_movable && (marketplacelistings_id == cat_id)) { - is_movable = FALSE; + is_movable = false; tooltip_msg = LLTrans::getString("TooltipOutboxCannotMoveRoot"); } if (is_movable && move_is_from_marketplacelistings && LLMarketplaceData::instance().getActivationState(cat_id)) { // If the incoming folder is listed and active (and is therefore either the listing or the version folder), // then moving is *not* allowed - is_movable = FALSE; + is_movable = false; tooltip_msg = LLTrans::getString("TooltipOutboxDragActive"); } if (is_movable && (mUUID == cat_id)) { - is_movable = FALSE; + is_movable = false; tooltip_msg = LLTrans::getString("TooltipDragOntoSelf"); } if (is_movable && (model->isObjectDescendentOf(mUUID, cat_id))) { - is_movable = FALSE; + is_movable = false; tooltip_msg = LLTrans::getString("TooltipDragOntoOwnChild"); } if (is_movable && LLFolderType::lookupIsProtectedType(inv_cat->getPreferredType())) { - is_movable = FALSE; + is_movable = false; // tooltip? } @@ -2721,21 +2721,21 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } if(is_movable && move_is_into_current_outfit && is_link) { - is_movable = FALSE; + is_movable = false; } if (is_movable && move_is_into_lost_and_found) { - is_movable = FALSE; + is_movable = false; } if (is_movable && (mUUID == model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE))) { - is_movable = FALSE; + is_movable = false; // tooltip? } if (is_movable && (getPreferredType() == LLFolderType::FT_MARKETPLACE_STOCK)) { // One cannot move a folder into a stock folder - is_movable = FALSE; + is_movable = false; // tooltip? } @@ -2743,14 +2743,14 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, LLInventoryModel::item_array_t descendent_items; if (is_movable) { - model->collectDescendents(cat_id, descendent_categories, descendent_items, FALSE); + model->collectDescendents(cat_id, descendent_categories, descendent_items, false); for (S32 i=0; i < descendent_categories.size(); ++i) { LLInventoryCategory* category = descendent_categories[i]; if(LLFolderType::lookupIsProtectedType(category->getPreferredType())) { // Can't move "special folders" (e.g. Textures Folder). - is_movable = FALSE; + is_movable = false; break; } } @@ -2771,7 +2771,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, if (items.size() > max_items_to_wear) { // Can't move 'large' folders into current outfit: MAINT-4086 - is_movable = FALSE; + is_movable = false; LLStringUtil::format_map_t args; args["AMOUNT"] = llformat("%d", max_items_to_wear); tooltip_msg = LLTrans::getString("TooltipTooManyWearables",args); @@ -2784,7 +2784,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, LLInventoryItem* item = descendent_items[i]; if (get_is_item_worn(item->getUUID())) { - is_movable = FALSE; + is_movable = false; break; // It's generally movable, but not into the trash. } } @@ -2799,7 +2799,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, // We use getType() instead of getActua;Type() to allow links to landmarks and folders. if (LLAssetType::AT_LANDMARK != item->getType() && LLAssetType::AT_CATEGORY != item->getType()) { - is_movable = FALSE; + is_movable = false; break; // It's generally movable, but not into Landmarks. } } @@ -2815,7 +2815,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, if (is_movable && !move_is_into_landmarks) { - LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(false); is_movable = active_panel != NULL; // For a folder to pass the filter all its descendants are required to pass. @@ -2921,7 +2921,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, inv_cat->getPreferredType() == LLFolderType::FT_OUTFIT)) { // traverse category and add all contents to currently worn. - BOOL append = true; + bool append = true; LLAppearanceMgr::instance().wearInventoryCategory(inv_cat, false, append); if (cb) cb->fire(inv_cat->getUUID()); } @@ -2986,7 +2986,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, if (move_is_into_marketplacelistings) { tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); - accept = FALSE; + accept = false; } else { @@ -3013,7 +3013,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, if (move_is_into_marketplacelistings) { tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); - accept = FALSE; + accept = false; } else { @@ -3073,9 +3073,9 @@ void warn_move_inventory(LLViewerObject* object, std::shared_ptr<LLMoveInv> move // Move/copy all inventory items from the Contents folder of an in-world // object to the agent's inventory, inside a given category. -BOOL move_inv_category_world_to_agent(const LLUUID& object_id, +bool move_inv_category_world_to_agent(const LLUUID& object_id, const LLUUID& category_id, - BOOL drop, + bool drop, std::function<void(S32, void*, const LLMoveInv*)> callback, void* user_data, LLInventoryFilter* filter) @@ -3088,7 +3088,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, if(!object) { LL_INFOS() << "Object not found for drop." << LL_ENDL; - return FALSE; + return false; } // this folder is coming from an object, as there is only one folder in an object, the root, @@ -3099,12 +3099,12 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, if (inventory_objects.empty()) { LL_INFOS() << "Object contents not found for drop." << LL_ENDL; - return FALSE; + return false; } - BOOL accept = FALSE; - BOOL is_move = FALSE; - BOOL use_filter = FALSE; + bool accept = false; + bool is_move = false; + bool use_filter = false; if (filter) { U64 filter_types = filter->getFilterTypes(); @@ -3131,15 +3131,15 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, && perm.allowTransferTo(gAgent.getID()))) // || gAgent.isGodlike()) { - accept = TRUE; + accept = true; } else if(object->permYouOwner()) { // If the object cannot be copied, but the object the // inventory is owned by the agent, then the item can be // moved from the task to agent inventory. - is_move = TRUE; - accept = TRUE; + is_move = true; + accept = true; } if (accept && use_filter) @@ -3336,7 +3336,7 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask) { if ((*id_it) == mCatID) { - mFolderAdded = TRUE; + mFolderAdded = true; break; } } @@ -3356,7 +3356,7 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask) mContentsCount) { gInventory.removeObserver(this); - LLAppearanceMgr::instance().wearInventoryCategory(category, FALSE, !mReplace); + LLAppearanceMgr::instance().wearInventoryCategory(category, false, !mReplace); delete this; } } @@ -3402,12 +3402,12 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) } else if ("replaceoutfit" == action) { - modifyOutfit(FALSE); + modifyOutfit(false); return; } else if ("addtooutfit" == action) { - modifyOutfit(TRUE); + modifyOutfit(true); return; } else if ("show_in_main_panel" == action) @@ -3708,7 +3708,7 @@ void LLFolderBridge::determineFolderType() } } -BOOL LLFolderBridge::isItemRenameable() const +bool LLFolderBridge::isItemRenameable() const { return get_is_category_renameable(getInventoryModel(), mUUID); } @@ -3722,7 +3722,7 @@ void LLFolderBridge::restoreItem() LLInventoryModel* model = getInventoryModel(); const LLUUID new_parent = model->findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(cat->getType())); // do not restamp children on restore - LLInvFVBridge::changeCategoryParent(model, cat, new_parent, FALSE); + LLInvFVBridge::changeCategoryParent(model, cat, new_parent, false); } } @@ -3741,15 +3741,15 @@ LLFolderType::EType LLFolderBridge::getPreferredType() const // Icons for folders are based on the preferred type LLUIImagePtr LLFolderBridge::getIcon() const { - return getFolderIcon(FALSE); + return getFolderIcon(false); } LLUIImagePtr LLFolderBridge::getIconOpen() const { - return getFolderIcon(TRUE); + return getFolderIcon(true); } -LLUIImagePtr LLFolderBridge::getFolderIcon(BOOL is_open) const +LLUIImagePtr LLFolderBridge::getFolderIcon(bool is_open) const { LLFolderType::EType preferred_type = getPreferredType(); return LLUI::getUIImage(LLViewerFolderType::lookupIconName(preferred_type, is_open)); @@ -3758,7 +3758,7 @@ LLUIImagePtr LLFolderBridge::getFolderIcon(BOOL is_open) const // static : use by LLLinkFolderBridge to get the closed type icons LLUIImagePtr LLFolderBridge::getIcon(LLFolderType::EType preferred_type) { - return LLUI::getUIImage(LLViewerFolderType::lookupIconName(preferred_type, FALSE)); + return LLUI::getUIImage(LLViewerFolderType::lookupIconName(preferred_type, false)); } LLUIImagePtr LLFolderBridge::getIconOverlay() const @@ -3770,7 +3770,7 @@ LLUIImagePtr LLFolderBridge::getIconOverlay() const return NULL; } -BOOL LLFolderBridge::renameItem(const std::string& new_name) +bool LLFolderBridge::renameItem(const std::string& new_name) { LLScrollOnRenameObserver *observer = new LLScrollOnRenameObserver(mUUID, mRoot); @@ -3778,16 +3778,16 @@ BOOL LLFolderBridge::renameItem(const std::string& new_name) rename_category(getInventoryModel(), mUUID, new_name); - // return FALSE because we either notified observers (& therefore + // return false because we either notified observers (& therefore // rebuilt) or we didn't update. - return FALSE; + return false; } -BOOL LLFolderBridge::removeItem() +bool LLFolderBridge::removeItem() { if(!isItemRemovable()) { - return FALSE; + return false; } const LLViewerInventoryCategory *cat = getCategory(); @@ -3798,16 +3798,16 @@ BOOL LLFolderBridge::removeItem() LLNotification::Params params("ConfirmDeleteProtectedCategory"); params.payload(payload).substitutions(args).functor.function(boost::bind(&LLFolderBridge::removeItemResponse, this, _1, _2)); LLNotifications::instance().forceResponse(params, 0); - return TRUE; + return true; } -BOOL LLFolderBridge::removeSystemFolder() +bool LLFolderBridge::removeSystemFolder() { const LLViewerInventoryCategory *cat = getCategory(); if (!LLFolderType::lookupIsProtectedType(cat->getPreferredType())) { - return FALSE; + return false; } LLSD payload; @@ -3819,7 +3819,7 @@ BOOL LLFolderBridge::removeSystemFolder() { LLNotifications::instance().add(params); } - return TRUE; + return true; } bool LLFolderBridge::removeItemResponse(const LLSD& notification, const LLSD& response) @@ -3832,9 +3832,9 @@ bool LLFolderBridge::removeItemResponse(const LLSD& notification, const LLSD& re // move it to the trash LLPreview::hide(mUUID); getInventoryModel()->removeCategory(mUUID); - return TRUE; + return true; } - return FALSE; + return false; } //Recursively update the folder's creation date @@ -3856,9 +3856,9 @@ void LLFolderBridge::pasteFromClipboard() if (model && isClipboardPasteable()) { const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); - const BOOL paste_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); + const bool paste_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); - BOOL cut_from_marketplacelistings = FALSE; + bool cut_from_marketplacelistings = false; if (LLClipboard::instance().isCutMode()) { //Items are not removed from folder on "cut", so we need update listing folder on "paste" operation @@ -3870,7 +3870,7 @@ void LLFolderBridge::pasteFromClipboard() if(gInventory.isObjectDescendentOf(item_id, marketplacelistings_id) && (LLMarketplaceData::instance().isInActiveFolder(item_id) || LLMarketplaceData::instance().isListedAndActive(item_id))) { - cut_from_marketplacelistings = TRUE; + cut_from_marketplacelistings = true; break; } } @@ -3922,12 +3922,12 @@ void LLFolderBridge::perform_pasteFromClipboard() const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); const LLUUID &lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); - const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id); - const BOOL move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id); - const BOOL move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); - const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); - const BOOL move_is_into_favorites = (mUUID == favorites_id); - const BOOL move_is_into_lost_and_found = model->isObjectDescendentOf(mUUID, lost_and_found_id); + const bool move_is_into_current_outfit = (mUUID == current_outfit_id); + const bool move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id); + const bool move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); + const bool move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); + const bool move_is_into_favorites = (mUUID == favorites_id); + const bool move_is_into_lost_and_found = model->isObjectDescendentOf(mUUID, lost_and_found_id); std::vector<LLUUID> objects; LLClipboard::instance().pasteFromClipboard(objects); @@ -4055,7 +4055,7 @@ void LLFolderBridge::perform_pasteFromClipboard() if (viitem) { //changeItemParent() implicity calls dirtyFilter - changeItemParent(model, viitem, parent_id, FALSE); + changeItemParent(model, viitem, parent_id, false); if (cb) cb->fire(item_id); } } @@ -4087,7 +4087,7 @@ void LLFolderBridge::perform_pasteFromClipboard() else { //changeCategoryParent() implicity calls dirtyFilter - changeCategoryParent(model, vicat, parent_id, FALSE); + changeCategoryParent(model, vicat, parent_id, false); } if (cb) cb->fire(item_id); } @@ -4109,7 +4109,7 @@ void LLFolderBridge::perform_pasteFromClipboard() else { //changeItemParent() implicity calls dirtyFilter - changeItemParent(model, viitem, parent_id, FALSE); + changeItemParent(model, viitem, parent_id, false); } if (cb) cb->fire(item_id); } @@ -4185,10 +4185,10 @@ void LLFolderBridge::pasteLinkFromClipboard() const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); - const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id); - const BOOL move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id); - const BOOL move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); - const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); + const bool move_is_into_current_outfit = (mUUID == current_outfit_id); + const bool move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id); + const bool move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); + const bool move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); if (move_is_into_marketplacelistings) { @@ -4241,7 +4241,7 @@ void LLFolderBridge::staticFolderOptionsMenu() } } -BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& is_type) +bool LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& is_type) { LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; @@ -4250,7 +4250,7 @@ BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInv item_array, LLInventoryModel::EXCLUDE_TRASH, is_type); - return ((item_array.size() > 0) ? TRUE : FALSE ); + return ((item_array.size() > 0) ? true : false ); } void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items, menuentry_vec_t& disabled_items) @@ -4363,12 +4363,10 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items if (!isInboxFolder() // don't allow creation in inbox && outfits_id != mUUID) { - bool menu_items_added = false; // Do not allow to create 2-level subfolder in the Calling Card/Friends folder. EXT-694. if (!LLFriendCardsManager::instance().isCategoryInFriendFolder(cat)) { items.push_back(std::string("New Folder")); - menu_items_added = true; } if (!isMarketplaceListingsFolder()) { @@ -4386,10 +4384,6 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items disabled_items.push_back("New Settings"); } } - if (menu_items_added) - { - items.push_back(std::string("Create Separator")); - } } getClipboardEntries(false, items, disabled_items, flags); } @@ -4418,12 +4412,12 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items } //Added by aura to force inventory pull on right-click to display folder options correctly. 07-17-06 - mCallingCards = mWearables = FALSE; + mCallingCards = mWearables = false; LLIsType is_callingcard(LLAssetType::AT_CALLINGCARD); if (checkFolderForContentsOfType(model, is_callingcard)) { - mCallingCards=TRUE; + mCallingCards=true; } LLFindWearables is_wearable; @@ -4434,7 +4428,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items checkFolderForContentsOfType(model, is_object) || checkFolderForContentsOfType(model, is_gesture) ) { - mWearables=TRUE; + mWearables=true; } } else @@ -4455,7 +4449,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items checkFolderForContentsOfType(model, is_object) || checkFolderForContentsOfType(model, is_gesture)) { - mWearables = TRUE; + mWearables = true; } if (!is_system_folder) @@ -4664,13 +4658,13 @@ void LLFolderBridge::addOpenFolderMenuOptions(U32 flags, menuentry_vec_t& items) bool LLFolderBridge::hasChildren() const { LLInventoryModel* model = getInventoryModel(); - if(!model) return FALSE; + if(!model) return false; LLInventoryModel::EHasChildren has_children; has_children = gInventory.categoryHasChildren(mUUID); return has_children != LLInventoryModel::CHILDREN_NO; } -BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop, +bool LLFolderBridge::dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg) @@ -4690,7 +4684,7 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop, //LL_INFOS() << "LLFolderBridge::dragOrDrop()" << LL_ENDL; - BOOL accept = FALSE; + bool accept = false; switch(cargo_type) { case DAD_TEXTURE: @@ -4707,7 +4701,7 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop, case DAD_MESH: case DAD_SETTINGS: case DAD_MATERIAL: - accept = dragItemIntoFolder(inv_item, drop, tooltip_msg, TRUE, drop_cb); + accept = dragItemIntoFolder(inv_item, drop, tooltip_msg, true, drop_cb); break; case DAD_LINK: // DAD_LINK type might mean one of two asset types: AT_LINK or AT_LINK_FOLDER. @@ -4718,22 +4712,22 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop, LLInventoryCategory* linked_category = gInventory.getCategory(inv_item->getLinkedUUID()); if (linked_category) { - accept = dragCategoryIntoFolder((LLInventoryCategory*)linked_category, drop, tooltip_msg, TRUE, TRUE, drop_cb); + accept = dragCategoryIntoFolder((LLInventoryCategory*)linked_category, drop, tooltip_msg, true, true, drop_cb); } } else { - accept = dragItemIntoFolder(inv_item, drop, tooltip_msg, TRUE, drop_cb); + accept = dragItemIntoFolder(inv_item, drop, tooltip_msg, true, drop_cb); } break; case DAD_CATEGORY: if (LLFriendCardsManager::instance().isAnyFriendCategory(mUUID)) { - accept = FALSE; + accept = false; } else { - accept = dragCategoryIntoFolder((LLInventoryCategory*)cargo_data, drop, tooltip_msg, FALSE, TRUE, drop_cb); + accept = dragCategoryIntoFolder((LLInventoryCategory*)cargo_data, drop, tooltip_msg, false, true, drop_cb); } break; case DAD_ROOT_CATEGORY: @@ -4861,7 +4855,7 @@ void LLFolderBridge::createWearable(LLFolderBridge* bridge, LLWearableType::ETyp LLAgentWearables::createWearable(type, false, parent_id); } -void LLFolderBridge::modifyOutfit(BOOL append) +void LLFolderBridge::modifyOutfit(bool append) { LLInventoryModel* model = getInventoryModel(); if(!model) return; @@ -4889,12 +4883,12 @@ void LLFolderBridge::modifyOutfit(BOOL append) if (isAgentInventory()) { - LLAppearanceMgr::instance().wearInventoryCategory(cat, FALSE, append); + LLAppearanceMgr::instance().wearInventoryCategory(cat, false, append); } else { // Library, we need to copy content first - LLAppearanceMgr::instance().wearInventoryCategory(cat, TRUE, append); + LLAppearanceMgr::instance().wearInventoryCategory(cat, true, append); } } @@ -4915,15 +4909,15 @@ LLFolderBridge(inventory, root, uuid) LLUIImagePtr LLMarketplaceFolderBridge::getIcon() const { - return getMarketplaceFolderIcon(FALSE); + return getMarketplaceFolderIcon(false); } LLUIImagePtr LLMarketplaceFolderBridge::getIconOpen() const { - return getMarketplaceFolderIcon(TRUE); + return getMarketplaceFolderIcon(true); } -LLUIImagePtr LLMarketplaceFolderBridge::getMarketplaceFolderIcon(BOOL is_open) const +LLUIImagePtr LLMarketplaceFolderBridge::getMarketplaceFolderIcon(bool is_open) const { LLFolderType::EType preferred_type = getPreferredType(); if (!LLMarketplaceData::instance().isUpdating(getUUID())) @@ -5089,7 +5083,7 @@ void LLFolderBridge::dropToFavorites(LLInventoryItem* inv_item, LLPointer<LLInve callback); } -void LLFolderBridge::dropToOutfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit, LLPointer<LLInventoryCallback> cb) +void LLFolderBridge::dropToOutfit(LLInventoryItem* inv_item, bool move_is_into_current_outfit, LLPointer<LLInventoryCallback> cb) { if((inv_item->getInventoryType() == LLInventoryType::IT_TEXTURE) || (inv_item->getInventoryType() == LLInventoryType::IT_SNAPSHOT)) { @@ -5171,7 +5165,7 @@ void LLFolderBridge::callback_dropItemIntoFolder(const LLSD& notification, const if (option == 0) // YES { std::string tooltip_msg; - dragItemIntoFolder(inv_item, TRUE, tooltip_msg, FALSE); + dragItemIntoFolder(inv_item, true, tooltip_msg, false); } } @@ -5182,24 +5176,24 @@ void LLFolderBridge::callback_dropCategoryIntoFolder(const LLSD& notification, c if (option == 0) // YES { std::string tooltip_msg; - dragCategoryIntoFolder(inv_category, TRUE, tooltip_msg, FALSE, FALSE); + dragCategoryIntoFolder(inv_category, true, tooltip_msg, false, false); } } // This is used both for testing whether an item can be dropped // into the folder, as well as performing the actual drop, depending -// if drop == TRUE. -BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, - BOOL drop, +// if drop == true. +bool LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, + bool drop, std::string& tooltip_msg, - BOOL user_confirm, + bool user_confirm, LLPointer<LLInventoryCallback> cb) { LLInventoryModel* model = getInventoryModel(); - if (!model || !inv_item) return FALSE; - if (!isAgentInventory()) return FALSE; // cannot drag into library - if (!isAgentAvatarValid()) return FALSE; + if (!model || !inv_item) return false; + if (!isAgentInventory()) return false; // cannot drag into library + if (!isAgentAvatarValid()) return false; LLInventoryPanel* destination_panel = mInventoryPanel.get(); if (!destination_panel) return false; @@ -5214,33 +5208,33 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); const LLUUID from_folder_uuid = inv_item->getParentUUID(); - const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id); - const BOOL move_is_into_favorites = (mUUID == favorites_id); - const BOOL move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id); - const BOOL move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); - const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id); - const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); - const BOOL move_is_from_marketplacelistings = model->isObjectDescendentOf(inv_item->getUUID(), marketplacelistings_id); + const bool move_is_into_current_outfit = (mUUID == current_outfit_id); + const bool move_is_into_favorites = (mUUID == favorites_id); + const bool move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id); + const bool move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); + const bool move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id); + const bool move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); + const bool move_is_from_marketplacelistings = model->isObjectDescendentOf(inv_item->getUUID(), marketplacelistings_id); LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource(); - BOOL accept = FALSE; + bool accept = false; U64 filter_types = filter->getFilterTypes(); // We shouldn't allow to drop non recent items into recent tab (or some similar transactions) // while we are allowing to interact with regular filtered inventory - BOOL use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0); + bool use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0); LLViewerObject* object = NULL; if(LLToolDragAndDrop::SOURCE_AGENT == source) { const LLUUID &trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); - const BOOL move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id); - const BOOL move_is_outof_current_outfit = LLAppearanceMgr::instance().getIsInCOF(inv_item->getUUID()); + const bool move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id); + const bool move_is_outof_current_outfit = LLAppearanceMgr::instance().getIsInCOF(inv_item->getUUID()); //-------------------------------------------------------------------------------- // Determine if item can be moved. // - BOOL is_movable = TRUE; + bool is_movable = true; switch (inv_item->getActualType()) { @@ -5253,7 +5247,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // Can't explicitly drag things out of the COF. if (move_is_outof_current_outfit) { - is_movable = FALSE; + is_movable = false; } if (move_is_into_trash) { @@ -5276,15 +5270,15 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // Determine if item can be moved & dropped // Note: if user_confirm is false, we already went through those accept logic test and can skip them - accept = TRUE; + accept = true; if (user_confirm && !is_movable) { - accept = FALSE; + accept = false; } else if (user_confirm && (mUUID == inv_item->getParentUUID()) && !move_is_into_favorites) { - accept = FALSE; + accept = false; } else if (user_confirm && (move_is_into_current_outfit || move_is_into_outfit)) { @@ -5308,7 +5302,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, accept = dest_folder->acceptItem(inv_item); } - LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(false); // Check whether the item being dragged from active inventory panel // passes the filter of the destination panel. @@ -5437,26 +5431,26 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, if (!object) { LL_INFOS() << "Object not found for drop." << LL_ENDL; - return FALSE; + return false; } // coming from a task. Need to figure out if the person can // move/copy this item. LLPermissions perm(inv_item->getPermissions()); - BOOL is_move = FALSE; + bool is_move = false; if ((perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID()) && perm.allowTransferTo(gAgent.getID()))) // || gAgent.isGodlike()) { - accept = TRUE; + accept = true; } else if(object->permYouOwner()) { // If the object cannot be copied, but the object the // inventory is owned by the agent, then the item can be // moved from the task to agent inventory. - is_move = TRUE; - accept = TRUE; + is_move = true; + accept = true; } // Don't allow placing an original item into Current Outfit or an outfit folder @@ -5464,19 +5458,19 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // *TODO: Probably we should create a link to an item if it was dragged to outfit or COF. if (move_is_into_current_outfit || move_is_into_outfit) { - accept = FALSE; + accept = false; } // Don't allow to move a single item to Favorites or Landmarks // if it is not a landmark or a link to a landmark. else if ((move_is_into_favorites || move_is_into_landmarks) && !can_move_to_landmarks(inv_item)) { - accept = FALSE; + accept = false; } else if (move_is_into_marketplacelistings) { tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); - accept = FALSE; + accept = false; } // Check whether the item being dragged from in world @@ -5519,12 +5513,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, if (move_is_into_marketplacelistings) { tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); - accept = FALSE; + accept = false; } else if ((inv_item->getActualType() == LLAssetType::AT_SETTINGS) && !LLEnvironment::instance().isInventoryEnabled()) { tooltip_msg = LLTrans::getString("NoEnvironmentSettings"); - accept = FALSE; + accept = false; } else { @@ -5553,12 +5547,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, LLViewerInventoryItem* item = (LLViewerInventoryItem*)inv_item; if(item && item->isFinished()) { - accept = TRUE; + accept = true; if (move_is_into_marketplacelistings) { tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); - accept = FALSE; + accept = false; } else if (move_is_into_current_outfit || move_is_into_outfit) { @@ -5571,7 +5565,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, accept = can_move_to_landmarks(inv_item); } - LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(false); // Check whether the item being dragged from the library // passes the filter of the destination panel. @@ -5633,7 +5627,7 @@ bool check_category(LLInventoryModel* model, LLInventoryModel::cat_array_t descendent_categories; LLInventoryModel::item_array_t descendent_items; - model->collectDescendents(cat_id, descendent_categories, descendent_items, TRUE); + model->collectDescendents(cat_id, descendent_categories, descendent_items, true); S32 num_descendent_categories = descendent_categories.size(); S32 num_descendent_items = descendent_items.size(); @@ -5880,16 +5874,16 @@ LLLandmarkBridge::LLLandmarkBridge(LLInventoryPanel* inventory, U32 flags/* = 0x00*/) : LLItemBridge(inventory, root, uuid) { - mVisited = FALSE; + mVisited = false; if (flags & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED) { - mVisited = TRUE; + mVisited = true; } } LLUIImagePtr LLLandmarkBridge::getIcon() const { - return LLInventoryIcon::getIcon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, mVisited, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, mVisited, false); } void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) @@ -6146,13 +6140,13 @@ void LLCallingCardBridge::performAction(LLInventoryModel* model, std::string act LLUIImagePtr LLCallingCardBridge::getIcon() const { - BOOL online = FALSE; + bool online = false; LLViewerInventoryItem* item = getItem(); if(item) { online = LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID()); } - return LLInventoryIcon::getIcon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, online, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, online, false); } std::string LLCallingCardBridge::getLabelSuffix() const @@ -6218,10 +6212,10 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) getClipboardEntries(true, items, disabled_items, flags); LLInventoryItem* item = getItem(); - BOOL good_card = (item + bool good_card = (item && (LLUUID::null != item->getCreatorUUID()) && (item->getCreatorUUID() != gAgent.getID())); - BOOL user_online = FALSE; + bool user_online = false; if (item) { user_online = (LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID())); @@ -6247,13 +6241,13 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) hide_context_entries(menu, items, disabled_items); } -BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, +bool LLCallingCardBridge::dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg) { LLViewerInventoryItem* item = getItem(); - BOOL rv = FALSE; + bool rv = false; if(item) { // check the type @@ -6278,7 +6272,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, if(gInventory.getItem(inv_item->getUUID()) && perm.allowOperationBy(PERM_TRANSFER, gAgent.getID())) { - rv = TRUE; + rv = true; if(drop) { LLGiveInventory::doGiveInventoryItem(item->getCreatorUUID(), @@ -6290,7 +6284,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, // It's not in the user's inventory (it's probably in // an object's contents), so disallow dragging it here. // You can't give something you don't yet have. - rv = FALSE; + rv = false; } break; } @@ -6299,7 +6293,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, LLInventoryCategory* inv_cat = (LLInventoryCategory*)cargo_data; if( gInventory.getCategory( inv_cat->getUUID() ) ) { - rv = TRUE; + rv = true; if(drop) { LLGiveInventory::doGiveInventoryCategory( @@ -6312,7 +6306,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, // It's not in the user's inventory (it's probably in // an object's contents), so disallow dragging it here. // You can't give something you don't yet have. - rv = FALSE; + rv = false; } break; } @@ -6417,8 +6411,8 @@ void LLGestureBridge::performAction(LLInventoryModel* model, std::string action) if(!LLGestureMgr::instance().isGestureActive(mUUID)) { // we need to inform server about gesture activating to be consistent with LLPreviewGesture and LLGestureComboList. - BOOL inform_server = TRUE; - BOOL deactivate_similar = FALSE; + bool inform_server = true; + bool deactivate_similar = false; LLGestureMgr::instance().setGestureLoadedCallback(mUUID, boost::bind(&LLGestureBridge::playGesture, mUUID)); LLViewerInventoryItem* item = gInventory.getItem(mUUID); llassert(item); @@ -6448,19 +6442,19 @@ void LLGestureBridge::openItem() if (item) { LLPreviewGesture* preview = LLPreviewGesture::show(mUUID, LLUUID::null); - preview->setFocus(TRUE); + preview->setFocus(true); } */ } -BOOL LLGestureBridge::removeItem() +bool LLGestureBridge::removeItem() { // Grab class information locally since *this may be deleted // within this function. Not a great pattern... const LLInventoryModel* model = getInventoryModel(); if(!model) { - return FALSE; + return false; } const LLUUID item_id = mUUID; @@ -6471,7 +6465,7 @@ BOOL LLGestureBridge::removeItem() // If deactivateGesture deleted *this, then return out immediately. if (!model->getObject(item_id)) { - return TRUE; + return true; } return LLItemBridge::removeItem(); @@ -6634,7 +6628,7 @@ LLObjectBridge::LLObjectBridge(LLInventoryPanel* inventory, LLItemBridge(inventory, root, uuid) { mAttachPt = (flags & 0xff); // low bye of inventory flags - mIsMultiObject = ( flags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) ? TRUE: FALSE; + mIsMultiObject = ( flags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) ? true: false; mInvType = type; } @@ -6796,7 +6790,7 @@ bool confirm_attachment_rez(const LLSD& notification, const LLSD& response) // attachments are batched up all into one message versus each attachment // being sent in its own separate attachments message. U8 attachment_pt = notification["payload"]["attachment_point"].asInteger(); - BOOL is_add = notification["payload"]["is_add"].asBoolean(); + bool is_add = notification["payload"]["is_add"].asBoolean(); LL_DEBUGS("Avatar") << "ATT calling addAttachmentRequest " << (itemp ? itemp->getName() : "UNKNOWN") << " id " << item_id << LL_ENDL; LLAttachmentsMgr::instance().addAttachmentRequest(item_id, attachment_pt, is_add); @@ -6874,8 +6868,8 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) disabled_items.push_back(std::string("Attach To")); disabled_items.push_back(std::string("Attach To HUD")); } - LLMenuGL* attach_menu = menu.findChildMenuByName("Attach To", TRUE); - LLMenuGL* attach_hud_menu = menu.findChildMenuByName("Attach To HUD", TRUE); + LLMenuGL* attach_menu = menu.findChildMenuByName("Attach To", true); + LLMenuGL* attach_hud_menu = menu.findChildMenuByName("Attach To HUD", true); if (attach_menu && (attach_menu->getChildCount() == 0) && attach_hud_menu @@ -6916,20 +6910,20 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) hide_context_entries(menu, items, disabled_items); } -BOOL LLObjectBridge::renameItem(const std::string& new_name) +bool LLObjectBridge::renameItem(const std::string& new_name) { if(!isItemRenameable()) - return FALSE; + return false; LLPreview::dirty(mUUID); LLInventoryModel* model = getInventoryModel(); if(!model) - return FALSE; + return false; LLViewerInventoryItem* item = getItem(); if(item && (item->getName() != new_name)) { LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); new_item->rename(new_name); - new_item->updateServer(FALSE); + new_item->updateServer(false); model->updateItem(new_item); model->notifyObservers(); buildDisplayName(); @@ -6940,15 +6934,15 @@ BOOL LLObjectBridge::renameItem(const std::string& new_name) if(obj) { LLSelectMgr::getInstance()->deselectAll(); - LLSelectMgr::getInstance()->addAsIndividual( obj, SELECT_ALL_TES, FALSE ); + LLSelectMgr::getInstance()->addAsIndividual( obj, SELECT_ALL_TES, false ); LLSelectMgr::getInstance()->selectionSetObjectName( new_name ); LLSelectMgr::getInstance()->deselectAll(); } } } - // return FALSE because we either notified observers (& therefore + // return false because we either notified observers (& therefore // rebuilt) or we didn't update. - return FALSE; + return false; } // +=================================================+ @@ -6982,7 +6976,7 @@ LLWearableBridge::LLWearableBridge(LLInventoryPanel* inventory, mInvType = inv_type; } -BOOL LLWearableBridge::renameItem(const std::string& new_name) +bool LLWearableBridge::renameItem(const std::string& new_name) { if (get_is_item_worn(mUUID)) { @@ -7006,7 +7000,7 @@ std::string LLWearableBridge::getLabelSuffix() const LLUIImagePtr LLWearableBridge::getIcon() const { - return LLInventoryIcon::getIcon(mAssetType, mInvType, mWearableType, FALSE); + return LLInventoryIcon::getIcon(mAssetType, mInvType, mWearableType, false); } // virtual @@ -7056,7 +7050,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { // FWIW, it looks like SUPPRESS_OPEN_ITEM is not set anywhere - BOOL can_open = ((flags & SUPPRESS_OPEN_ITEM) != SUPPRESS_OPEN_ITEM); + bool can_open = ((flags & SUPPRESS_OPEN_ITEM) != SUPPRESS_OPEN_ITEM); // If we have clothing, don't add "Open" as it's the same action as "Wear" SL-18976 LLViewerInventoryItem* item = getItem(); @@ -7067,7 +7061,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } if (isLinkedObjectMissing()) { - can_open = FALSE; + can_open = false; } items.push_back(std::string("Share")); if (!canShare()) @@ -7145,14 +7139,14 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) // Called from menus // static -BOOL LLWearableBridge::canWearOnAvatar(void* user_data) +bool LLWearableBridge::canWearOnAvatar(void* user_data) { LLWearableBridge* self = (LLWearableBridge*)user_data; - if(!self) return FALSE; + if(!self) return false; if(!self->isAgentInventory()) { LLViewerInventoryItem* item = (LLViewerInventoryItem*)self->getItem(); - if(!item || !item->isFinished()) return FALSE; + if(!item || !item->isFinished()) return false; } return (!get_is_item_worn(self->mUUID)); } @@ -7241,10 +7235,10 @@ void LLWearableBridge::onWearAddOnAvatarArrived( LLViewerWearable* wearable, voi } // static -BOOL LLWearableBridge::canEditOnAvatar(void* user_data) +bool LLWearableBridge::canEditOnAvatar(void* user_data) { LLWearableBridge* self = (LLWearableBridge*)user_data; - if(!self) return FALSE; + if(!self) return false; return (get_is_item_worn(self->mUUID)); } @@ -7265,14 +7259,14 @@ void LLWearableBridge::editOnAvatar() } // static -BOOL LLWearableBridge::canRemoveFromAvatar(void* user_data) +bool LLWearableBridge::canRemoveFromAvatar(void* user_data) { LLWearableBridge* self = (LLWearableBridge*)user_data; if( self && (LLAssetType::AT_BODYPART != self->mAssetType) ) { return get_is_item_worn( self->mUUID ); } - return FALSE; + return false; } void LLWearableBridge::removeFromAvatar() @@ -7330,7 +7324,7 @@ LLSettingsBridge::LLSettingsBridge(LLInventoryPanel* inventory, LLUIImagePtr LLSettingsBridge::getIcon() const { - return LLInventoryIcon::getIcon(LLAssetType::AT_SETTINGS, LLInventoryType::IT_SETTINGS, mSettingsType, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_SETTINGS, LLInventoryType::IT_SETTINGS, mSettingsType, false); } void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action) @@ -7436,20 +7430,20 @@ void LLSettingsBridge::buildContextMenu(LLMenuGL& menu, U32 flags) hide_context_entries(menu, items, disabled_items); } -BOOL LLSettingsBridge::renameItem(const std::string& new_name) +bool LLSettingsBridge::renameItem(const std::string& new_name) { /*TODO: change internal settings name? */ return LLItemBridge::renameItem(new_name); } -BOOL LLSettingsBridge::isItemRenameable() const +bool LLSettingsBridge::isItemRenameable() const { LLViewerInventoryItem* item = getItem(); if (item) { return (item->getPermissions().allowModifyBy(gAgent.getID())); } - return FALSE; + return false; } bool LLSettingsBridge::canUpdateParcel() const @@ -7558,7 +7552,7 @@ void LLLinkFolderBridge::gotoItem() LLFolderViewItem *base_folder = LLInventoryPanel::getActiveInventoryPanel()->getItemByID(cat_uuid); if (base_folder) { - base_folder->setOpen(TRUE); + base_folder->setOpen(true); } } } @@ -7745,7 +7739,7 @@ public: if (item) { LLPreviewGesture* preview = LLPreviewGesture::show(mUUID, LLUUID::null); - preview->setFocus(TRUE); + preview->setFocus(true); } LLInvFVBridgeAction::doIt(); } @@ -7828,24 +7822,24 @@ public: virtual ~LLWearableBridgeAction(){} protected: LLWearableBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} - BOOL isItemInTrash() const; + bool isItemInTrash() const; // return true if the item is in agent inventory. if false, it // must be lost or in the inventory library. - BOOL isAgentInventory() const; + bool isAgentInventory() const; void wearOnAvatar(); }; -BOOL LLWearableBridgeAction::isItemInTrash() const +bool LLWearableBridgeAction::isItemInTrash() const { - if(!mModel) return FALSE; + if(!mModel) return false; const LLUUID trash_id = mModel->findCategoryUUIDForType(LLFolderType::FT_TRASH); return mModel->isObjectDescendentOf(mUUID, trash_id); } -BOOL LLWearableBridgeAction::isAgentInventory() const +bool LLWearableBridgeAction::isAgentInventory() const { - if(!mModel) return FALSE; - if(gInventory.getRootFolderID() == mUUID) return TRUE; + if(!mModel) return false; + if(gInventory.getRootFolderID() == mUUID) return true; return mModel->isObjectDescendentOf(mUUID, gInventory.getRootFolderID()); } |