diff options
author | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-02-21 21:05:14 +0100 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-02-21 23:14:31 +0200 |
commit | 60d3dd98a44230c21803c1606552ee098ed9fa7c (patch) | |
tree | af0aa11c458ca86f786560e0875f7e018e1a16b9 /indra/newview/llfloateravatarpicker.cpp | |
parent | 855eea7ddf9e1de9226036ca94ccb03ac0e311b9 (diff) |
Convert remaining BOOL to bool
Diffstat (limited to 'indra/newview/llfloateravatarpicker.cpp')
-rw-r--r-- | indra/newview/llfloateravatarpicker.cpp | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 9b5e084b34..8c4e7ff627 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -61,9 +61,9 @@ static const U32 AVATAR_PICKER_SEARCH_TIMEOUT = 180U; static std::map<LLUUID, LLAvatarName> sAvatarNameMap; LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(select_callback_t callback, - BOOL allow_multiple, - BOOL closeOnSelect, - BOOL skip_agent, + bool allow_multiple, + bool closeOnSelect, + bool skip_agent, const std::string& name, LLView * frustumOrigin) { @@ -78,7 +78,7 @@ LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(select_callback_t callback, floater->mSelectionCallback = callback; floater->setAllowMultiple(allow_multiple); - floater->mNearMeListComplete = FALSE; + floater->mNearMeListComplete = false; floater->mCloseOnSelect = closeOnSelect; floater->mExcludeAgentFromSearchResults = skip_agent; @@ -103,9 +103,9 @@ LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(select_callback_t callback, LLFloaterAvatarPicker::LLFloaterAvatarPicker(const LLSD& key) : LLFloater(key), mNumResultsReturned(0), - mNearMeListComplete(FALSE), - mCloseOnSelect(FALSE), - mExcludeAgentFromSearchResults(FALSE), + mNearMeListComplete(false), + mCloseOnSelect(false), + mExcludeAgentFromSearchResults(false), mContextConeOpacity (0.f), mContextConeInAlpha(0.f), mContextConeOutAlpha(0.f), @@ -158,7 +158,7 @@ bool LLFloaterAvatarPicker::postBuild() getChild<LLTabContainer>("ResidentChooserTabs")->setCommitCallback( boost::bind(&LLFloaterAvatarPicker::onTabChanged, this)); - setAllowMultiple(FALSE); + setAllowMultiple(false); center(); @@ -252,12 +252,12 @@ void LLFloaterAvatarPicker::onBtnSelect() mSelectionCallback(avatar_ids, avatar_names); } } - getChild<LLScrollListCtrl>("SearchResults")->deselectAllItems(TRUE); - getChild<LLScrollListCtrl>("NearMe")->deselectAllItems(TRUE); - getChild<LLScrollListCtrl>("Friends")->deselectAllItems(TRUE); + getChild<LLScrollListCtrl>("SearchResults")->deselectAllItems(true); + getChild<LLScrollListCtrl>("NearMe")->deselectAllItems(true); + getChild<LLScrollListCtrl>("Friends")->deselectAllItems(true); if(mCloseOnSelect) { - mCloseOnSelect = FALSE; + mCloseOnSelect = false; closeFloater(); } } @@ -266,7 +266,7 @@ void LLFloaterAvatarPicker::onBtnRefresh() { getChild<LLScrollListCtrl>("NearMe")->deleteAllItems(); getChild<LLScrollListCtrl>("NearMe")->setCommentText(getString("searching")); - mNearMeListComplete = FALSE; + mNearMeListComplete = false; } void LLFloaterAvatarPicker::onBtnClose() @@ -286,8 +286,8 @@ void LLFloaterAvatarPicker::onList() void LLFloaterAvatarPicker::populateNearMe() { - BOOL all_loaded = TRUE; - BOOL empty = TRUE; + bool all_loaded = true; + bool empty = true; LLScrollListCtrl* near_me_scroller = getChild<LLScrollListCtrl>("NearMe"); near_me_scroller->deleteAllItems(); @@ -305,7 +305,7 @@ void LLFloaterAvatarPicker::populateNearMe() { element["columns"][0]["column"] = "name"; element["columns"][0]["value"] = LLCacheName::getDefaultName(); - all_loaded = FALSE; + all_loaded = false; } else { @@ -317,27 +317,27 @@ void LLFloaterAvatarPicker::populateNearMe() sAvatarNameMap[av] = av_name; } near_me_scroller->addElement(element); - empty = FALSE; + empty = false; } if (empty) { - getChildView("NearMe")->setEnabled(FALSE); - getChildView("ok_btn")->setEnabled(FALSE); + getChildView("NearMe")->setEnabled(false); + getChildView("ok_btn")->setEnabled(false); near_me_scroller->setCommentText(getString("no_one_near")); } else { - getChildView("NearMe")->setEnabled(TRUE); - getChildView("ok_btn")->setEnabled(TRUE); + getChildView("NearMe")->setEnabled(true); + getChildView("ok_btn")->setEnabled(true); near_me_scroller->selectFirstItem(); onList(); - near_me_scroller->setFocus(TRUE); + near_me_scroller->setFocus(true); } if (all_loaded) { - mNearMeListComplete = TRUE; + mNearMeListComplete = true; } } @@ -357,7 +357,7 @@ void LLFloaterAvatarPicker::populateFriend() { friends_scroller->addStringUUIDItem(it->second, it->first); } - friends_scroller->sortByColumnIndex(0, TRUE); + friends_scroller->sortByColumnIndex(0, true); } void LLFloaterAvatarPicker::drawFrustum() @@ -389,7 +389,7 @@ void LLFloaterAvatarPicker::draw() } } -BOOL LLFloaterAvatarPicker::visibleItemsSelected() const +bool LLFloaterAvatarPicker::visibleItemsSelected() const { LLPanel* active_panel = getChild<LLTabContainer>("ResidentChooserTabs")->getCurrentPanel(); @@ -405,7 +405,7 @@ BOOL LLFloaterAvatarPicker::visibleItemsSelected() const { return getChild<LLScrollListCtrl>("Friends")->getFirstSelectedIndex() >= 0; } - return FALSE; + return false; } /*static*/ @@ -505,11 +505,11 @@ void LLFloaterAvatarPicker::find() getChild<LLScrollListCtrl>("SearchResults")->deleteAllItems(); getChild<LLScrollListCtrl>("SearchResults")->setCommentText(getString("searching")); - getChildView("ok_btn")->setEnabled(FALSE); + getChildView("ok_btn")->setEnabled(false); mNumResultsReturned = 0; } -void LLFloaterAvatarPicker::setAllowMultiple(BOOL allow_multiple) +void LLFloaterAvatarPicker::setAllowMultiple(bool allow_multiple) { getChild<LLScrollListCtrl>("SearchResults")->setAllowMultipleSelection(allow_multiple); getChild<LLScrollListCtrl>("NearMe")->setAllowMultipleSelection(allow_multiple); @@ -622,7 +622,7 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void* search_results->deleteAllItems(); } - BOOL found_one = FALSE; + bool found_one = false; S32 num_new_rows = msg->getNumberOfBlocks("Data"); for (S32 i = 0; i < num_new_rows; i++) { @@ -638,14 +638,14 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void* LLStringUtil::format_map_t map; map["[TEXT]"] = floater->getChild<LLUICtrl>("Edit")->getValue().asString(); avatar_name = floater->getString("not_found", map); - search_results->setEnabled(FALSE); - floater->getChildView("ok_btn")->setEnabled(FALSE); + search_results->setEnabled(false); + floater->getChildView("ok_btn")->setEnabled(false); } else { avatar_name = LLCacheName::buildFullName(first_name, last_name); - search_results->setEnabled(TRUE); - found_one = TRUE; + search_results->setEnabled(true); + found_one = true; LLAvatarName av_name; av_name.fromString(avatar_name); @@ -663,10 +663,10 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void* if (found_one) { - floater->getChildView("ok_btn")->setEnabled(TRUE); + floater->getChildView("ok_btn")->setEnabled(true); search_results->selectFirstItem(); floater->onList(); - search_results->setFocus(TRUE); + search_results->setFocus(true); } } @@ -728,14 +728,14 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD& { getChildView("ok_btn")->setEnabled(true); search_results->setEnabled(true); - search_results->sortByColumnIndex(1, TRUE); + search_results->sortByColumnIndex(1, true); std::string text = getChild<LLUICtrl>("Edit")->getValue().asString(); - if (!search_results->selectItemByLabel(text, TRUE, 1)) + if (!search_results->selectItemByLabel(text, true, 1)) { search_results->selectFirstItem(); } onList(); - search_results->setFocus(TRUE); + search_results->setFocus(true); } } } |