summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmaininventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r--indra/newview/llpanelmaininventory.cpp166
1 files changed, 83 insertions, 83 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 47f952781d..875eae4418 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -83,8 +83,8 @@ public:
/*virtual*/ bool postBuild();
void changeFilter(LLInventoryFilter* filter);
void updateElementsFromFilter();
- BOOL getCheckShowEmpty();
- BOOL getCheckSinceLogoff();
+ bool getCheckShowEmpty();
+ bool getCheckSinceLogoff();
U32 getDateSearchDirection();
void onCreatorSelfFilterCommit();
@@ -139,7 +139,7 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p)
mSavedFolderState = new LLSaveFolderState();
- mSavedFolderState->setApply(FALSE);
+ mSavedFolderState->setApply(false);
}
bool LLPanelMainInventory::postBuild()
@@ -168,7 +168,7 @@ bool LLPanelMainInventory::postBuild()
if (recent_items_panel)
{
// assign default values until we will be sure that we have setting to restore
- recent_items_panel->setSinceLogoff(TRUE);
+ recent_items_panel->setSinceLogoff(true);
recent_items_panel->setSortOrder(LLInventoryFilter::SO_DATE);
recent_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
LLInventoryFilter& recent_filter = recent_items_panel->getFilter();
@@ -292,7 +292,7 @@ bool LLPanelMainInventory::postBuild()
// Trigger callback for focus received so we can deselect items in inbox/outbox
LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMainInventory::onFocusReceived, this));
- return TRUE;
+ return true;
}
// Destroys the object
@@ -382,7 +382,7 @@ void LLPanelMainInventory::startSearch()
// this forces focus to line editor portion of search editor
if (mFilterEditor)
{
- mFilterEditor->focusFirstItem(TRUE);
+ mFilterEditor->focusFirstItem(true);
}
}
@@ -401,7 +401,7 @@ bool LLPanelMainInventory::handleKeyHere(KEY key, MASK mask)
// move focus to inventory proper
mActivePanel->setFocus(true);
root_folder->scrollToShowSelection();
- return TRUE;
+ return true;
}
if (mActivePanel->hasFocus() && key == KEY_UP)
@@ -598,7 +598,7 @@ void LLPanelMainInventory::findLinks(const LLUUID& item_id, const std::string& i
filter.setFindAllLinksMode(item_name, item_id);
mFilterEditor->setText(item_name);
- mFilterEditor->setFocus(TRUE);
+ mFilterEditor->setFocus(true);
}
void LLPanelMainInventory::setSortBy(const LLSD& userdata)
@@ -725,17 +725,17 @@ void LLPanelMainInventory::updateSearchTypeCombo()
}
// static
-BOOL LLPanelMainInventory::filtersVisible(void* user_data)
+bool LLPanelMainInventory::filtersVisible(void* user_data)
{
LLPanelMainInventory* self = (LLPanelMainInventory*)user_data;
- if(!self) return FALSE;
+ if(!self) return false;
return self->getFinder() != NULL;
}
void LLPanelMainInventory::onClearSearch()
{
- BOOL initially_active = FALSE;
+ bool initially_active = false;
LLFloater *finder = getFinder();
if (mActivePanel && (getActivePanel() != mWornItemsPanel))
{
@@ -753,7 +753,7 @@ void LLPanelMainInventory::onClearSearch()
// re-open folders that were initially open in case filter was active
if (mActivePanel && (mFilterSubString.size() || initially_active) && !mSingleFolderMode)
{
- mSavedFolderState->setApply(TRUE);
+ mSavedFolderState->setApply(true);
mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
LLOpenFoldersWithSelection opener;
mActivePanel->getRootFolder()->applyFunctorRecursively(opener);
@@ -811,7 +811,7 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string )
// save current folder open state if no filter currently applied
if (!mActivePanel->getFilter().isNotDefault())
{
- mSavedFolderState->setApply(FALSE);
+ mSavedFolderState->setApply(false);
mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
}
@@ -831,7 +831,7 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string )
//static
- BOOL LLPanelMainInventory::incrementalFind(LLFolderViewItem* first_item, const char *find_text, BOOL backward)
+ bool LLPanelMainInventory::incrementalFind(LLFolderViewItem* first_item, const char *find_text, bool backward)
{
LLPanelMainInventory* active_view = NULL;
@@ -851,23 +851,23 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string )
if (!active_view)
{
- return FALSE;
+ return false;
}
std::string search_string(find_text);
if (search_string.empty())
{
- return FALSE;
+ return false;
}
if (active_view->getPanel() &&
active_view->getPanel()->getRootFolder()->search(first_item, search_string, backward))
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void LLPanelMainInventory::onFilterSelected()
@@ -1083,7 +1083,7 @@ void LLPanelMainInventory::setSelectCallback(const LLFolderView::signal_t::slot_
getChild<LLInventoryPanel>(RECENT_ITEMS)->setSelectCallback(cb);
}
-void LLPanelMainInventory::onSelectionChange(LLInventoryPanel *panel, const std::deque<LLFolderViewItem*>& items, BOOL user_action)
+void LLPanelMainInventory::onSelectionChange(LLInventoryPanel *panel, const std::deque<LLFolderViewItem*>& items, bool user_action)
{
updateListCommands();
panel->onSelectionChange(items, user_action);
@@ -1219,31 +1219,31 @@ void LLFloaterInventoryFinder::updateElementsFromFilter()
void LLFloaterInventoryFinder::draw()
{
U64 filter = 0xffffffffffffffffULL;
- BOOL filtered_by_all_types = TRUE;
+ bool filtered_by_all_types = true;
if (!getChild<LLUICtrl>("check_animation")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_ANIMATION);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_calling_card")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_CALLINGCARD);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_clothing")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_WEARABLE);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_gesture")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_GESTURE);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_landmark")->getValue())
@@ -1251,56 +1251,56 @@ void LLFloaterInventoryFinder::draw()
{
filter &= ~(0x1 << LLInventoryType::IT_LANDMARK);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_material")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_MATERIAL);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_notecard")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_NOTECARD);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_object")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_OBJECT);
filter &= ~(0x1 << LLInventoryType::IT_ATTACHMENT);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_script")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_LSL);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_sound")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_SOUND);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_texture")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_TEXTURE);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_snapshot")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_SNAPSHOT);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!getChild<LLUICtrl>("check_settings")->getValue())
{
filter &= ~(0x1 << LLInventoryType::IT_SETTINGS);
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!filtered_by_all_types || (mPanelMainInventory->getPanel()->getFilter().getFilterTypes() & LLInventoryFilter::FILTERTYPE_DATE))
@@ -1391,7 +1391,7 @@ void LLFloaterInventoryFinder::onCreatorSelfFilterCommit()
else if(!show_creator_self || !show_creator_other)
{
mPanelMainInventory->getCurrentFilter().setFilterCreator(LLInventoryFilter::FILTERCREATOR_OTHERS);
- mCreatorOthers->set(TRUE);
+ mCreatorOthers->set(true);
}
}
@@ -1411,16 +1411,16 @@ void LLFloaterInventoryFinder::onCreatorOtherFilterCommit()
else if(!show_creator_other || !show_creator_self)
{
mPanelMainInventory->getCurrentFilter().setFilterCreator(LLInventoryFilter::FILTERCREATOR_SELF);
- mCreatorSelf->set(TRUE);
+ mCreatorSelf->set(true);
}
}
-BOOL LLFloaterInventoryFinder::getCheckShowEmpty()
+bool LLFloaterInventoryFinder::getCheckShowEmpty()
{
return getChild<LLUICtrl>("check_show_empty")->getValue();
}
-BOOL LLFloaterInventoryFinder::getCheckSinceLogoff()
+bool LLFloaterInventoryFinder::getCheckSinceLogoff()
{
return getChild<LLUICtrl>("check_since_logoff")->getValue();
}
@@ -1442,19 +1442,19 @@ void LLFloaterInventoryFinder::selectAllTypes(void* user_data)
LLFloaterInventoryFinder* self = (LLFloaterInventoryFinder*)user_data;
if(!self) return;
- self->getChild<LLUICtrl>("check_animation")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_calling_card")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_clothing")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_gesture")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_landmark")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_material")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_notecard")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_object")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_script")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_sound")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_texture")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_snapshot")->setValue(TRUE);
- self->getChild<LLUICtrl>("check_settings")->setValue(TRUE);
+ self->getChild<LLUICtrl>("check_animation")->setValue(true);
+ self->getChild<LLUICtrl>("check_calling_card")->setValue(true);
+ self->getChild<LLUICtrl>("check_clothing")->setValue(true);
+ self->getChild<LLUICtrl>("check_gesture")->setValue(true);
+ self->getChild<LLUICtrl>("check_landmark")->setValue(true);
+ self->getChild<LLUICtrl>("check_material")->setValue(true);
+ self->getChild<LLUICtrl>("check_notecard")->setValue(true);
+ self->getChild<LLUICtrl>("check_object")->setValue(true);
+ self->getChild<LLUICtrl>("check_script")->setValue(true);
+ self->getChild<LLUICtrl>("check_sound")->setValue(true);
+ self->getChild<LLUICtrl>("check_texture")->setValue(true);
+ self->getChild<LLUICtrl>("check_snapshot")->setValue(true);
+ self->getChild<LLUICtrl>("check_settings")->setValue(true);
}
//static
@@ -1463,19 +1463,19 @@ void LLFloaterInventoryFinder::selectNoTypes(void* user_data)
LLFloaterInventoryFinder* self = (LLFloaterInventoryFinder*)user_data;
if(!self) return;
- self->getChild<LLUICtrl>("check_animation")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_calling_card")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_clothing")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_gesture")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_landmark")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_material")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_notecard")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_object")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_script")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_sound")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_texture")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_snapshot")->setValue(FALSE);
- self->getChild<LLUICtrl>("check_settings")->setValue(FALSE);
+ self->getChild<LLUICtrl>("check_animation")->setValue(false);
+ self->getChild<LLUICtrl>("check_calling_card")->setValue(false);
+ self->getChild<LLUICtrl>("check_clothing")->setValue(false);
+ self->getChild<LLUICtrl>("check_gesture")->setValue(false);
+ self->getChild<LLUICtrl>("check_landmark")->setValue(false);
+ self->getChild<LLUICtrl>("check_material")->setValue(false);
+ self->getChild<LLUICtrl>("check_notecard")->setValue(false);
+ self->getChild<LLUICtrl>("check_object")->setValue(false);
+ self->getChild<LLUICtrl>("check_script")->setValue(false);
+ self->getChild<LLUICtrl>("check_sound")->setValue(false);
+ self->getChild<LLUICtrl>("check_texture")->setValue(false);
+ self->getChild<LLUICtrl>("check_snapshot")->setValue(false);
+ self->getChild<LLUICtrl>("check_settings")->setValue(false);
}
//////////////////////////////////////////////////////////////////////////////////
@@ -2040,12 +2040,12 @@ bool LLPanelMainInventory::isSaveTextureEnabled(const LLSD& userdata)
return false;
}
-BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
+bool LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
{
const std::string command_name = userdata.asString();
if (command_name == "not_empty")
{
- BOOL status = FALSE;
+ bool status = false;
LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem();
if (current_item)
{
@@ -2074,15 +2074,15 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
}
else{
LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem();
- if (!current_item) return FALSE;
+ if (!current_item) return false;
item_id = static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->getUUID();
}
const LLViewerInventoryItem *item = gInventory.getItem(item_id);
if (item && item->getIsLinkType() && !item->getIsBrokenLink())
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
if (command_name == "find_links")
@@ -2095,30 +2095,30 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
else{
LLFolderView* root = getActivePanel()->getRootFolder();
std::set<LLFolderViewItem*> selection_set = root->getSelectionList();
- if (selection_set.size() != 1) return FALSE;
+ if (selection_set.size() != 1) return false;
LLFolderViewItem* current_item = root->getCurSelectedItem();
- if (!current_item) return FALSE;
+ if (!current_item) return false;
item_id = static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->getUUID();
}
const LLInventoryObject *obj = gInventory.getObject(item_id);
if (obj && !obj->getIsLinkType() && LLAssetType::lookupCanLink(obj->getType()))
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
// This doesn't currently work, since the viewer can't change an assetID an item.
if (command_name == "regenerate_link")
{
LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem();
- if (!current_item) return FALSE;
+ if (!current_item) return false;
const LLUUID& item_id = static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->getUUID();
const LLViewerInventoryItem *item = gInventory.getItem(item_id);
if (item && item->getIsBrokenLink())
{
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
if (command_name == "share")
@@ -2129,9 +2129,9 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
}
else{
LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem();
- if (!current_item) return FALSE;
+ if (!current_item) return false;
LLSidepanelInventory* parent = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
- return parent ? parent->canShare() : FALSE;
+ return parent ? parent->canShare() : false;
}
}
if (command_name == "empty_trash")
@@ -2147,7 +2147,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
return children != LLInventoryModel::CHILDREN_NO && gInventory.isCategoryComplete(trash_id);
}
- return TRUE;
+ return true;
}
bool LLPanelMainInventory::isActionVisible(const LLSD& userdata)
@@ -2165,7 +2165,7 @@ bool LLPanelMainInventory::isActionVisible(const LLSD& userdata)
return true;
}
-BOOL LLPanelMainInventory::isActionChecked(const LLSD& userdata)
+bool LLPanelMainInventory::isActionChecked(const LLSD& userdata)
{
U32 sort_order_mask = (mSingleFolderMode && isGalleryViewMode()) ? mCombinationGalleryPanel->getSortOrder() : getActivePanel()->getSortOrder();
const std::string command_name = userdata.asString();
@@ -2222,7 +2222,7 @@ BOOL LLPanelMainInventory::isActionChecked(const LLSD& userdata)
return isCombinationViewMode();
}
- return FALSE;
+ return false;
}
void LLPanelMainInventory::setUploadCostIfNeeded()
@@ -2343,7 +2343,7 @@ void LLPanelMainInventory::onCombinationGallerySelectionChanged(const LLUUID& ca
{
}
-void LLPanelMainInventory::onCombinationInventorySelectionChanged(const std::deque<LLFolderViewItem*>& items, BOOL user_action)
+void LLPanelMainInventory::onCombinationInventorySelectionChanged(const std::deque<LLFolderViewItem*>& items, bool user_action)
{
onSelectionChange(mCombinationInventoryPanel, items, user_action);
}
@@ -2475,9 +2475,9 @@ void LLPanelMainInventory::updateCombinationVisibility()
&& mCombInvUUIDNeedsRename.notNull()
&& mCombinationInventoryPanel->areViewsInitialized())
{
- mCombinationInventoryPanel->setSelectionByID(mCombInvUUIDNeedsRename, TRUE);
+ mCombinationInventoryPanel->setSelectionByID(mCombInvUUIDNeedsRename, true);
mCombinationInventoryPanel->getRootFolder()->scrollToShowSelection();
- mCombinationInventoryPanel->getRootFolder()->setNeedsAutoRename(TRUE);
+ mCombinationInventoryPanel->getRootFolder()->setNeedsAutoRename(true);
mCombInvUUIDNeedsRename.setNull();
}
}