diff options
Diffstat (limited to 'indra/newview/llpanelobjectinventory.cpp')
-rw-r--r-- | indra/newview/llpanelobjectinventory.cpp | 124 |
1 files changed, 62 insertions, 62 deletions
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 18e134e4e4..4af8f9efdc 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -127,17 +127,17 @@ public: virtual void closeItem() {} virtual void selectItem() {} virtual void navigateToFolder(bool new_window = false, bool change_mode = false) {} - virtual BOOL isItemRenameable() const; + virtual bool isItemRenameable() const; virtual bool renameItem(const std::string& new_name); - virtual BOOL isItemMovable() const; - virtual BOOL isItemRemovable() const; - virtual BOOL removeItem(); + virtual bool isItemMovable() const; + virtual bool isItemRemovable() const; + virtual bool removeItem(); virtual void removeBatch(std::vector<LLFolderViewModelItem*>& batch); virtual void move(LLFolderViewModelItem* parent_listener); virtual bool isItemCopyable(bool can_copy_as_link = true) const; - virtual BOOL copyToClipboard() const; - virtual BOOL cutToClipboard(); - virtual BOOL isClipboardPasteable() const; + virtual bool copyToClipboard() const; + virtual bool cutToClipboard(); + virtual bool isClipboardPasteable() const; virtual void pasteFromClipboard(); virtual void pasteLinkFromClipboard(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); @@ -154,7 +154,7 @@ public: // LLDragAndDropBridge functionality virtual LLToolDragAndDrop::ESource getDragSource() const { return LLToolDragAndDrop::SOURCE_WORLD; } virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; - virtual BOOL dragOrDrop(MASK mask, BOOL drop, + virtual bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg); @@ -288,9 +288,9 @@ void LLTaskInvFVBridge::openItem() LL_DEBUGS() << "LLTaskInvFVBridge::openItem()" << LL_ENDL; } -BOOL LLTaskInvFVBridge::isItemRenameable() const +bool LLTaskInvFVBridge::isItemRenameable() const { - if(gAgent.isGodlike()) return TRUE; + if(gAgent.isGodlike()) return true; LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(object) { @@ -298,10 +298,10 @@ BOOL LLTaskInvFVBridge::isItemRenameable() const if(item && gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), GP_OBJECT_MANIPULATE, GOD_LIKE)) { - return TRUE; + return true; } } - return FALSE; + return false; } bool LLTaskInvFVBridge::renameItem(const std::string& new_name) @@ -325,26 +325,26 @@ bool LLTaskInvFVBridge::renameItem(const std::string& new_name) return true; } -BOOL LLTaskInvFVBridge::isItemMovable() const +bool LLTaskInvFVBridge::isItemMovable() const { //LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); //if(object && (object->permModify() || gAgent.isGodlike())) //{ - // return TRUE; + // return true; //} - //return FALSE; + //return false; return true; } -BOOL LLTaskInvFVBridge::isItemRemovable() const +bool LLTaskInvFVBridge::isItemRemovable() const { const LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(object && (object->permModify() || object->permYouOwner())) { - return TRUE; + return true; } - return FALSE; + return false; } bool remove_task_inventory_callback(const LLSD& notification, const LLSD& response, LLPanelObjectInventory* panel) @@ -372,7 +372,7 @@ bool remove_task_inventory_callback(const LLSD& notification, const LLSD& respon // ! REFACTOR ! two_uuids_list_t is also defined in llinventorybridge.h, but differently. typedef std::pair<LLUUID, std::list<LLUUID> > panel_two_uuids_list_t; typedef std::pair<LLPanelObjectInventory*, panel_two_uuids_list_t> remove_data_t; -BOOL LLTaskInvFVBridge::removeItem() +bool LLTaskInvFVBridge::removeItem() { if(isItemRemovable() && mPanel) { @@ -383,7 +383,7 @@ BOOL LLTaskInvFVBridge::removeItem() { // just do it. object->removeInventory(mUUID); - return TRUE; + return true; } else { @@ -391,11 +391,11 @@ BOOL LLTaskInvFVBridge::removeItem() payload["task_id"] = mPanel->getTaskUUID(); payload["inventory_ids"].append(mUUID); LLNotificationsUtil::add("RemoveItemWarn", LLSD(), payload, boost::bind(&remove_task_inventory_callback, _1, _2, mPanel)); - return FALSE; + return false; } } } - return FALSE; + return false; } void LLTaskInvFVBridge::removeBatch(std::vector<LLFolderViewModelItem*>& batch) @@ -450,19 +450,19 @@ bool LLTaskInvFVBridge::isItemCopyable(bool can_link) const GP_OBJECT_MANIPULATE); } -BOOL LLTaskInvFVBridge::copyToClipboard() const +bool LLTaskInvFVBridge::copyToClipboard() const { - return FALSE; + return false; } -BOOL LLTaskInvFVBridge::cutToClipboard() +bool LLTaskInvFVBridge::cutToClipboard() { - return FALSE; + return false; } -BOOL LLTaskInvFVBridge::isClipboardPasteable() const +bool LLTaskInvFVBridge::isClipboardPasteable() const { - return FALSE; + return false; } void LLTaskInvFVBridge::pasteFromClipboard() @@ -511,13 +511,13 @@ BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const return FALSE; } -BOOL LLTaskInvFVBridge::dragOrDrop(MASK mask, BOOL drop, +bool LLTaskInvFVBridge::dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg) { //LL_INFOS() << "LLTaskInvFVBridge::dragOrDrop()" << LL_ENDL; - return FALSE; + return false; } // virtual @@ -585,14 +585,14 @@ public: virtual LLUIImagePtr getIcon() const; virtual const std::string& getDisplayName() const; - virtual BOOL isItemRenameable() const; + virtual bool isItemRenameable() const; // virtual BOOL isItemCopyable() const { return FALSE; } virtual bool renameItem(const std::string& new_name); - virtual BOOL isItemRemovable() const; + virtual bool isItemRemovable() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual bool hasChildren() const; virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; - virtual BOOL dragOrDrop(MASK mask, BOOL drop, + virtual bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg); @@ -638,9 +638,9 @@ const std::string& LLTaskCategoryBridge::getDisplayName() const return mDisplayName; } -BOOL LLTaskCategoryBridge::isItemRenameable() const +bool LLTaskCategoryBridge::isItemRenameable() const { - return FALSE; + return false; } bool LLTaskCategoryBridge::renameItem(const std::string& new_name) @@ -648,9 +648,9 @@ bool LLTaskCategoryBridge::renameItem(const std::string& new_name) return false; } -BOOL LLTaskCategoryBridge::isItemRemovable() const +bool LLTaskCategoryBridge::isItemRemovable() const { - return FALSE; + return false; } void LLTaskCategoryBridge::buildContextMenu(LLMenuGL& menu, U32 flags) @@ -664,7 +664,7 @@ bool LLTaskCategoryBridge::hasChildren() const { // return TRUE if we have or do know know if we have children. // *FIX: For now, return FALSE - we will know for sure soon enough. - return FALSE; + return false; } void LLTaskCategoryBridge::openItem() @@ -691,13 +691,13 @@ BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const return FALSE; } -BOOL LLTaskCategoryBridge::dragOrDrop(MASK mask, BOOL drop, +bool LLTaskCategoryBridge::dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg) { //LL_INFOS() << "LLTaskCategoryBridge::dragOrDrop()" << LL_ENDL; - BOOL accept = FALSE; + bool accept = false; LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(object) { @@ -739,7 +739,7 @@ BOOL LLTaskCategoryBridge::dragOrDrop(MASK mask, BOOL drop, && (LLToolDragAndDrop::SOURCE_WORLD != LLToolDragAndDrop::getInstance()->getSource()) && (LLToolDragAndDrop::SOURCE_NOTECARD != LLToolDragAndDrop::getInstance()->getSource())) { - accept = TRUE; + accept = true; } if(accept && drop) { @@ -905,13 +905,13 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} - virtual BOOL isItemRenameable() const; + virtual bool isItemRenameable() const; virtual bool renameItem(const std::string& new_name); }; -BOOL LLTaskCallingCardBridge::isItemRenameable() const +bool LLTaskCallingCardBridge::isItemRenameable() const { - return FALSE; + return false; } bool LLTaskCallingCardBridge::renameItem(const std::string& new_name) @@ -945,7 +945,7 @@ public: virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); - virtual BOOL removeItem(); + virtual bool removeItem(); //virtual void buildContextMenu(LLMenuGL& menu); //static void copyToInventory(void* userdata); @@ -976,7 +976,7 @@ void LLTaskLSLBridge::openItem() } } -BOOL LLTaskLSLBridge::removeItem() +bool LLTaskLSLBridge::removeItem() { LLFloaterReg::hideInstance("preview_scriptedit", LLSD(mUUID)); return LLTaskInvFVBridge::removeItem(); @@ -1010,7 +1010,7 @@ public: virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); - virtual BOOL removeItem(); + virtual bool removeItem(); }; void LLTaskNotecardBridge::openItem() @@ -1039,7 +1039,7 @@ void LLTaskNotecardBridge::openItem() } } -BOOL LLTaskNotecardBridge::removeItem() +bool LLTaskNotecardBridge::removeItem() { LLFloaterReg::hideInstance("preview_notecard", LLSD(mUUID)); return LLTaskInvFVBridge::removeItem(); @@ -1059,7 +1059,7 @@ public: virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); - virtual BOOL removeItem(); + virtual bool removeItem(); }; void LLTaskGestureBridge::openItem() @@ -1072,7 +1072,7 @@ void LLTaskGestureBridge::openItem() LLPreviewGesture::show(mUUID, mPanel->getTaskUUID()); } -BOOL LLTaskGestureBridge::removeItem() +bool LLTaskGestureBridge::removeItem() { // Don't need to deactivate gesture because gestures inside objects can never be active. LLFloaterReg::hideInstance("preview_gesture", LLSD(mUUID)); @@ -1093,7 +1093,7 @@ public: virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); - virtual BOOL removeItem(); + virtual bool removeItem(); }; void LLTaskAnimationBridge::openItem() @@ -1111,7 +1111,7 @@ void LLTaskAnimationBridge::openItem() } } -BOOL LLTaskAnimationBridge::removeItem() +bool LLTaskAnimationBridge::removeItem() { LLFloaterReg::hideInstance("preview_anim", LLSD(mUUID)); return LLTaskInvFVBridge::removeItem(); @@ -1179,7 +1179,7 @@ public: BOOL canOpenItem() const override { return TRUE; } void openItem() override; - BOOL removeItem() override; + bool removeItem() override; }; void LLTaskMaterialBridge::openItem() @@ -1210,7 +1210,7 @@ void LLTaskMaterialBridge::openItem() } } -BOOL LLTaskMaterialBridge::removeItem() +bool LLTaskMaterialBridge::removeItem() { LLFloaterReg::hideInstance("material_editor", LLSD(mUUID)); return LLTaskInvFVBridge::removeItem(); @@ -1359,7 +1359,7 @@ LLPanelObjectInventory::~LLPanelObjectInventory() } } -BOOL LLPanelObjectInventory::postBuild() +bool LLPanelObjectInventory::postBuild() { // clear contents and initialize menus, sets up mFolders reset(); @@ -1367,7 +1367,7 @@ BOOL LLPanelObjectInventory::postBuild() // Register an idle update callback gIdleCallbacks.addFunction(idle, this); - return TRUE; + return true; } void LLPanelObjectInventory::doToSelected(const LLSD& userdata) @@ -1789,14 +1789,14 @@ void LLPanelObjectInventory::deleteAllChildren() LLView::deleteAllChildren(); } -BOOL LLPanelObjectInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) +bool LLPanelObjectInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) { if (mFolders) { LLFolderViewItem* folderp = mFolders->getNextFromChild(NULL); if (!folderp) { - return FALSE; + return false; } // Try to pass on unmodified mouse coordinates S32 local_x = x - mFolders->getRect().mLeft; @@ -1814,7 +1814,7 @@ BOOL LLPanelObjectInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL dro } else { - return FALSE; + return false; } } @@ -1880,9 +1880,9 @@ void LLPanelObjectInventory::clearItemIDs() mItemMap.clear(); } -BOOL LLPanelObjectInventory::handleKeyHere( KEY key, MASK mask ) +bool LLPanelObjectInventory::handleKeyHere( KEY key, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; switch (key) { case KEY_DELETE: @@ -1894,7 +1894,7 @@ BOOL LLPanelObjectInventory::handleKeyHere( KEY key, MASK mask ) if (isSelectionRemovable() && mask == MASK_NONE) { LLInventoryAction::doToSelected(&gInventory, mFolders, "delete"); - handled = TRUE; + handled = true; } break; } |