diff options
Diffstat (limited to 'indra/newview/llfloaterregioninfo.cpp')
-rw-r--r-- | indra/newview/llfloaterregioninfo.cpp | 224 |
1 files changed, 112 insertions, 112 deletions
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 187ac9d323..bf809da5d5 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -196,7 +196,7 @@ public: bool refreshFromRegion(LLViewerRegion* region); - virtual BOOL postBuild() override; + virtual bool postBuild() override; virtual void onOpen(const LLSD& key) override {}; virtual S32 getParcelId() override { return INVALID_PARCEL_ID; } @@ -234,7 +234,7 @@ LLFloaterRegionInfo::LLFloaterRegionInfo(const LLSD& seed) mRegionChangedCallback() {} -BOOL LLFloaterRegionInfo::postBuild() +bool LLFloaterRegionInfo::postBuild() { mTab = getChild<LLTabContainer>("region_panels"); mTab->setCommitCallback(boost::bind(&LLFloaterRegionInfo::onTabSelected, this, _2)); @@ -279,7 +279,7 @@ BOOL LLFloaterRegionInfo::postBuild() if(gDisconnected) { - return TRUE; + return true; } if(!gAgent.getRegionCapability("RegionExperiences").empty()) @@ -297,7 +297,7 @@ BOOL LLFloaterRegionInfo::postBuild() // Request region info when agent region changes. mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLFloaterRegionInfo::onRegionChanged, this)); - return TRUE; + return true; } LLFloaterRegionInfo::~LLFloaterRegionInfo() @@ -346,11 +346,11 @@ void LLFloaterRegionInfo::requestRegionInfo() LLTabContainer* tab = findChild<LLTabContainer>("region_panels"); if (tab) { - tab->getChild<LLPanel>("General")->setCtrlsEnabled(FALSE); - tab->getChild<LLPanel>("Debug")->setCtrlsEnabled(FALSE); - tab->getChild<LLPanel>("Terrain")->setCtrlsEnabled(FALSE); - tab->getChild<LLPanel>("Estate")->setCtrlsEnabled(FALSE); - tab->getChild<LLPanel>("Access")->setCtrlsEnabled(FALSE); + tab->getChild<LLPanel>("General")->setCtrlsEnabled(false); + tab->getChild<LLPanel>("Debug")->setCtrlsEnabled(false); + tab->getChild<LLPanel>("Terrain")->setCtrlsEnabled(false); + tab->getChild<LLPanel>("Estate")->setCtrlsEnabled(false); + tab->getChild<LLPanel>("Access")->setCtrlsEnabled(false); } // Must allow anyone to request the RegionInfo data @@ -421,7 +421,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels"); LLViewerRegion* region = gAgent.getRegion(); - BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); + bool allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); // *TODO: Replace parsing msg with accessing the region info model. LLRegionInfoModel& region_info = LLRegionInfoModel::instance(); @@ -437,7 +437,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) F32 water_height; F32 terrain_raise_limit; F32 terrain_lower_limit; - BOOL use_estate_sun; + bool use_estate_sun; F32 sun_hour; msg->getString("RegionInfo", "SimName", sim_name); msg->getU8("RegionInfo", "MaxAgents", agent_limit); @@ -499,14 +499,14 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) panel->getChild<LLUICtrl>("region_type")->setValue(LLSD(sim_type)); panel->getChild<LLUICtrl>("version_channel_text")->setValue(gLastVersionChannel); - panel->getChild<LLUICtrl>("block_terraform_check")->setValue((region_flags & REGION_FLAGS_BLOCK_TERRAFORM) ? TRUE : FALSE ); - panel->getChild<LLUICtrl>("block_fly_check")->setValue((region_flags & REGION_FLAGS_BLOCK_FLY) ? TRUE : FALSE ); - panel->getChild<LLUICtrl>("block_fly_over_check")->setValue((region_flags & REGION_FLAGS_BLOCK_FLYOVER) ? TRUE : FALSE ); - panel->getChild<LLUICtrl>("allow_damage_check")->setValue((region_flags & REGION_FLAGS_ALLOW_DAMAGE) ? TRUE : FALSE ); - panel->getChild<LLUICtrl>("restrict_pushobject")->setValue((region_flags & REGION_FLAGS_RESTRICT_PUSHOBJECT) ? TRUE : FALSE ); - panel->getChild<LLUICtrl>("allow_land_resell_check")->setValue((region_flags & REGION_FLAGS_BLOCK_LAND_RESELL) ? FALSE : TRUE ); - panel->getChild<LLUICtrl>("allow_parcel_changes_check")->setValue((region_flags & REGION_FLAGS_ALLOW_PARCEL_CHANGES) ? TRUE : FALSE ); - panel->getChild<LLUICtrl>("block_parcel_search_check")->setValue((region_flags & REGION_FLAGS_BLOCK_PARCEL_SEARCH) ? TRUE : FALSE ); + panel->getChild<LLUICtrl>("block_terraform_check")->setValue((region_flags & REGION_FLAGS_BLOCK_TERRAFORM) ? true : false ); + panel->getChild<LLUICtrl>("block_fly_check")->setValue((region_flags & REGION_FLAGS_BLOCK_FLY) ? true : false ); + panel->getChild<LLUICtrl>("block_fly_over_check")->setValue((region_flags & REGION_FLAGS_BLOCK_FLYOVER) ? true : false ); + panel->getChild<LLUICtrl>("allow_damage_check")->setValue((region_flags & REGION_FLAGS_ALLOW_DAMAGE) ? true : false ); + panel->getChild<LLUICtrl>("restrict_pushobject")->setValue((region_flags & REGION_FLAGS_RESTRICT_PUSHOBJECT) ? true : false ); + panel->getChild<LLUICtrl>("allow_land_resell_check")->setValue((region_flags & REGION_FLAGS_BLOCK_LAND_RESELL) ? false : true ); + panel->getChild<LLUICtrl>("allow_parcel_changes_check")->setValue((region_flags & REGION_FLAGS_ALLOW_PARCEL_CHANGES) ? true : false ); + panel->getChild<LLUICtrl>("block_parcel_search_check")->setValue((region_flags & REGION_FLAGS_BLOCK_PARCEL_SEARCH) ? true : false ); panel->getChild<LLUICtrl>("agent_limit_spin")->setValue(LLSD((F32)agent_limit) ); panel->getChild<LLUICtrl>("object_bonus_spin")->setValue(LLSD(object_bonus_factor) ); panel->getChild<LLUICtrl>("access_combo")->setValue(LLSD(sim_access) ); @@ -523,7 +523,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) U32 parent_estate_id; msg->getU32("RegionInfo", "ParentEstateID", parent_estate_id); - BOOL teen_grid = (parent_estate_id == 5); // *TODO add field to estate table and test that + bool teen_grid = (parent_estate_id == 5); // *TODO add field to estate table and test that panel->getChildView("access_combo")->setEnabled(gAgent.isGodlike() || (region && region->canManageEstate() && !teen_grid)); panel->setCtrlsEnabled(allow_modify); @@ -532,9 +532,9 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) panel = tab->getChild<LLPanel>("Debug"); panel->getChild<LLUICtrl>("region_text")->setValue(LLSD(sim_name) ); - panel->getChild<LLUICtrl>("disable_scripts_check")->setValue(LLSD((BOOL)((region_flags & REGION_FLAGS_SKIP_SCRIPTS) ? TRUE : FALSE )) ); - panel->getChild<LLUICtrl>("disable_collisions_check")->setValue(LLSD((BOOL)((region_flags & REGION_FLAGS_SKIP_COLLISIONS) ? TRUE : FALSE )) ); - panel->getChild<LLUICtrl>("disable_physics_check")->setValue(LLSD((BOOL)((region_flags & REGION_FLAGS_SKIP_PHYSICS) ? TRUE : FALSE )) ); + panel->getChild<LLUICtrl>("disable_scripts_check")->setValue(LLSD((bool)((region_flags & REGION_FLAGS_SKIP_SCRIPTS) ? true : false )) ); + panel->getChild<LLUICtrl>("disable_collisions_check")->setValue(LLSD((bool)((region_flags & REGION_FLAGS_SKIP_COLLISIONS) ? true : false )) ); + panel->getChild<LLUICtrl>("disable_physics_check")->setValue(LLSD((bool)((region_flags & REGION_FLAGS_SKIP_PHYSICS) ? true : false )) ); panel->setCtrlsEnabled(allow_modify); // TERRAIN PANEL @@ -634,12 +634,12 @@ void LLFloaterRegionInfo::disableTabCtrls() { LLTabContainer* tab = getChild<LLTabContainer>("region_panels"); - tab->getChild<LLPanel>("General")->setCtrlsEnabled(FALSE); - tab->getChild<LLPanel>("Debug")->setCtrlsEnabled(FALSE); - tab->getChild<LLPanel>("Terrain")->setCtrlsEnabled(FALSE); - tab->getChild<LLPanel>("panel_env_info")->setCtrlsEnabled(FALSE); - tab->getChild<LLPanel>("Estate")->setCtrlsEnabled(FALSE); - tab->getChild<LLPanel>("Access")->setCtrlsEnabled(FALSE); + tab->getChild<LLPanel>("General")->setCtrlsEnabled(false); + tab->getChild<LLPanel>("Debug")->setCtrlsEnabled(false); + tab->getChild<LLPanel>("Terrain")->setCtrlsEnabled(false); + tab->getChild<LLPanel>("panel_env_info")->setCtrlsEnabled(false); + tab->getChild<LLPanel>("Estate")->setCtrlsEnabled(false); + tab->getChild<LLPanel>("Access")->setCtrlsEnabled(false); } void LLFloaterRegionInfo::onTabSelected(const LLSD& param) @@ -742,7 +742,7 @@ void LLPanelRegionInfo::onChangeText(LLLineEditor* caller, void* user_data) // virtual -BOOL LLPanelRegionInfo::postBuild() +bool LLPanelRegionInfo::postBuild() { // If the panel has an Apply button, set a callback for it. LLUICtrl* apply_btn = findChild<LLUICtrl>("apply_btn"); @@ -752,7 +752,7 @@ BOOL LLPanelRegionInfo::postBuild() } refresh(); - return TRUE; + return true; } // virtual @@ -800,7 +800,7 @@ void LLPanelRegionInfo::sendEstateOwnerMessage( msg->sendReliable(mHost); } -void LLPanelRegionInfo::enableButton(const std::string& btn_name, BOOL enable) +void LLPanelRegionInfo::enableButton(const std::string& btn_name, bool enable) { LLView* button = findChildView(btn_name); if (button) button->setEnabled(enable); @@ -809,7 +809,7 @@ void LLPanelRegionInfo::enableButton(const std::string& btn_name, BOOL enable) void LLPanelRegionInfo::disableButton(const std::string& btn_name) { LLView* button = findChildView(btn_name); - if (button) button->setEnabled(FALSE); + if (button) button->setEnabled(false); } void LLPanelRegionInfo::initCtrl(const std::string& name) @@ -828,9 +828,9 @@ void LLPanelRegionInfo::onClickManageTelehub() // bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region) { - BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); + bool allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); setCtrlsEnabled(allow_modify); - getChildView("apply_btn")->setEnabled(FALSE); + getChildView("apply_btn")->setEnabled(false); getChildView("access_text")->setEnabled(allow_modify); // getChildView("access_combo")->setEnabled(allow_modify); // now set in processRegionInfo for teen grid detection @@ -844,7 +844,7 @@ bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region) return LLPanelRegionInfo::refreshFromRegion(region); } -BOOL LLPanelRegionGeneralInfo::postBuild() +bool LLPanelRegionGeneralInfo::postBuild() { // Enable the "Apply" button if something is changed. JC initCtrl("block_terraform_check"); @@ -871,7 +871,7 @@ BOOL LLPanelRegionGeneralInfo::postBuild() } refresh(); - return TRUE; + return true; } void LLPanelRegionGeneralInfo::onBtnSet() @@ -911,7 +911,7 @@ void LLPanelRegionGeneralInfo::onClickKick() LLView * button = findChild<LLButton>("kick_btn"); LLFloater* parent_floater = gFloaterView->getParentFloater(this); LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelRegionGeneralInfo::onKickCommit, this, _1), - FALSE, TRUE, FALSE, parent_floater->getName(), button); + false, true, false, parent_floater->getName(), button); if (child_floater) { parent_floater->addDependentFloater(child_floater); @@ -1016,7 +1016,7 @@ bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const L // strings[7] = restrict pushobject // strings[8] = 'Y' - allow parcel subdivide, 'N' - not // strings[9] = 'Y' - block parcel search, 'N' - allow -BOOL LLPanelRegionGeneralInfo::sendUpdate() +bool LLPanelRegionGeneralInfo::sendUpdate() { LL_INFOS() << "LLPanelRegionGeneralInfo::sendUpdate()" << LL_ENDL; @@ -1085,13 +1085,13 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate() LLNotificationsUtil::add("RegionMaturityChange"); } - return TRUE; + return true; } ///////////////////////////////////////////////////////////////////////////// // LLPanelRegionDebugInfo ///////////////////////////////////////////////////////////////////////////// -BOOL LLPanelRegionDebugInfo::postBuild() +bool LLPanelRegionDebugInfo::postBuild() { LLPanelRegionInfo::postBuild(); initCtrl("disable_scripts_check"); @@ -1106,16 +1106,16 @@ BOOL LLPanelRegionDebugInfo::postBuild() childSetAction("cancel_restart_btn", onClickCancelRestart, this); childSetAction("region_debug_console_btn", onClickDebugConsole, this); - return TRUE; + return true; } // virtual bool LLPanelRegionDebugInfo::refreshFromRegion(LLViewerRegion* region) { - BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); + bool allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); setCtrlsEnabled(allow_modify); - getChildView("apply_btn")->setEnabled(FALSE); - getChildView("target_avatar_name")->setEnabled(FALSE); + getChildView("apply_btn")->setEnabled(false); + getChildView("target_avatar_name")->setEnabled(false); getChildView("choose_avatar_btn")->setEnabled(allow_modify); getChildView("return_scripts")->setEnabled(allow_modify && !mTargetAvatar.isNull()); @@ -1132,7 +1132,7 @@ bool LLPanelRegionDebugInfo::refreshFromRegion(LLViewerRegion* region) } // virtual -BOOL LLPanelRegionDebugInfo::sendUpdate() +bool LLPanelRegionDebugInfo::sendUpdate() { LL_INFOS() << "LLPanelRegionDebugInfo::sendUpdate" << LL_ENDL; strings_t strings; @@ -1149,7 +1149,7 @@ BOOL LLPanelRegionDebugInfo::sendUpdate() LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); sendEstateOwnerMessage(gMessageSystem, "setregiondebug", invoice, strings); - return TRUE; + return true; } void LLPanelRegionDebugInfo::onClickChooseAvatar() @@ -1157,7 +1157,7 @@ void LLPanelRegionDebugInfo::onClickChooseAvatar() LLView * button = findChild<LLButton>("choose_avatar_btn"); LLFloater* parent_floater = gFloaterView->getParentFloater(this); LLFloater * child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelRegionDebugInfo::callbackAvatarID, this, _1, _2), - FALSE, TRUE, FALSE, parent_floater->getName(), button); + false, true, false, parent_floater->getName(), button); if (child_floater) { parent_floater->addDependentFloater(child_floater); @@ -1305,7 +1305,7 @@ void LLPanelRegionDebugInfo::onClickDebugConsole(void* data) LLFloaterReg::showInstance("region_debug_console"); } -BOOL LLPanelRegionTerrainInfo::validateTextureSizes() +bool LLPanelRegionTerrainInfo::validateTextureSizes() { static const S32 MAX_TERRAIN_TEXTURE_SIZE = 1024; for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) @@ -1331,7 +1331,7 @@ BOOL LLPanelRegionTerrainInfo::validateTextureSizes() args["TEXTURE_BIT_DEPTH"] = llformat("%d",components * 8); args["MAX_SIZE"] = MAX_TERRAIN_TEXTURE_SIZE; LLNotificationsUtil::add("InvalidTerrainBitDepth", args); - return FALSE; + return false; } if (width > MAX_TERRAIN_TEXTURE_SIZE || height > MAX_TERRAIN_TEXTURE_SIZE) @@ -1343,15 +1343,15 @@ BOOL LLPanelRegionTerrainInfo::validateTextureSizes() args["TEXTURE_SIZE_Y"] = height; args["MAX_SIZE"] = MAX_TERRAIN_TEXTURE_SIZE; LLNotificationsUtil::add("InvalidTerrainSize", args); - return FALSE; + return false; } } - return TRUE; + return true; } -BOOL LLPanelRegionTerrainInfo::validateTextureHeights() +bool LLPanelRegionTerrainInfo::validateTextureHeights() { for (S32 i = 0; i < CORNER_COUNT; ++i) { @@ -1360,11 +1360,11 @@ BOOL LLPanelRegionTerrainInfo::validateTextureHeights() if (getChild<LLUICtrl>(low)->getValue().asReal() > getChild<LLUICtrl>(high)->getValue().asReal()) { - return FALSE; + return false; } } - return TRUE; + return true; } ///////////////////////////////////////////////////////////////////////////// @@ -1372,7 +1372,7 @@ BOOL LLPanelRegionTerrainInfo::validateTextureHeights() ///////////////////////////////////////////////////////////////////////////// // Initialize statics -BOOL LLPanelRegionTerrainInfo::postBuild() +bool LLPanelRegionTerrainInfo::postBuild() { LLPanelRegionInfo::postBuild(); @@ -1408,13 +1408,13 @@ BOOL LLPanelRegionTerrainInfo::postBuild() // virtual bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region) { - BOOL owner_or_god = gAgent.isGodlike() + bool owner_or_god = gAgent.isGodlike() || (region && (region->getOwner() == gAgent.getID())); - BOOL owner_or_god_or_manager = owner_or_god + bool owner_or_god_or_manager = owner_or_god || (region && region->isEstateManager()); setCtrlsEnabled(owner_or_god_or_manager); - getChildView("apply_btn")->setEnabled(FALSE); + getChildView("apply_btn")->setEnabled(false); if (region) { @@ -1459,7 +1459,7 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region) // virtual -BOOL LLPanelRegionTerrainInfo::sendUpdate() +bool LLPanelRegionTerrainInfo::sendUpdate() { LL_INFOS() << "LLPanelRegionTerrainInfo::sendUpdate" << LL_ENDL; std::string buffer; @@ -1481,7 +1481,7 @@ BOOL LLPanelRegionTerrainInfo::sendUpdate() // Make sure user hasn't chosen wacky textures. if (!validateTextureSizes()) { - return FALSE; + return false; } // Check if terrain Elevation Ranges are correct @@ -1491,11 +1491,11 @@ BOOL LLPanelRegionTerrainInfo::sendUpdate() { LLNotificationsUtil::add("ConfirmTextureHeights", LLSD(), LLSD(), boost::bind(&LLPanelRegionTerrainInfo::callbackTextureHeights, this, _1, _2)); mAskedTextureHeights = true; - return FALSE; + return false; } else if (!mConfirmedTextureHeights) { - return FALSE; + return false; } } @@ -1536,7 +1536,7 @@ BOOL LLPanelRegionTerrainInfo::sendUpdate() sendEstateOwnerMessage(msg, "texturecommit", invoice, strings); - return TRUE; + return true; } bool LLPanelRegionTerrainInfo::callbackTextureHeights(const LLSD& notification, const LLSD& response) @@ -1552,7 +1552,7 @@ bool LLPanelRegionTerrainInfo::callbackTextureHeights(const LLSD& notification, } else if (option == 2) // don't ask { - gSavedSettings.setBOOL("RegionCheckTextureHeights", FALSE); + gSavedSettings.setBOOL("RegionCheckTextureHeights", false); mConfirmedTextureHeights = true; } @@ -1667,7 +1667,7 @@ void LLPanelEstateInfo::onClickKickUser() LLView * button = findChild<LLButton>("kick_user_from_estate_btn"); LLFloater* parent_floater = gFloaterView->getParentFloater(this); LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelEstateInfo::onKickUserCommit, this, _1), - FALSE, TRUE, FALSE, parent_floater->getName(), button); + false, true, false, parent_floater->getName(), button); if (child_floater) { parent_floater->addDependentFloater(child_floater); @@ -1808,13 +1808,13 @@ void LLPanelEstateInfo::updateEstateName(const std::string& name) void LLPanelEstateInfo::updateControls(LLViewerRegion* region) { - BOOL god = gAgent.isGodlike(); - BOOL owner = (region && (region->getOwner() == gAgent.getID())); - BOOL manager = (region && region->isEstateManager()); + bool god = gAgent.isGodlike(); + bool owner = (region && (region->getOwner() == gAgent.getID())); + bool manager = (region && region->isEstateManager()); setCtrlsEnabled(god || owner || manager); - getChildView("apply_btn")->setEnabled(FALSE); - getChildView("estate_owner")->setEnabled(TRUE); + getChildView("apply_btn")->setEnabled(false); + getChildView("estate_owner")->setEnabled(true); getChildView("message_estate_btn")->setEnabled(god || owner || manager); getChildView("kick_user_from_estate_btn")->setEnabled(god || owner || manager); @@ -1859,7 +1859,7 @@ bool LLPanelEstateInfo::estateUpdate(LLMessageSystem* msg) } -BOOL LLPanelEstateInfo::postBuild() +bool LLPanelEstateInfo::postBuild() { // set up the callbacks for the generic controls initCtrl("externally_visible_radio"); @@ -1875,7 +1875,7 @@ BOOL LLPanelEstateInfo::postBuild() getChild<LLUICtrl>("parcel_access_override")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeAccessOverride, this)); - getChild<LLUICtrl>("externally_visible_radio")->setFocus(TRUE); + getChild<LLUICtrl>("externally_visible_radio")->setFocus(true); getChild<LLTextBox>("estate_owner")->setIsFriendCallback(LLAvatarActions::isFriend); @@ -1921,7 +1921,7 @@ void LLPanelEstateInfo::refreshFromEstate() refresh(); } -BOOL LLPanelEstateInfo::sendUpdate() +bool LLPanelEstateInfo::sendUpdate() { LL_INFOS() << "LLPanelEsateInfo::sendUpdate()" << LL_ENDL; @@ -1938,7 +1938,7 @@ BOOL LLPanelEstateInfo::sendUpdate() // for normal estates, just make the change LLNotifications::instance().forceResponse(params, 0); } - return TRUE; + return true; } bool LLPanelEstateInfo::callbackChangeLindenEstate(const LLSD& notification, const LLSD& response) @@ -2125,7 +2125,7 @@ bool LLPanelEstateCovenant::estateUpdate(LLMessageSystem* msg) } // virtual -BOOL LLPanelEstateCovenant::postBuild() +bool LLPanelEstateCovenant::postBuild() { mEstateNameText = getChild<LLTextBox>("estate_name_text"); mEstateOwnerText = getChild<LLTextBox>("estate_owner_text"); @@ -2145,7 +2145,7 @@ void LLPanelEstateCovenant::updateChild(LLUICtrl* child_ctrl) } // virtual -BOOL LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -2156,7 +2156,7 @@ BOOL LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop if (!gAgent.canManageEstate()) { *accept = ACCEPT_NO; - return TRUE; + return true; } switch(cargo_type) @@ -2176,7 +2176,7 @@ BOOL LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop break; } - return TRUE; + return true; } // static @@ -2225,7 +2225,7 @@ bool LLPanelEstateCovenant::confirmResetCovenantCallback(const LLSD& notificatio void LLPanelEstateCovenant::loadInvItem(LLInventoryItem *itemp) { - const BOOL high_priority = TRUE; + const bool high_priority = true; if (itemp) { gAssetStorage->getInvItemAsset(gAgent.getRegionHost(), @@ -2337,9 +2337,9 @@ void LLPanelEstateCovenant::sendChangeCovenantID(const LLUUID &asset_id) } // virtual -BOOL LLPanelEstateCovenant::sendUpdate() +bool LLPanelEstateCovenant::sendUpdate() { - return TRUE; + return true; } std::string LLPanelEstateCovenant::getEstateName() const @@ -2506,13 +2506,13 @@ bool LLDispatchSetEstateExperience::operator()( return true; } -BOOL LLPanelRegionExperiences::postBuild() +bool LLPanelRegionExperiences::postBuild() { mAllowed = setupList("panel_allowed", ESTATE_EXPERIENCE_ALLOWED_ADD, ESTATE_EXPERIENCE_ALLOWED_REMOVE); mTrusted = setupList("panel_trusted", ESTATE_EXPERIENCE_TRUSTED_ADD, ESTATE_EXPERIENCE_TRUSTED_REMOVE); mBlocked = setupList("panel_blocked", ESTATE_EXPERIENCE_BLOCKED_ADD, ESTATE_EXPERIENCE_BLOCKED_REMOVE); - getChild<LLLayoutPanel>("trusted_layout_panel")->setVisible(TRUE); + getChild<LLLayoutPanel>("trusted_layout_panel")->setVisible(true); getChild<LLTextBox>("experiences_help_text")->setText(getString("estate_caption")); getChild<LLTextBox>("trusted_text_help")->setText(getString("trusted_estate_text")); getChild<LLTextBox>("allowed_text_help")->setText(getString("allowed_estate_text")); @@ -2653,7 +2653,7 @@ std::string LLPanelRegionExperiences::regionCapabilityQuery(LLViewerRegion* regi bool LLPanelRegionExperiences::refreshFromRegion(LLViewerRegion* region) { - BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); + bool allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); mAllowed->loading(); mAllowed->setReadonly(!allow_modify); @@ -2692,7 +2692,7 @@ LLSD LLPanelRegionExperiences::addIds(LLPanelExperienceListEditor* panel) } -BOOL LLPanelRegionExperiences::sendUpdate() +bool LLPanelRegionExperiences::sendUpdate() { LLViewerRegion* region = gAgent.getRegion(); @@ -2705,7 +2705,7 @@ BOOL LLPanelRegionExperiences::sendUpdate() LLExperienceCache::instance().setRegionExperiences(boost::bind(&LLPanelRegionExperiences::regionCapabilityQuery, region, _1), content, boost::bind(&LLPanelRegionExperiences::infoCallback, getDerivedHandle<LLPanelRegionExperiences>(), _1)); - return TRUE; + return true; } void LLPanelRegionExperiences::itemChanged( U32 event_type, const LLUUID& id ) @@ -2770,13 +2770,13 @@ LLPanelEstateAccess::LLPanelEstateAccess() : LLPanelRegionInfo(), mPendingUpdate(false) {} -BOOL LLPanelEstateAccess::postBuild() +bool LLPanelEstateAccess::postBuild() { getChild<LLUICtrl>("allowed_avatar_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1)); LLNameListCtrl *avatar_name_list = getChild<LLNameListCtrl>("allowed_avatar_name_list"); if (avatar_name_list) { - avatar_name_list->setCommitOnSelectionChange(TRUE); + avatar_name_list->setCommitOnSelectionChange(true); avatar_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS); } @@ -2789,7 +2789,7 @@ BOOL LLPanelEstateAccess::postBuild() LLNameListCtrl* group_name_list = getChild<LLNameListCtrl>("allowed_group_name_list"); if (group_name_list) { - group_name_list->setCommitOnSelectionChange(TRUE); + group_name_list->setCommitOnSelectionChange(true); group_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS); } @@ -2802,7 +2802,7 @@ BOOL LLPanelEstateAccess::postBuild() LLNameListCtrl* banned_name_list = getChild<LLNameListCtrl>("banned_avatar_name_list"); if (banned_name_list) { - banned_name_list->setCommitOnSelectionChange(TRUE); + banned_name_list->setCommitOnSelectionChange(true); banned_name_list->setMaxItemCount(ESTATE_MAX_BANNED_IDS); } @@ -2815,28 +2815,28 @@ BOOL LLPanelEstateAccess::postBuild() LLNameListCtrl* manager_name_list = getChild<LLNameListCtrl>("estate_manager_name_list"); if (manager_name_list) { - manager_name_list->setCommitOnSelectionChange(TRUE); + manager_name_list->setCommitOnSelectionChange(true); manager_name_list->setMaxItemCount(ESTATE_MAX_MANAGERS * 4); // Allow extras for dupe issue } childSetAction("add_estate_manager_btn", boost::bind(&LLPanelEstateAccess::onClickAddEstateManager, this)); childSetAction("remove_estate_manager_btn", boost::bind(&LLPanelEstateAccess::onClickRemoveEstateManager, this)); - return TRUE; + return true; } void LLPanelEstateAccess::updateControls(LLViewerRegion* region) { - BOOL god = gAgent.isGodlike(); - BOOL owner = (region && (region->getOwner() == gAgent.getID())); - BOOL manager = (region && region->isEstateManager()); - BOOL enable_cotrols = god || owner || manager; + bool god = gAgent.isGodlike(); + bool owner = (region && (region->getOwner() == gAgent.getID())); + bool manager = (region && region->isEstateManager()); + bool enable_cotrols = god || owner || manager; setCtrlsEnabled(enable_cotrols); - BOOL has_allowed_avatar = getChild<LLNameListCtrl>("allowed_avatar_name_list")->getFirstSelected() ? TRUE : FALSE; - BOOL has_allowed_group = getChild<LLNameListCtrl>("allowed_group_name_list")->getFirstSelected() ? TRUE : FALSE; - BOOL has_banned_agent = getChild<LLNameListCtrl>("banned_avatar_name_list")->getFirstSelected() ? TRUE : FALSE; - BOOL has_estate_manager = getChild<LLNameListCtrl>("estate_manager_name_list")->getFirstSelected() ? TRUE : FALSE; + bool has_allowed_avatar = getChild<LLNameListCtrl>("allowed_avatar_name_list")->getFirstSelected() ? true : false; + bool has_allowed_group = getChild<LLNameListCtrl>("allowed_group_name_list")->getFirstSelected() ? true : false; + bool has_banned_agent = getChild<LLNameListCtrl>("banned_avatar_name_list")->getFirstSelected() ? true : false; + bool has_estate_manager = getChild<LLNameListCtrl>("estate_manager_name_list")->getFirstSelected() ? true : false; getChildView("add_allowed_avatar_btn")->setEnabled(enable_cotrols); getChildView("remove_allowed_avatar_btn")->setEnabled(has_allowed_avatar && enable_cotrols); @@ -3099,7 +3099,7 @@ bool LLPanelEstateAccess::accessAddCore2(const LLSD& notification, const LLSD& r // avatar picker yes multi-select, yes close-on-select LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelEstateAccess::accessAddCore3, _1, _2, (void*)change_info), - TRUE, TRUE, FALSE, parent_floater_name, button); + true, true, false, parent_floater_name, button); //Allows the closed parent floater to close the child floater (avatar picker) if (child_floater) @@ -3565,7 +3565,7 @@ void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url) LLUUID id = (*it)["id"].asUUID(); allowed_agent_name_list->addNameItem(id); } - allowed_agent_name_list->sortByName(TRUE); + allowed_agent_name_list->sortByName(true); } LLNameListCtrl* banned_agent_name_list = panel->getChild<LLNameListCtrl>("banned_avatar_name_list"); @@ -3608,7 +3608,7 @@ void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url) banned_agent_name_list->addElement(item); } - banned_agent_name_list->sortByName(TRUE); + banned_agent_name_list->sortByName(true); } LLNameListCtrl* allowed_group_name_list = panel->getChild<LLNameListCtrl>("allowed_group_name_list"); @@ -3627,7 +3627,7 @@ void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url) LLUUID id = (*it)["id"].asUUID(); allowed_group_name_list->addGroupNameItem(id); } - allowed_group_name_list->sortByName(TRUE); + allowed_group_name_list->sortByName(true); } LLNameListCtrl* estate_manager_name_list = panel->getChild<LLNameListCtrl>("estate_manager_name_list"); @@ -3646,7 +3646,7 @@ void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url) LLUUID id = (*it)["agent_id"].asUUID(); estate_manager_name_list->addNameItem(id); } - estate_manager_name_list->sortByName(TRUE); + estate_manager_name_list->sortByName(true); } @@ -3691,7 +3691,7 @@ void LLPanelEstateAccess::searchAgent(LLNameListCtrl* listCtrl, const std::strin } else { - listCtrl->deselectAllItems(TRUE); + listCtrl->deselectAllItems(true); } } @@ -3745,21 +3745,21 @@ LLPanelRegionEnvironment::~LLPanelRegionEnvironment() mCommitConnect.disconnect(); } -BOOL LLPanelRegionEnvironment::postBuild() +bool LLPanelRegionEnvironment::postBuild() { LLEstateInfoModel& estate_info = LLEstateInfoModel::instance(); if (!LLPanelEnvironmentInfo::postBuild()) - return FALSE; + return false; getChild<LLUICtrl>(BTN_USEDEFAULT)->setLabelArg("[USEDEFAULT]", getString(STR_LABEL_USEDEFAULT)); - getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setVisible(TRUE); - getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(TRUE); + getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setVisible(true); + getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(true); getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setCommitCallback([this](LLUICtrl *, const LLSD &value){ onChkAllowOverride(value.asBoolean()); }); mCommitConnect = estate_info.setCommitCallback(boost::bind(&LLPanelRegionEnvironment::refreshFromEstate, this)); - return TRUE; + return true; } |