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 bd07cfdfbf..61f5098af1 100644
--- a/indra/newview/llfloatergodtools.cpp
+++ b/indra/newview/llfloatergodtools.cpp
@@ -88,7 +88,7 @@ void LLFloaterGodTools::onOpen(const LLSD& key)
{
center();
setFocus(TRUE);
-// LLPanel *panel = childGetVisibleTab("GodTools Tabs");
+// LLPanel *panel = getChild<LLTabContainer>("GodTools Tabs")->getCurrentPanel();
// if (panel)
// panel->setFocus(TRUE);
if (mPanelObjectTools)
@@ -134,7 +134,7 @@ LLFloaterGodTools::LLFloaterGodTools(const LLSD& key)
BOOL LLFloaterGodTools::postBuild()
{
sendRegionInfoRequest();
- childShowTab("GodTools Tabs", "region");
+ getChild<LLTabContainer>("GodTools Tabs")->selectTabByName("region");
return TRUE;
}
// static
@@ -203,9 +203,9 @@ void LLFloaterGodTools::draw()
void LLFloaterGodTools::showPanel(const std::string& panel_name)
{
- childShowTab("GodTools Tabs", panel_name);
+ getChild<LLTabContainer>("GodTools Tabs")->selectTabByName(panel_name);
openFloater();
- LLPanel *panel = childGetVisibleTab("GodTools Tabs");
+ LLPanel *panel = getChild<LLTabContainer>("GodTools Tabs")->getCurrentPanel();
if (panel)
panel->setFocus(TRUE);
}
@@ -416,17 +416,17 @@ LLPanelRegionTools::LLPanelRegionTools()
BOOL LLPanelRegionTools::postBuild()
{
getChild<LLLineEditor>("region name")->setKeystrokeCallback(onChangeSimName, this);
- 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>("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("redirectx", &LLTextValidate::validatePositiveS32);
- childSetPrevalidate("redirecty", &LLTextValidate::validatePositiveS32);
+ getChild<LLLineEditor>("redirectx")->setPrevalidate(&LLTextValidate::validatePositiveS32);
+ getChild<LLLineEditor>("redirecty")->setPrevalidate(&LLTextValidate::validatePositiveS32);
return TRUE;
}
@@ -453,42 +453,42 @@ void LLPanelRegionTools::refresh()
void LLPanelRegionTools::clearAllWidgets()
{
// clear all widgets
- childSetValue("region name", "unknown");
- childSetFocus("region name", FALSE);
+ getChild<LLUICtrl>("region name")->setValue("unknown");
+ getChild<LLUICtrl>("region name")->setFocus( FALSE);
- childSetValue("check prelude", FALSE);
- childDisable("check prelude");
+ getChild<LLUICtrl>("check prelude")->setValue(FALSE);
+ getChildView("check prelude")->setEnabled(FALSE);
- childSetValue("check fixed sun", FALSE);
- childDisable("check fixed sun");
+ getChild<LLUICtrl>("check fixed sun")->setValue(FALSE);
+ getChildView("check fixed sun")->setEnabled(FALSE);
- childSetValue("check reset home", FALSE);
- childDisable("check reset home");
+ getChild<LLUICtrl>("check reset home")->setValue(FALSE);
+ getChildView("check reset home")->setEnabled(FALSE);
- childSetValue("check damage", FALSE);
- childDisable("check damage");
+ getChild<LLUICtrl>("check damage")->setValue(FALSE);
+ getChildView("check damage")->setEnabled(FALSE);
- childSetValue("check visible", FALSE);
- childDisable("check visible");
+ getChild<LLUICtrl>("check visible")->setValue(FALSE);
+ getChildView("check visible")->setEnabled(FALSE);
- childSetValue("block terraform", FALSE);
- childDisable("block terraform");
+ getChild<LLUICtrl>("block terraform")->setValue(FALSE);
+ getChildView("block terraform")->setEnabled(FALSE);
- childSetValue("block dwell", FALSE);
- childDisable("block dwell");
+ getChild<LLUICtrl>("block dwell")->setValue(FALSE);
+ getChildView("block dwell")->setEnabled(FALSE);
- childSetValue("is sandbox", FALSE);
- childDisable("is sandbox");
+ getChild<LLUICtrl>("is sandbox")->setValue(FALSE);
+ getChildView("is sandbox")->setEnabled(FALSE);
- childSetValue("billable factor", BILLABLE_FACTOR_DEFAULT);
- childDisable("billable factor");
+ getChild<LLUICtrl>("billable factor")->setValue(BILLABLE_FACTOR_DEFAULT);
+ getChildView("billable factor")->setEnabled(FALSE);
- childSetValue("land cost", PRICE_PER_METER_DEFAULT);
- childDisable("land cost");
+ getChild<LLUICtrl>("land cost")->setValue(PRICE_PER_METER_DEFAULT);
+ getChildView("land cost")->setEnabled(FALSE);
- childDisable("Apply");
- childDisable("Bake Terrain");
- childDisable("Autosave now");
+ getChildView("Apply")->setEnabled(FALSE);
+ getChildView("Bake Terrain")->setEnabled(FALSE);
+ getChildView("Autosave now")->setEnabled(FALSE);
}
@@ -496,21 +496,21 @@ void LLPanelRegionTools::enableAllWidgets()
{
// enable all of the widgets
- 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("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("billable factor");
- childEnable("land cost");
+ getChildView("billable factor")->setEnabled(TRUE);
+ getChildView("land cost")->setEnabled(TRUE);
- childDisable("Apply"); // don't enable this one
- childEnable("Bake Terrain");
- childEnable("Autosave now");
+ getChildView("Apply")->setEnabled(FALSE); // don't enable this one
+ getChildView("Bake Terrain")->setEnabled(TRUE);
+ getChildView("Autosave now")->setEnabled(TRUE);
}
void LLPanelRegionTools::onSaveState(void* userdata)
@@ -530,74 +530,74 @@ void LLPanelRegionTools::onSaveState(void* userdata)
const std::string LLPanelRegionTools::getSimName() const
{
- return childGetValue("region name");
+ return getChild<LLUICtrl>("region name")->getValue();
}
U32 LLPanelRegionTools::getEstateID() const
{
- U32 id = (U32)childGetValue("estate").asInteger();
+ U32 id = (U32)getChild<LLUICtrl>("estate")->getValue().asInteger();
return id;
}
U32 LLPanelRegionTools::getParentEstateID() const
{
- U32 id = (U32)childGetValue("parentestate").asInteger();
+ U32 id = (U32)getChild<LLUICtrl>("parentestate")->getValue().asInteger();
return id;
}
S32 LLPanelRegionTools::getRedirectGridX() const
{
- return childGetValue("redirectx").asInteger();
+ return getChild<LLUICtrl>("redirectx")->getValue().asInteger();
}
S32 LLPanelRegionTools::getRedirectGridY() const
{
- return childGetValue("redirecty").asInteger();
+ return getChild<LLUICtrl>("redirecty")->getValue().asInteger();
}
S32 LLPanelRegionTools::getGridPosX() const
{
- return childGetValue("gridposx").asInteger();
+ return getChild<LLUICtrl>("gridposx")->getValue().asInteger();
}
S32 LLPanelRegionTools::getGridPosY() const
{
- return childGetValue("gridposy").asInteger();
+ return getChild<LLUICtrl>("gridposy")->getValue().asInteger();
}
U32 LLPanelRegionTools::getRegionFlags() const
{
U32 flags = 0x0;
- flags = childGetValue("check prelude").asBoolean()
+ flags = getChild<LLUICtrl>("check prelude")->getValue().asBoolean()
? set_prelude_flags(flags)
: unset_prelude_flags(flags);
// override prelude
- if (childGetValue("check fixed sun").asBoolean())
+ if (getChild<LLUICtrl>("check fixed sun")->getValue().asBoolean())
{
flags |= REGION_FLAGS_SUN_FIXED;
}
- if (childGetValue("check reset home").asBoolean())
+ if (getChild<LLUICtrl>("check reset home")->getValue().asBoolean())
{
flags |= REGION_FLAGS_RESET_HOME_ON_TELEPORT;
}
- if (childGetValue("check visible").asBoolean())
+ if (getChild<LLUICtrl>("check visible")->getValue().asBoolean())
{
flags |= REGION_FLAGS_EXTERNALLY_VISIBLE;
}
- if (childGetValue("check damage").asBoolean())
+ if (getChild<LLUICtrl>("check damage")->getValue().asBoolean())
{
flags |= REGION_FLAGS_ALLOW_DAMAGE;
}
- if (childGetValue("block terraform").asBoolean())
+ if (getChild<LLUICtrl>("block terraform")->getValue().asBoolean())
{
flags |= REGION_FLAGS_BLOCK_TERRAFORM;
}
- if (childGetValue("block dwell").asBoolean())
+ if (getChild<LLUICtrl>("block dwell")->getValue().asBoolean())
{
flags |= REGION_FLAGS_BLOCK_DWELL;
}
- if (childGetValue("is sandbox").asBoolean())
+ if (getChild<LLUICtrl>("is sandbox")->getValue().asBoolean())
{
flags |= REGION_FLAGS_SANDBOX;
}
@@ -607,35 +607,35 @@ U32 LLPanelRegionTools::getRegionFlags() const
U32 LLPanelRegionTools::getRegionFlagsMask() const
{
U32 flags = 0xffffffff;
- flags = childGetValue("check prelude").asBoolean()
+ flags = getChild<LLUICtrl>("check prelude")->getValue().asBoolean()
? set_prelude_flags(flags)
: unset_prelude_flags(flags);
- if (!childGetValue("check fixed sun").asBoolean())
+ if (!getChild<LLUICtrl>("check fixed sun")->getValue().asBoolean())
{
flags &= ~REGION_FLAGS_SUN_FIXED;
}
- if (!childGetValue("check reset home").asBoolean())
+ if (!getChild<LLUICtrl>("check reset home")->getValue().asBoolean())
{
flags &= ~REGION_FLAGS_RESET_HOME_ON_TELEPORT;
}
- if (!childGetValue("check visible").asBoolean())
+ if (!getChild<LLUICtrl>("check visible")->getValue().asBoolean())
{
flags &= ~REGION_FLAGS_EXTERNALLY_VISIBLE;
}
- if (!childGetValue("check damage").asBoolean())
+ if (!getChild<LLUICtrl>("check damage")->getValue().asBoolean())
{
flags &= ~REGION_FLAGS_ALLOW_DAMAGE;
}
- if (!childGetValue("block terraform").asBoolean())
+ if (!getChild<LLUICtrl>("block terraform")->getValue().asBoolean())
{
flags &= ~REGION_FLAGS_BLOCK_TERRAFORM;
}
- if (!childGetValue("block dwell").asBoolean())
+ if (!getChild<LLUICtrl>("block dwell")->getValue().asBoolean())
{
flags &= ~REGION_FLAGS_BLOCK_DWELL;
}
- if (!childGetValue("is sandbox").asBoolean())
+ if (!getChild<LLUICtrl>("is sandbox")->getValue().asBoolean())
{
flags &= ~REGION_FLAGS_SANDBOX;
}
@@ -644,86 +644,86 @@ U32 LLPanelRegionTools::getRegionFlagsMask() const
F32 LLPanelRegionTools::getBillableFactor() const
{
- return (F32)childGetValue("billable factor").asReal();
+ return (F32)getChild<LLUICtrl>("billable factor")->getValue().asReal();
}
S32 LLPanelRegionTools::getPricePerMeter() const
{
- return childGetValue("land cost");
+ return getChild<LLUICtrl>("land cost")->getValue();
}
void LLPanelRegionTools::setSimName(const std::string& name)
{
- childSetValue("region name", name);
+ getChild<LLUICtrl>("region name")->setValue(name);
}
void LLPanelRegionTools::setEstateID(U32 id)
{
- childSetValue("estate", (S32)id);
+ getChild<LLUICtrl>("estate")->setValue((S32)id);
}
void LLPanelRegionTools::setGridPosX(S32 pos)
{
- childSetValue("gridposx", pos);
+ getChild<LLUICtrl>("gridposx")->setValue(pos);
}
void LLPanelRegionTools::setGridPosY(S32 pos)
{
- childSetValue("gridposy", pos);
+ getChild<LLUICtrl>("gridposy")->setValue(pos);
}
void LLPanelRegionTools::setRedirectGridX(S32 pos)
{
- childSetValue("redirectx", pos);
+ getChild<LLUICtrl>("redirectx")->setValue(pos);
}
void LLPanelRegionTools::setRedirectGridY(S32 pos)
{
- childSetValue("redirecty", pos);
+ getChild<LLUICtrl>("redirecty")->setValue(pos);
}
void LLPanelRegionTools::setParentEstateID(U32 id)
{
- childSetValue("parentestate", (S32)id);
+ getChild<LLUICtrl>("parentestate")->setValue((S32)id);
}
void LLPanelRegionTools::setCheckFlags(U32 flags)
{
- 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 );
+ 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 );
}
void LLPanelRegionTools::setBillableFactor(F32 billable_factor)
{
- childSetValue("billable factor", billable_factor);
+ getChild<LLUICtrl>("billable factor")->setValue(billable_factor);
}
void LLPanelRegionTools::setPricePerMeter(S32 price)
{
- childSetValue("land cost", price);
+ getChild<LLUICtrl>("land cost")->setValue(price);
}
void LLPanelRegionTools::onChangeAnything()
{
if (gAgent.isGodlike())
{
- childEnable("Apply");
+ getChildView("Apply")->setEnabled(TRUE);
}
}
void LLPanelRegionTools::onChangePrelude()
{
// checking prelude auto-checks fixed sun
- if (childGetValue("check prelude").asBoolean())
+ if (getChild<LLUICtrl>("check prelude")->getValue().asBoolean())
{
- childSetValue("check fixed sun", TRUE);
- childSetValue("check reset home", TRUE);
+ getChild<LLUICtrl>("check fixed sun")->setValue(TRUE);
+ getChild<LLUICtrl>("check reset home")->setValue(TRUE);
onChangeAnything();
}
// pass on to default onChange handler
@@ -736,7 +736,7 @@ void LLPanelRegionTools::onChangeSimName(LLLineEditor* caller, void* userdata )
if (userdata && gAgent.isGodlike())
{
LLPanelRegionTools* region_tools = (LLPanelRegionTools*) userdata;
- region_tools->childEnable("Apply");
+ region_tools->getChildView("Apply")->setEnabled(TRUE);
}
}
@@ -761,7 +761,7 @@ void LLPanelRegionTools::onApplyChanges()
LLViewerRegion *region = gAgent.getRegion();
if (region && gAgent.isGodlike())
{
- childDisable("Apply");
+ getChildView("Apply")->setEnabled(FALSE);
god_tools->sendGodUpdateRegionInfo();
//LLFloaterReg::getTypedInstance<LLFloaterGodTools>("god_tools")->sendGodUpdateRegionInfo();
}
@@ -931,7 +931,7 @@ void LLPanelObjectTools::setTargetAvatar(const LLUUID &target_id)
mTargetAvatar = target_id;
if (target_id.isNull())
{
- childSetValue("target_avatar_name", getString("no_target"));
+ getChild<LLUICtrl>("target_avatar_name")->setValue(getString("no_target"));
}
}
@@ -941,14 +941,14 @@ void LLPanelObjectTools::refresh()
LLViewerRegion *regionp = gAgent.getRegion();
if (regionp)
{
- childSetText("region name", regionp->getName());
+ getChild<LLUICtrl>("region name")->setValue(regionp->getName());
}
}
U32 LLPanelObjectTools::computeRegionFlags(U32 flags) const
{
- if (childGetValue("disable scripts").asBoolean())
+ if (getChild<LLUICtrl>("disable scripts")->getValue().asBoolean())
{
flags |= REGION_FLAGS_SKIP_SCRIPTS;
}
@@ -956,7 +956,7 @@ U32 LLPanelObjectTools::computeRegionFlags(U32 flags) const
{
flags &= ~REGION_FLAGS_SKIP_SCRIPTS;
}
- if (childGetValue("disable collisions").asBoolean())
+ if (getChild<LLUICtrl>("disable collisions")->getValue().asBoolean())
{
flags |= REGION_FLAGS_SKIP_COLLISIONS;
}
@@ -964,7 +964,7 @@ U32 LLPanelObjectTools::computeRegionFlags(U32 flags) const
{
flags &= ~REGION_FLAGS_SKIP_COLLISIONS;
}
- if (childGetValue("disable physics").asBoolean())
+ if (getChild<LLUICtrl>("disable physics")->getValue().asBoolean())
{
flags |= REGION_FLAGS_SKIP_PHYSICS;
}
@@ -978,36 +978,36 @@ U32 LLPanelObjectTools::computeRegionFlags(U32 flags) const
void LLPanelObjectTools::setCheckFlags(U32 flags)
{
- 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);
+ 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);
}
void LLPanelObjectTools::clearAllWidgets()
{
- childSetValue("disable scripts", FALSE);
- childDisable("disable scripts");
+ getChild<LLUICtrl>("disable scripts")->setValue(FALSE);
+ getChildView("disable scripts")->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");
+ 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);
}
void LLPanelObjectTools::enableAllWidgets()
{
- childEnable("disable scripts");
+ getChildView("disable 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");
+ 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);
}
@@ -1057,7 +1057,7 @@ void LLPanelObjectTools::onClickDeletePublicOwnedBy()
SWD_SCRIPTED_ONLY | SWD_OTHERS_LAND_ONLY;
LLSD args;
- args["AVATAR_NAME"] = childGetValue("target_avatar_name").asString();
+ args["AVATAR_NAME"] = getChild<LLUICtrl>("target_avatar_name")->getValue().asString();
LLSD payload;
payload["avatar_id"] = mTargetAvatar;
payload["flags"] = (S32)mSimWideDeletesFlags;
@@ -1077,7 +1077,7 @@ void LLPanelObjectTools::onClickDeleteAllScriptedOwnedBy()
mSimWideDeletesFlags = SWD_SCRIPTED_ONLY;
LLSD args;
- args["AVATAR_NAME"] = childGetValue("target_avatar_name").asString();
+ args["AVATAR_NAME"] = getChild<LLUICtrl>("target_avatar_name")->getValue().asString();
LLSD payload;
payload["avatar_id"] = mTargetAvatar;
payload["flags"] = (S32)mSimWideDeletesFlags;
@@ -1097,7 +1097,7 @@ void LLPanelObjectTools::onClickDeleteAllOwnedBy()
mSimWideDeletesFlags = 0;
LLSD args;
- args["AVATAR_NAME"] = childGetValue("target_avatar_name").asString();
+ args["AVATAR_NAME"] = getChild<LLUICtrl>("target_avatar_name")->getValue().asString();
LLSD payload;
payload["avatar_id"] = mTargetAvatar;
payload["flags"] = (S32)mSimWideDeletesFlags;
@@ -1148,14 +1148,14 @@ void LLPanelObjectTools::onClickSetBySelection(void* data)
args["[OBJECT]"] = node->mName;
args["[OWNER]"] = owner_name;
std::string name = LLTrans::getString("GodToolsObjectOwnedBy", args);
- panelp->childSetValue("target_avatar_name", name);
+ panelp->getChild<LLUICtrl>("target_avatar_name")->setValue(name);
}
void LLPanelObjectTools::callbackAvatarID(const std::vector<std::string>& names, const uuid_vec_t& ids)
{
if (ids.empty() || names.empty()) return;
mTargetAvatar = ids[0];
- childSetValue("target_avatar_name", names[0]);
+ getChild<LLUICtrl>("target_avatar_name")->setValue(names[0]);
refresh();
}
@@ -1163,7 +1163,7 @@ void LLPanelObjectTools::onChangeAnything()
{
if (gAgent.isGodlike())
{
- childEnable("Apply");
+ getChildView("Apply")->setEnabled(TRUE);
}
}
@@ -1175,7 +1175,7 @@ void LLPanelObjectTools::onApplyChanges()
if (region && gAgent.isGodlike())
{
// TODO -- implement this
- childDisable("Apply");
+ getChildView("Apply")->setEnabled(FALSE);
god_tools->sendGodUpdateRegionInfo();
//LLFloaterReg::getTypedInstance<LLFloaterGodTools>("god_tools")->sendGodUpdateRegionInfo();
}
@@ -1208,7 +1208,7 @@ BOOL LLPanelRequestTools::postBuild()
void LLPanelRequestTools::refresh()
{
- std::string buffer = childGetValue("destination");
+ std::string buffer = getChild<LLUICtrl>("destination")->getValue();
LLCtrlListInterface *list = childGetListInterface("destination");
if (!list) return;
@@ -1263,12 +1263,12 @@ void LLPanelRequestTools::sendRequest(const std::string& request,
void LLPanelRequestTools::onClickRequest()
{
- const std::string dest = childGetValue("destination").asString();
+ const std::string dest = getChild<LLUICtrl>("destination")->getValue().asString();
if(dest == SELECTION)
{
- std::string req =childGetValue("request");
+ std::string req =getChild<LLUICtrl>("request")->getValue();
req = req.substr(0, req.find_first_of(" "));
- std::string param = childGetValue("parameter");
+ std::string param = getChild<LLUICtrl>("parameter")->getValue();
LLSelectMgr::getInstance()->sendGodlikeRequest(req, param);
}
else if(dest == AGENT_REGION)
@@ -1307,7 +1307,7 @@ void LLPanelRequestTools::sendRequest(const LLHost& host)
{
// intercept viewer local actions here
- std::string req = childGetValue("request");
+ std::string req = getChild<LLUICtrl>("request")->getValue();
if (req == "terrain download")
{
gXferManager->requestFile(std::string("terrain.raw"), std::string("terrain.raw"), LL_PATH_NONE,
@@ -1319,7 +1319,7 @@ void LLPanelRequestTools::sendRequest(const LLHost& host)
else
{
req = req.substr(0, req.find_first_of(" "));
- sendRequest(req, childGetValue("parameter").asString(), host);
+ sendRequest(req, getChild<LLUICtrl>("parameter")->getValue().asString(), host);
}
}