summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatergodtools.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatergodtools.cpp')
-rw-r--r--indra/newview/llfloatergodtools.cpp272
1 files changed, 136 insertions, 136 deletions
diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp
index f95112a8ab..fa8d7a57d5 100644
--- a/indra/newview/llfloatergodtools.cpp
+++ b/indra/newview/llfloatergodtools.cpp
@@ -82,7 +82,7 @@ void LLFloaterGodTools::onOpen(const LLSD& key)
{
center();
setFocus(TRUE);
-// LLPanel *panel = getChild<LLTabContainer>("GodTools Tabs")->getCurrentPanel();
+// LLPanel *panel = childGetVisibleTab("GodTools Tabs");
// if (panel)
// panel->setFocus(TRUE);
if (mPanelObjectTools)
@@ -128,7 +128,7 @@ LLFloaterGodTools::LLFloaterGodTools(const LLSD& key)
BOOL LLFloaterGodTools::postBuild()
{
sendRegionInfoRequest();
- getChild<LLTabContainer>("GodTools Tabs")->selectTabByName("region");
+ childShowTab("GodTools Tabs", "region");
return TRUE;
}
// static
@@ -197,9 +197,9 @@ void LLFloaterGodTools::draw()
void LLFloaterGodTools::showPanel(const std::string& panel_name)
{
- getChild<LLTabContainer>("GodTools Tabs")->selectTabByName(panel_name);
+ childShowTab("GodTools Tabs", panel_name);
openFloater();
- LLPanel *panel = getChild<LLTabContainer>("GodTools Tabs")->getCurrentPanel();
+ LLPanel *panel = childGetVisibleTab("GodTools Tabs");
if (panel)
panel->setFocus(TRUE);
}
@@ -410,17 +410,17 @@ LLPanelRegionTools::LLPanelRegionTools()
BOOL LLPanelRegionTools::postBuild()
{
getChild<LLLineEditor>("region name")->setKeystrokeCallback(onChangeSimName, this);
- getChild<LLLineEditor>("region name")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
- getChild<LLLineEditor>("estate")->setPrevalidate(&LLTextValidate::validatePositiveS32);
- getChild<LLLineEditor>("parentestate")->setPrevalidate(&LLTextValidate::validatePositiveS32);
- getChildView("parentestate")->setEnabled(FALSE);
- getChild<LLLineEditor>("gridposx")->setPrevalidate(&LLTextValidate::validatePositiveS32);
- getChildView("gridposx")->setEnabled(FALSE);
- getChild<LLLineEditor>("gridposy")->setPrevalidate(&LLTextValidate::validatePositiveS32);
- getChildView("gridposy")->setEnabled(FALSE);
+ childSetPrevalidate("region name", &LLTextValidate::validateASCIIPrintableNoPipe);
+ childSetPrevalidate("estate", &LLTextValidate::validatePositiveS32);
+ childSetPrevalidate("parentestate", &LLTextValidate::validatePositiveS32);
+ childDisable("parentestate");
+ childSetPrevalidate("gridposx", &LLTextValidate::validatePositiveS32);
+ childDisable("gridposx");
+ childSetPrevalidate("gridposy", &LLTextValidate::validatePositiveS32);
+ childDisable("gridposy");
- getChild<LLLineEditor>("redirectx")->setPrevalidate(&LLTextValidate::validatePositiveS32);
- getChild<LLLineEditor>("redirecty")->setPrevalidate(&LLTextValidate::validatePositiveS32);
+ childSetPrevalidate("redirectx", &LLTextValidate::validatePositiveS32);
+ childSetPrevalidate("redirecty", &LLTextValidate::validatePositiveS32);
return TRUE;
}
@@ -447,42 +447,42 @@ void LLPanelRegionTools::refresh()
void LLPanelRegionTools::clearAllWidgets()
{
// clear all widgets
- getChild<LLUICtrl>("region name")->setValue("unknown");
- getChild<LLUICtrl>("region name")->setFocus( FALSE);
+ childSetValue("region name", "unknown");
+ childSetFocus("region name", FALSE);
- getChild<LLUICtrl>("check prelude")->setValue(FALSE);
- getChildView("check prelude")->setEnabled(FALSE);
+ childSetValue("check prelude", FALSE);
+ childDisable("check prelude");
- getChild<LLUICtrl>("check fixed sun")->setValue(FALSE);
- getChildView("check fixed sun")->setEnabled(FALSE);
+ childSetValue("check fixed sun", FALSE);
+ childDisable("check fixed sun");
- getChild<LLUICtrl>("check reset home")->setValue(FALSE);
- getChildView("check reset home")->setEnabled(FALSE);
+ childSetValue("check reset home", FALSE);
+ childDisable("check reset home");
- getChild<LLUICtrl>("check damage")->setValue(FALSE);
- getChildView("check damage")->setEnabled(FALSE);
+ childSetValue("check damage", FALSE);
+ childDisable("check damage");
- getChild<LLUICtrl>("check visible")->setValue(FALSE);
- getChildView("check visible")->setEnabled(FALSE);
+ childSetValue("check visible", FALSE);
+ childDisable("check visible");
- getChild<LLUICtrl>("block terraform")->setValue(FALSE);
- getChildView("block terraform")->setEnabled(FALSE);
+ childSetValue("block terraform", FALSE);
+ childDisable("block terraform");
- getChild<LLUICtrl>("block dwell")->setValue(FALSE);
- getChildView("block dwell")->setEnabled(FALSE);
+ childSetValue("block dwell", FALSE);
+ childDisable("block dwell");
- getChild<LLUICtrl>("is sandbox")->setValue(FALSE);
- getChildView("is sandbox")->setEnabled(FALSE);
+ childSetValue("is sandbox", FALSE);
+ childDisable("is sandbox");
- getChild<LLUICtrl>("billable factor")->setValue(BILLABLE_FACTOR_DEFAULT);
- getChildView("billable factor")->setEnabled(FALSE);
+ childSetValue("billable factor", BILLABLE_FACTOR_DEFAULT);
+ childDisable("billable factor");
- getChild<LLUICtrl>("land cost")->setValue(PRICE_PER_METER_DEFAULT);
- getChildView("land cost")->setEnabled(FALSE);
+ childSetValue("land cost", PRICE_PER_METER_DEFAULT);
+ childDisable("land cost");
- getChildView("Apply")->setEnabled(FALSE);
- getChildView("Bake Terrain")->setEnabled(FALSE);
- getChildView("Autosave now")->setEnabled(FALSE);
+ childDisable("Apply");
+ childDisable("Bake Terrain");
+ childDisable("Autosave now");
}
@@ -490,21 +490,21 @@ void LLPanelRegionTools::enableAllWidgets()
{
// enable all of the widgets
- getChildView("check prelude")->setEnabled(TRUE);
- getChildView("check fixed sun")->setEnabled(TRUE);
- getChildView("check reset home")->setEnabled(TRUE);
- getChildView("check damage")->setEnabled(TRUE);
- getChildView("check visible")->setEnabled(FALSE); // use estates to update...
- getChildView("block terraform")->setEnabled(TRUE);
- getChildView("block dwell")->setEnabled(TRUE);
- getChildView("is sandbox")->setEnabled(TRUE);
+ childEnable("check prelude");
+ childEnable("check fixed sun");
+ childEnable("check reset home");
+ childEnable("check damage");
+ childDisable("check visible"); // use estates to update...
+ childEnable("block terraform");
+ childEnable("block dwell");
+ childEnable("is sandbox");
- getChildView("billable factor")->setEnabled(TRUE);
- getChildView("land cost")->setEnabled(TRUE);
+ childEnable("billable factor");
+ childEnable("land cost");
- getChildView("Apply")->setEnabled(FALSE); // don't enable this one
- getChildView("Bake Terrain")->setEnabled(TRUE);
- getChildView("Autosave now")->setEnabled(TRUE);
+ childDisable("Apply"); // don't enable this one
+ childEnable("Bake Terrain");
+ childEnable("Autosave now");
}
void LLPanelRegionTools::onSaveState(void* userdata)
@@ -524,74 +524,74 @@ void LLPanelRegionTools::onSaveState(void* userdata)
const std::string LLPanelRegionTools::getSimName() const
{
- return getChild<LLUICtrl>("region name")->getValue();
+ return childGetValue("region name");
}
U32 LLPanelRegionTools::getEstateID() const
{
- U32 id = (U32)getChild<LLUICtrl>("estate")->getValue().asInteger();
+ U32 id = (U32)childGetValue("estate").asInteger();
return id;
}
U32 LLPanelRegionTools::getParentEstateID() const
{
- U32 id = (U32)getChild<LLUICtrl>("parentestate")->getValue().asInteger();
+ U32 id = (U32)childGetValue("parentestate").asInteger();
return id;
}
S32 LLPanelRegionTools::getRedirectGridX() const
{
- return getChild<LLUICtrl>("redirectx")->getValue().asInteger();
+ return childGetValue("redirectx").asInteger();
}
S32 LLPanelRegionTools::getRedirectGridY() const
{
- return getChild<LLUICtrl>("redirecty")->getValue().asInteger();
+ return childGetValue("redirecty").asInteger();
}
S32 LLPanelRegionTools::getGridPosX() const
{
- return getChild<LLUICtrl>("gridposx")->getValue().asInteger();
+ return childGetValue("gridposx").asInteger();
}
S32 LLPanelRegionTools::getGridPosY() const
{
- return getChild<LLUICtrl>("gridposy")->getValue().asInteger();
+ return childGetValue("gridposy").asInteger();
}
U32 LLPanelRegionTools::getRegionFlags() const
{
U32 flags = 0x0;
- flags = getChild<LLUICtrl>("check prelude")->getValue().asBoolean()
+ flags = childGetValue("check prelude").asBoolean()
? set_prelude_flags(flags)
: unset_prelude_flags(flags);
// override prelude
- if (getChild<LLUICtrl>("check fixed sun")->getValue().asBoolean())
+ if (childGetValue("check fixed sun").asBoolean())
{
flags |= REGION_FLAGS_SUN_FIXED;
}
- if (getChild<LLUICtrl>("check reset home")->getValue().asBoolean())
+ if (childGetValue("check reset home").asBoolean())
{
flags |= REGION_FLAGS_RESET_HOME_ON_TELEPORT;
}
- if (getChild<LLUICtrl>("check visible")->getValue().asBoolean())
+ if (childGetValue("check visible").asBoolean())
{
flags |= REGION_FLAGS_EXTERNALLY_VISIBLE;
}
- if (getChild<LLUICtrl>("check damage")->getValue().asBoolean())
+ if (childGetValue("check damage").asBoolean())
{
flags |= REGION_FLAGS_ALLOW_DAMAGE;
}
- if (getChild<LLUICtrl>("block terraform")->getValue().asBoolean())
+ if (childGetValue("block terraform").asBoolean())
{
flags |= REGION_FLAGS_BLOCK_TERRAFORM;
}
- if (getChild<LLUICtrl>("block dwell")->getValue().asBoolean())
+ if (childGetValue("block dwell").asBoolean())
{
flags |= REGION_FLAGS_BLOCK_DWELL;
}
- if (getChild<LLUICtrl>("is sandbox")->getValue().asBoolean())
+ if (childGetValue("is sandbox").asBoolean())
{
flags |= REGION_FLAGS_SANDBOX;
}
@@ -601,35 +601,35 @@ U32 LLPanelRegionTools::getRegionFlags() const
U32 LLPanelRegionTools::getRegionFlagsMask() const
{
U32 flags = 0xffffffff;
- flags = getChild<LLUICtrl>("check prelude")->getValue().asBoolean()
+ flags = childGetValue("check prelude").asBoolean()
? set_prelude_flags(flags)
: unset_prelude_flags(flags);
- if (!getChild<LLUICtrl>("check fixed sun")->getValue().asBoolean())
+ if (!childGetValue("check fixed sun").asBoolean())
{
flags &= ~REGION_FLAGS_SUN_FIXED;
}
- if (!getChild<LLUICtrl>("check reset home")->getValue().asBoolean())
+ if (!childGetValue("check reset home").asBoolean())
{
flags &= ~REGION_FLAGS_RESET_HOME_ON_TELEPORT;
}
- if (!getChild<LLUICtrl>("check visible")->getValue().asBoolean())
+ if (!childGetValue("check visible").asBoolean())
{
flags &= ~REGION_FLAGS_EXTERNALLY_VISIBLE;
}
- if (!getChild<LLUICtrl>("check damage")->getValue().asBoolean())
+ if (!childGetValue("check damage").asBoolean())
{
flags &= ~REGION_FLAGS_ALLOW_DAMAGE;
}
- if (!getChild<LLUICtrl>("block terraform")->getValue().asBoolean())
+ if (!childGetValue("block terraform").asBoolean())
{
flags &= ~REGION_FLAGS_BLOCK_TERRAFORM;
}
- if (!getChild<LLUICtrl>("block dwell")->getValue().asBoolean())
+ if (!childGetValue("block dwell").asBoolean())
{
flags &= ~REGION_FLAGS_BLOCK_DWELL;
}
- if (!getChild<LLUICtrl>("is sandbox")->getValue().asBoolean())
+ if (!childGetValue("is sandbox").asBoolean())
{
flags &= ~REGION_FLAGS_SANDBOX;
}
@@ -638,86 +638,86 @@ U32 LLPanelRegionTools::getRegionFlagsMask() const
F32 LLPanelRegionTools::getBillableFactor() const
{
- return (F32)getChild<LLUICtrl>("billable factor")->getValue().asReal();
+ return (F32)childGetValue("billable factor").asReal();
}
S32 LLPanelRegionTools::getPricePerMeter() const
{
- return getChild<LLUICtrl>("land cost")->getValue();
+ return childGetValue("land cost");
}
void LLPanelRegionTools::setSimName(const std::string& name)
{
- getChild<LLUICtrl>("region name")->setValue(name);
+ childSetValue("region name", name);
}
void LLPanelRegionTools::setEstateID(U32 id)
{
- getChild<LLUICtrl>("estate")->setValue((S32)id);
+ childSetValue("estate", (S32)id);
}
void LLPanelRegionTools::setGridPosX(S32 pos)
{
- getChild<LLUICtrl>("gridposx")->setValue(pos);
+ childSetValue("gridposx", pos);
}
void LLPanelRegionTools::setGridPosY(S32 pos)
{
- getChild<LLUICtrl>("gridposy")->setValue(pos);
+ childSetValue("gridposy", pos);
}
void LLPanelRegionTools::setRedirectGridX(S32 pos)
{
- getChild<LLUICtrl>("redirectx")->setValue(pos);
+ childSetValue("redirectx", pos);
}
void LLPanelRegionTools::setRedirectGridY(S32 pos)
{
- getChild<LLUICtrl>("redirecty")->setValue(pos);
+ childSetValue("redirecty", pos);
}
void LLPanelRegionTools::setParentEstateID(U32 id)
{
- getChild<LLUICtrl>("parentestate")->setValue((S32)id);
+ childSetValue("parentestate", (S32)id);
}
void LLPanelRegionTools::setCheckFlags(U32 flags)
{
- getChild<LLUICtrl>("check prelude")->setValue(is_prelude(flags) ? TRUE : FALSE);
- getChild<LLUICtrl>("check fixed sun")->setValue(flags & REGION_FLAGS_SUN_FIXED ? TRUE : FALSE);
- getChild<LLUICtrl>("check reset home")->setValue(flags & REGION_FLAGS_RESET_HOME_ON_TELEPORT ? TRUE : FALSE);
- getChild<LLUICtrl>("check damage")->setValue(flags & REGION_FLAGS_ALLOW_DAMAGE ? TRUE : FALSE);
- getChild<LLUICtrl>("check visible")->setValue(flags & REGION_FLAGS_EXTERNALLY_VISIBLE ? TRUE : FALSE);
- getChild<LLUICtrl>("block terraform")->setValue(flags & REGION_FLAGS_BLOCK_TERRAFORM ? TRUE : FALSE);
- getChild<LLUICtrl>("block dwell")->setValue(flags & REGION_FLAGS_BLOCK_DWELL ? TRUE : FALSE);
- getChild<LLUICtrl>("is sandbox")->setValue(flags & REGION_FLAGS_SANDBOX ? TRUE : FALSE );
+ childSetValue("check prelude", is_prelude(flags) ? TRUE : FALSE);
+ childSetValue("check fixed sun", flags & REGION_FLAGS_SUN_FIXED ? TRUE : FALSE);
+ childSetValue("check reset home", flags & REGION_FLAGS_RESET_HOME_ON_TELEPORT ? TRUE : FALSE);
+ childSetValue("check damage", flags & REGION_FLAGS_ALLOW_DAMAGE ? TRUE : FALSE);
+ childSetValue("check visible", flags & REGION_FLAGS_EXTERNALLY_VISIBLE ? TRUE : FALSE);
+ childSetValue("block terraform", flags & REGION_FLAGS_BLOCK_TERRAFORM ? TRUE : FALSE);
+ childSetValue("block dwell", flags & REGION_FLAGS_BLOCK_DWELL ? TRUE : FALSE);
+ childSetValue("is sandbox", flags & REGION_FLAGS_SANDBOX ? TRUE : FALSE );
}
void LLPanelRegionTools::setBillableFactor(F32 billable_factor)
{
- getChild<LLUICtrl>("billable factor")->setValue(billable_factor);
+ childSetValue("billable factor", billable_factor);
}
void LLPanelRegionTools::setPricePerMeter(S32 price)
{
- getChild<LLUICtrl>("land cost")->setValue(price);
+ childSetValue("land cost", price);
}
void LLPanelRegionTools::onChangeAnything()
{
if (gAgent.isGodlike())
{
- getChildView("Apply")->setEnabled(TRUE);
+ childEnable("Apply");
}
}
void LLPanelRegionTools::onChangePrelude()
{
// checking prelude auto-checks fixed sun
- if (getChild<LLUICtrl>("check prelude")->getValue().asBoolean())
+ if (childGetValue("check prelude").asBoolean())
{
- getChild<LLUICtrl>("check fixed sun")->setValue(TRUE);
- getChild<LLUICtrl>("check reset home")->setValue(TRUE);
+ childSetValue("check fixed sun", TRUE);
+ childSetValue("check reset home", TRUE);
onChangeAnything();
}
// pass on to default onChange handler
@@ -730,7 +730,7 @@ void LLPanelRegionTools::onChangeSimName(LLLineEditor* caller, void* userdata )
if (userdata && gAgent.isGodlike())
{
LLPanelRegionTools* region_tools = (LLPanelRegionTools*) userdata;
- region_tools->getChildView("Apply")->setEnabled(TRUE);
+ region_tools->childEnable("Apply");
}
}
@@ -755,7 +755,7 @@ void LLPanelRegionTools::onApplyChanges()
LLViewerRegion *region = gAgent.getRegion();
if (region && gAgent.isGodlike())
{
- getChildView("Apply")->setEnabled(FALSE);
+ childDisable("Apply");
god_tools->sendGodUpdateRegionInfo();
//LLFloaterReg::getTypedInstance<LLFloaterGodTools>("god_tools")->sendGodUpdateRegionInfo();
}
@@ -925,7 +925,7 @@ void LLPanelObjectTools::setTargetAvatar(const LLUUID &target_id)
mTargetAvatar = target_id;
if (target_id.isNull())
{
- getChild<LLUICtrl>("target_avatar_name")->setValue(getString("no_target"));
+ childSetValue("target_avatar_name", getString("no_target"));
}
}
@@ -935,14 +935,14 @@ void LLPanelObjectTools::refresh()
LLViewerRegion *regionp = gAgent.getRegion();
if (regionp)
{
- getChild<LLUICtrl>("region name")->setValue(regionp->getName());
+ childSetText("region name", regionp->getName());
}
}
U32 LLPanelObjectTools::computeRegionFlags(U32 flags) const
{
- if (getChild<LLUICtrl>("disable scripts")->getValue().asBoolean())
+ if (childGetValue("disable scripts").asBoolean())
{
flags |= REGION_FLAGS_SKIP_SCRIPTS;
}
@@ -950,7 +950,7 @@ U32 LLPanelObjectTools::computeRegionFlags(U32 flags) const
{
flags &= ~REGION_FLAGS_SKIP_SCRIPTS;
}
- if (getChild<LLUICtrl>("disable collisions")->getValue().asBoolean())
+ if (childGetValue("disable collisions").asBoolean())
{
flags |= REGION_FLAGS_SKIP_COLLISIONS;
}
@@ -958,7 +958,7 @@ U32 LLPanelObjectTools::computeRegionFlags(U32 flags) const
{
flags &= ~REGION_FLAGS_SKIP_COLLISIONS;
}
- if (getChild<LLUICtrl>("disable physics")->getValue().asBoolean())
+ if (childGetValue("disable physics").asBoolean())
{
flags |= REGION_FLAGS_SKIP_PHYSICS;
}
@@ -972,36 +972,36 @@ U32 LLPanelObjectTools::computeRegionFlags(U32 flags) const
void LLPanelObjectTools::setCheckFlags(U32 flags)
{
- getChild<LLUICtrl>("disable scripts")->setValue(flags & REGION_FLAGS_SKIP_SCRIPTS ? TRUE : FALSE);
- getChild<LLUICtrl>("disable collisions")->setValue(flags & REGION_FLAGS_SKIP_COLLISIONS ? TRUE : FALSE);
- getChild<LLUICtrl>("disable physics")->setValue(flags & REGION_FLAGS_SKIP_PHYSICS ? TRUE : FALSE);
+ childSetValue("disable scripts", flags & REGION_FLAGS_SKIP_SCRIPTS ? TRUE : FALSE);
+ childSetValue("disable collisions", flags & REGION_FLAGS_SKIP_COLLISIONS ? TRUE : FALSE);
+ childSetValue("disable physics", flags & REGION_FLAGS_SKIP_PHYSICS ? TRUE : FALSE);
}
void LLPanelObjectTools::clearAllWidgets()
{
- getChild<LLUICtrl>("disable scripts")->setValue(FALSE);
- getChildView("disable scripts")->setEnabled(FALSE);
+ childSetValue("disable scripts", FALSE);
+ childDisable("disable scripts");
- getChildView("Apply")->setEnabled(FALSE);
- getChildView("Set Target")->setEnabled(FALSE);
- getChildView("Delete Target's Scripted Objects On Others Land")->setEnabled(FALSE);
- getChildView("Delete Target's Scripted Objects On *Any* Land")->setEnabled(FALSE);
- getChildView("Delete *ALL* Of Target's Objects")->setEnabled(FALSE);
+ childDisable("Apply");
+ childDisable("Set Target");
+ childDisable("Delete Target's Scripted Objects On Others Land");
+ childDisable("Delete Target's Scripted Objects On *Any* Land");
+ childDisable("Delete *ALL* Of Target's Objects");
}
void LLPanelObjectTools::enableAllWidgets()
{
- getChildView("disable scripts")->setEnabled(TRUE);
+ childEnable("disable scripts");
- getChildView("Apply")->setEnabled(FALSE); // don't enable this one
- getChildView("Set Target")->setEnabled(TRUE);
- getChildView("Delete Target's Scripted Objects On Others Land")->setEnabled(TRUE);
- getChildView("Delete Target's Scripted Objects On *Any* Land")->setEnabled(TRUE);
- getChildView("Delete *ALL* Of Target's Objects")->setEnabled(TRUE);
- getChildView("Get Top Colliders")->setEnabled(TRUE);
- getChildView("Get Top Scripts")->setEnabled(TRUE);
+ childDisable("Apply"); // don't enable this one
+ childEnable("Set Target");
+ childEnable("Delete Target's Scripted Objects On Others Land");
+ childEnable("Delete Target's Scripted Objects On *Any* Land");
+ childEnable("Delete *ALL* Of Target's Objects");
+ childEnable("Get Top Colliders");
+ childEnable("Get Top Scripts");
}
@@ -1051,7 +1051,7 @@ void LLPanelObjectTools::onClickDeletePublicOwnedBy()
SWD_SCRIPTED_ONLY | SWD_OTHERS_LAND_ONLY;
LLSD args;
- args["AVATAR_NAME"] = getChild<LLUICtrl>("target_avatar_name")->getValue().asString();
+ args["AVATAR_NAME"] = childGetValue("target_avatar_name").asString();
LLSD payload;
payload["avatar_id"] = mTargetAvatar;
payload["flags"] = (S32)mSimWideDeletesFlags;
@@ -1071,7 +1071,7 @@ void LLPanelObjectTools::onClickDeleteAllScriptedOwnedBy()
mSimWideDeletesFlags = SWD_SCRIPTED_ONLY;
LLSD args;
- args["AVATAR_NAME"] = getChild<LLUICtrl>("target_avatar_name")->getValue().asString();
+ args["AVATAR_NAME"] = childGetValue("target_avatar_name").asString();
LLSD payload;
payload["avatar_id"] = mTargetAvatar;
payload["flags"] = (S32)mSimWideDeletesFlags;
@@ -1091,7 +1091,7 @@ void LLPanelObjectTools::onClickDeleteAllOwnedBy()
mSimWideDeletesFlags = 0;
LLSD args;
- args["AVATAR_NAME"] = getChild<LLUICtrl>("target_avatar_name")->getValue().asString();
+ args["AVATAR_NAME"] = childGetValue("target_avatar_name").asString();
LLSD payload;
payload["avatar_id"] = mTargetAvatar;
payload["flags"] = (S32)mSimWideDeletesFlags;
@@ -1142,14 +1142,14 @@ void LLPanelObjectTools::onClickSetBySelection(void* data)
args["[OBJECT]"] = node->mName;
args["[OWNER]"] = owner_name;
std::string name = LLTrans::getString("GodToolsObjectOwnedBy", args);
- panelp->getChild<LLUICtrl>("target_avatar_name")->setValue(name);
+ panelp->childSetValue("target_avatar_name", name);
}
void LLPanelObjectTools::callbackAvatarID(const std::vector<std::string>& names, const uuid_vec_t& ids)
{
if (ids.empty() || names.empty()) return;
mTargetAvatar = ids[0];
- getChild<LLUICtrl>("target_avatar_name")->setValue(names[0]);
+ childSetValue("target_avatar_name", names[0]);
refresh();
}
@@ -1157,7 +1157,7 @@ void LLPanelObjectTools::onChangeAnything()
{
if (gAgent.isGodlike())
{
- getChildView("Apply")->setEnabled(TRUE);
+ childEnable("Apply");
}
}
@@ -1169,7 +1169,7 @@ void LLPanelObjectTools::onApplyChanges()
if (region && gAgent.isGodlike())
{
// TODO -- implement this
- getChildView("Apply")->setEnabled(FALSE);
+ childDisable("Apply");
god_tools->sendGodUpdateRegionInfo();
//LLFloaterReg::getTypedInstance<LLFloaterGodTools>("god_tools")->sendGodUpdateRegionInfo();
}
@@ -1202,7 +1202,7 @@ BOOL LLPanelRequestTools::postBuild()
void LLPanelRequestTools::refresh()
{
- std::string buffer = getChild<LLUICtrl>("destination")->getValue();
+ std::string buffer = childGetValue("destination");
LLCtrlListInterface *list = childGetListInterface("destination");
if (!list) return;
@@ -1257,12 +1257,12 @@ void LLPanelRequestTools::sendRequest(const std::string& request,
void LLPanelRequestTools::onClickRequest()
{
- const std::string dest = getChild<LLUICtrl>("destination")->getValue().asString();
+ const std::string dest = childGetValue("destination").asString();
if(dest == SELECTION)
{
- std::string req =getChild<LLUICtrl>("request")->getValue();
+ std::string req =childGetValue("request");
req = req.substr(0, req.find_first_of(" "));
- std::string param = getChild<LLUICtrl>("parameter")->getValue();
+ std::string param = childGetValue("parameter");
LLSelectMgr::getInstance()->sendGodlikeRequest(req, param);
}
else if(dest == AGENT_REGION)
@@ -1301,7 +1301,7 @@ void LLPanelRequestTools::sendRequest(const LLHost& host)
{
// intercept viewer local actions here
- std::string req = getChild<LLUICtrl>("request")->getValue();
+ std::string req = childGetValue("request");
if (req == "terrain download")
{
gXferManager->requestFile(std::string("terrain.raw"), std::string("terrain.raw"), LL_PATH_NONE,
@@ -1313,7 +1313,7 @@ void LLPanelRequestTools::sendRequest(const LLHost& host)
else
{
req = req.substr(0, req.find_first_of(" "));
- sendRequest(req, getChild<LLUICtrl>("parameter")->getValue().asString(), host);
+ sendRequest(req, childGetValue("parameter").asString(), host);
}
}