summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r--indra/newview/llinventorypanel.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index ab04a8589a..462b4929a2 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -377,7 +377,7 @@ void LLInventoryPanel::initializeViewBuilding()
}
/*virtual*/
-void LLInventoryPanel::onVisibilityChange(BOOL new_visibility)
+void LLInventoryPanel::onVisibilityChange(bool new_visibility)
{
if (new_visibility && mViewsInitialized == VIEWS_UNINITIALIZED)
{
@@ -476,7 +476,7 @@ U32 LLInventoryPanel::getSortOrder() const
return getFolderViewModel()->getSorter().getSortOrder();
}
-void LLInventoryPanel::setSinceLogoff(BOOL sl)
+void LLInventoryPanel::setSinceLogoff(bool sl)
{
getFilter().setDateRangeLastLogoff(sl);
}
@@ -645,7 +645,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve
// Select any newly created object that has the auto rename at top of folder root set.
if(mFolderRoot.get()->getRoot()->needsAutoRename())
{
- setSelection(item_id, FALSE);
+ setSelection(item_id, false);
}
updateFolderLabel(model_item->getParentUUID());
}
@@ -674,7 +674,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve
const LLUUID trash_id = mInventory->findCategoryUUIDForType(LLFolderType::FT_TRASH);
if (trash_id != model_item->getParentUUID() && (mask & LLInventoryObserver::INTERNAL) && new_parent->isOpen())
{
- setSelection(item_id, FALSE);
+ setSelection(item_id, false);
}
}
updateFolderLabel(model_item->getParentUUID());
@@ -883,16 +883,16 @@ void LLInventoryPanel::idle(void* user_data)
EAcceptance last_accept = LLToolDragAndDrop::getInstance()->getLastAccept();
if (last_accept == ACCEPT_YES_SINGLE || last_accept == ACCEPT_YES_COPY_SINGLE)
{
- panel->mFolderRoot.get()->setShowSingleSelection(TRUE);
+ panel->mFolderRoot.get()->setShowSingleSelection(true);
}
else
{
- panel->mFolderRoot.get()->setShowSingleSelection(FALSE);
+ panel->mFolderRoot.get()->setShowSingleSelection(false);
}
}
else
{
- panel->mFolderRoot.get()->setShowSingleSelection(FALSE);
+ panel->mFolderRoot.get()->setShowSingleSelection(false);
}
}
else
@@ -946,14 +946,14 @@ void LLInventoryPanel::initializeViews(F64 max_time)
LLFolderViewFolder* lib_folder = getFolderByID(gInventory.getLibraryRootFolderID());
if (lib_folder)
{
- lib_folder->setOpen(TRUE);
+ lib_folder->setOpen(true);
}
// Auto close the user's my inventory folder
LLFolderViewFolder* my_inv_folder = getFolderByID(gInventory.getRootFolderID());
if (my_inv_folder)
{
- my_inv_folder->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_DOWN);
+ my_inv_folder->setOpenArrangeRecursively(false, LLFolderViewFolder::RECURSE_DOWN);
}
}
}
@@ -1142,7 +1142,7 @@ LLFolderViewItem* LLInventoryPanel::buildViewsTree(const LLUUID& id,
// In the case of the root folder been shown, open that folder by default once the widget is created
if (create_root)
{
- folder_view_item->setOpen(TRUE);
+ folder_view_item->setOpen(true);
}
}
}
@@ -1326,7 +1326,7 @@ void LLInventoryPanel::openStartFolderOrMyInventory()
&& fchild->getViewModelItem()
&& fchild->getViewModelItem()->getName() == "My Inventory")
{
- fchild->setOpen(TRUE);
+ fchild->setOpen(true);
break;
}
}
@@ -1348,13 +1348,13 @@ void LLInventoryPanel::openSelected()
void LLInventoryPanel::unSelectAll()
{
- mFolderRoot.get()->setSelection(NULL, FALSE, FALSE);
+ mFolderRoot.get()->setSelection(NULL, false, false);
}
-BOOL LLInventoryPanel::handleHover(S32 x, S32 y, MASK mask)
+bool LLInventoryPanel::handleHover(S32 x, S32 y, MASK mask)
{
- BOOL handled = LLView::handleHover(x, y, mask);
+ bool handled = LLView::handleHover(x, y, mask);
if(handled)
{
// getCursor gets current cursor, setCursor sets next cursor
@@ -1370,10 +1370,10 @@ BOOL LLInventoryPanel::handleHover(S32 x, S32 y, MASK mask)
{
getWindow()->setCursor(UI_CURSOR_ARROW);
}
- return TRUE;
+ return true;
}
-BOOL LLInventoryPanel::handleToolTip(S32 x, S32 y, MASK mask)
+bool LLInventoryPanel::handleToolTip(S32 x, S32 y, MASK mask)
{
if (const LLFolderViewItem* hover_item_p = (!mFolderRoot.isDead()) ? mFolderRoot.get()->getHoveredItem() : nullptr)
{
@@ -1398,19 +1398,19 @@ BOOL LLInventoryPanel::handleToolTip(S32 x, S32 y, MASK mask)
.delay_time(LLView::getTooltipTimeout())
.create_callback(boost::bind(&LLInspectTextureUtil::createInventoryToolTip, _1))
.create_params(params));
- return TRUE;
+ return true;
}
}
return LLPanel::handleToolTip(x, y, mask);
}
-BOOL LLInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+bool LLInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
std::string& tooltip_msg)
{
- BOOL handled = FALSE;
+ bool handled = false;
if (mAcceptsDragAndDrop)
{
@@ -1478,11 +1478,11 @@ bool LLInventoryPanel::addBadge(LLBadge * badge)
void LLInventoryPanel::openAllFolders()
{
- mFolderRoot.get()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN);
+ mFolderRoot.get()->setOpenArrangeRecursively(true, LLFolderViewFolder::RECURSE_DOWN);
mFolderRoot.get()->arrangeAll();
}
-void LLInventoryPanel::setSelection(const LLUUID& obj_id, BOOL take_keyboard_focus)
+void LLInventoryPanel::setSelection(const LLUUID& obj_id, bool take_keyboard_focus)
{
// Don't select objects in COF (e.g. to prevent refocus when items are worn).
const LLInventoryObject *obj = mInventory->getObject(obj_id);
@@ -1493,7 +1493,7 @@ void LLInventoryPanel::setSelection(const LLUUID& obj_id, BOOL take_keyboard_foc
setSelectionByID(obj_id, take_keyboard_focus);
}
-void LLInventoryPanel::setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, BOOL user_action)>& cb)
+void LLInventoryPanel::setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, bool user_action)>& cb)
{
if (mFolderRoot.get())
{
@@ -1513,7 +1513,7 @@ LLInventoryPanel::selected_items_t LLInventoryPanel::getSelectedItems() const
return mFolderRoot.get()->getSelectionList();
}
-void LLInventoryPanel::onSelectionChange(const std::deque<LLFolderViewItem*>& items, BOOL user_action)
+void LLInventoryPanel::onSelectionChange(const std::deque<LLFolderViewItem*>& items, bool user_action)
{
// Schedule updating the folder view context menu when all selected items become complete (STORM-373).
mCompletionObserver->reset();
@@ -1541,7 +1541,7 @@ void LLInventoryPanel::onSelectionChange(const std::deque<LLFolderViewItem*>& it
LLFolderView* fv = mFolderRoot.get();
if (fv->needsAutoRename()) // auto-selecting a new user-created asset and preparing to rename
{
- fv->setNeedsAutoRename(FALSE);
+ fv->setNeedsAutoRename(false);
if (items.size()) // new asset is visible and selected
{
fv->startRenamingSelectedItem();
@@ -1813,7 +1813,7 @@ bool LLInventoryPanel::attachObject(const LLSD& userdata)
return true;
}
-BOOL LLInventoryPanel::getSinceLogoff()
+bool LLInventoryPanel::getSinceLogoff()
{
return getFilter().isSinceLogoff();
}
@@ -1826,15 +1826,15 @@ void LLInventoryPanel::dumpSelectionInformation(void* user_data)
iv->mFolderRoot.get()->dumpSelectionInformation();
}
-BOOL is_inventorysp_active()
+bool is_inventorysp_active()
{
LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
- if (!sidepanel_inventory || !sidepanel_inventory->isInVisibleChain()) return FALSE;
+ if (!sidepanel_inventory || !sidepanel_inventory->isInVisibleChain()) return false;
return sidepanel_inventory->isMainInventoryPanelActive();
}
// static
-LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
+LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(bool auto_open)
{
S32 z_min = S32_MAX;
LLInventoryPanel* res = NULL;
@@ -1844,7 +1844,7 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
if (!floater_inventory)
{
LL_WARNS() << "Could not find My Inventory floater" << LL_ENDL;
- return FALSE;
+ return nullptr;
}
LLSidepanelInventory *inventory_panel = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
@@ -1873,7 +1873,7 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
// Make sure the floater is not minimized (STORM-438).
if (active_inv_floaterp && active_inv_floaterp->isMinimized())
{
- active_inv_floaterp->setMinimized(FALSE);
+ active_inv_floaterp->setMinimized(false);
}
}
else if (auto_open)
@@ -1956,7 +1956,7 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(bool auto_open, const L
LLFloater* floater_inventory = LLFloaterReg::getInstance("inventory");
if (floater_inventory)
{
- floater_inventory->setFocus(TRUE);
+ floater_inventory->setFocus(true);
}
active_panel->setSelection(obj_id, take_keyboard_focus);
}
@@ -1991,7 +1991,7 @@ void LLInventoryPanel::addHideFolderType(LLFolderType::EType folder_type)
getFilter().setFilterCategoryTypes(getFilter().getFilterCategoryTypes() & ~(1ULL << folder_type));
}
-BOOL LLInventoryPanel::getIsHiddenFolderType(LLFolderType::EType folder_type) const
+bool LLInventoryPanel::getIsHiddenFolderType(LLFolderType::EType folder_type) const
{
return !(getFilter().getFilterCategoryTypes() & (1ULL << folder_type));
}
@@ -2005,7 +2005,7 @@ void LLInventoryPanel::removeItemID(const LLUUID& id)
{
LLInventoryModel::cat_array_t categories;
LLInventoryModel::item_array_t items;
- gInventory.collectDescendents(id, categories, items, TRUE);
+ gInventory.collectDescendents(id, categories, items, true);
mItemMap.erase(id);
@@ -2045,7 +2045,7 @@ LLFolderViewFolder* LLInventoryPanel::getFolderByID(const LLUUID& id)
}
-void LLInventoryPanel::setSelectionByID( const LLUUID& obj_id, BOOL take_keyboard_focus )
+void LLInventoryPanel::setSelectionByID( const LLUUID& obj_id, bool take_keyboard_focus )
{
LLFolderViewItem* itemp = getItemByID(obj_id);
@@ -2060,7 +2060,7 @@ void LLInventoryPanel::setSelectionByID( const LLUUID& obj_id, BOOL take_keyb
if(itemp && itemp->getViewModelItem())
{
- itemp->arrangeAndSet(TRUE, take_keyboard_focus);
+ itemp->arrangeAndSet(true, take_keyboard_focus);
mSelectThisID.setNull();
mFocusSelection = false;
return;
@@ -2093,9 +2093,9 @@ void LLInventoryPanel::doToSelected(const LLSD& userdata)
return;
}
-BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask )
+bool LLInventoryPanel::handleKeyHere( KEY key, MASK mask )
{
- BOOL handled = FALSE;
+ bool handled = false;
switch (key)
{
case KEY_RETURN:
@@ -2115,7 +2115,7 @@ BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask )
}
}
LLInventoryAction::doToSelected(mInventory, mFolderRoot.get(), "open");
- handled = TRUE;
+ handled = true;
}
break;
case KEY_DELETE:
@@ -2127,7 +2127,7 @@ BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask )
if (isSelectionRemovable() && (mask == MASK_NONE))
{
LLInventoryAction::doToSelected(mInventory, mFolderRoot.get(), "delete");
- handled = TRUE;
+ handled = true;
}
break;
}
@@ -2238,7 +2238,7 @@ void LLInventorySingleFolderPanel::onFocusReceived()
if (folder_view->getVisible())
{
const LLFolderViewModelItemInventory* modelp = static_cast<const LLFolderViewModelItemInventory*>(folder_view->getViewModelItem());
- setSelectionByID(modelp->getUUID(), TRUE);
+ setSelectionByID(modelp->getUUID(), true);
// quick and dirty fix: don't scroll on switching focus
// todo: better 'tab' support, one that would work for LLInventoryPanel
mFolderRoot.get()->stopAutoScollining();
@@ -2259,7 +2259,7 @@ void LLInventorySingleFolderPanel::onFocusReceived()
if (item_view->getVisible())
{
const LLFolderViewModelItemInventory* modelp = static_cast<const LLFolderViewModelItemInventory*>(item_view->getViewModelItem());
- setSelectionByID(modelp->getUUID(), TRUE);
+ setSelectionByID(modelp->getUUID(), true);
mFolderRoot.get()->stopAutoScollining();
break;
}
@@ -2485,13 +2485,13 @@ void LLAssetFilteredInventoryPanel::initFromParams(const Params& p)
getFilter().setFilterNoMarketplaceFolder();
}
-BOOL LLAssetFilteredInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+bool LLAssetFilteredInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
EDragAndDropType cargo_type,
void* cargo_data,
EAcceptance* accept,
std::string& tooltip_msg)
{
- BOOL result = FALSE;
+ bool result = false;
if (mAcceptsDragAndDrop)
{