summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpostcard.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-08-24 18:44:39 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-08-24 18:44:39 +0100
commit98cc2365034a93c69704daa69efb389799cc9627 (patch)
tree4c3ec75b78a26a736f18a2153af025040ae05a4b /indra/newview/llfloaterpostcard.cpp
parent6ba23344c95157793af9e4154933ae8df61630e8 (diff)
Backed out changeset a62bf7c0af21
Backing out this merge that I pushed (prematurely) to the wrong place.
Diffstat (limited to 'indra/newview/llfloaterpostcard.cpp')
-rw-r--r--indra/newview/llfloaterpostcard.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/indra/newview/llfloaterpostcard.cpp b/indra/newview/llfloaterpostcard.cpp
index bcdcd50288..0a321b999f 100644
--- a/indra/newview/llfloaterpostcard.cpp
+++ b/indra/newview/llfloaterpostcard.cpp
@@ -93,16 +93,16 @@ BOOL LLFloaterPostcard::postBuild()
childSetAction("cancel_btn", onClickCancel, this);
childSetAction("send_btn", onClickSend, this);
- getChildView("from_form")->setEnabled(FALSE);
+ childDisable("from_form");
std::string name_string;
LLAgentUI::buildFullname(name_string);
- getChild<LLUICtrl>("name_form")->setValue(LLSD(name_string));
+ childSetValue("name_form", LLSD(name_string));
// For the first time a user focusess to .the msg box, all text will be selected.
getChild<LLUICtrl>("msg_form")->setFocusChangedCallback(boost::bind(onMsgFormFocusRecieved, _1, this));
- getChild<LLUICtrl>("to_form")->setFocus(TRUE);
+ childSetFocus("to_form", TRUE);
return TRUE;
}
@@ -209,8 +209,8 @@ void LLFloaterPostcard::onClickSend(void* data)
{
LLFloaterPostcard *self = (LLFloaterPostcard *)data;
- std::string from(self->getChild<LLUICtrl>("from_form")->getValue().asString());
- std::string to(self->getChild<LLUICtrl>("to_form")->getValue().asString());
+ std::string from(self->childGetValue("from_form").asString());
+ std::string to(self->childGetValue("to_form").asString());
boost::regex emailFormat("[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(,[ \t]*[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,})*");
@@ -226,7 +226,7 @@ void LLFloaterPostcard::onClickSend(void* data)
return;
}
- std::string subject(self->getChild<LLUICtrl>("subject_form")->getValue().asString());
+ std::string subject(self->childGetValue("subject_form").asString());
if(subject.empty() || !self->mHasFirstMsgFocus)
{
LLNotificationsUtil::add("PromptMissingSubjMsg", LLSD(), LLSD(), boost::bind(&LLFloaterPostcard::missingSubjMsgAlertCallback, self, _1, _2));
@@ -269,11 +269,11 @@ void LLFloaterPostcard::uploadCallback(const LLUUID& asset_id, void *user_data,
msg->addUUID("SessionID", gAgent.getSessionID());
msg->addUUID("AssetID", self->mAssetID);
msg->addVector3d("PosGlobal", self->mPosTakenGlobal);
- msg->addString("To", self->getChild<LLUICtrl>("to_form")->getValue().asString());
- msg->addString("From", self->getChild<LLUICtrl>("from_form")->getValue().asString());
- msg->addString("Name", self->getChild<LLUICtrl>("name_form")->getValue().asString());
- msg->addString("Subject", self->getChild<LLUICtrl>("subject_form")->getValue().asString());
- msg->addString("Msg", self->getChild<LLUICtrl>("msg_form")->getValue().asString());
+ msg->addString("To", self->childGetValue("to_form").asString());
+ msg->addString("From", self->childGetValue("from_form").asString());
+ msg->addString("Name", self->childGetValue("name_form").asString());
+ msg->addString("Subject", self->childGetValue("subject_form").asString());
+ msg->addString("Msg", self->childGetValue("msg_form").asString());
msg->addBOOL("AllowPublish", FALSE);
msg->addBOOL("MaturePublish", FALSE);
gAgent.sendReliableMessage();
@@ -290,11 +290,11 @@ void LLFloaterPostcard::updateUserInfo(const std::string& email)
iter != inst_list.end(); ++iter)
{
LLFloater* instance = *iter;
- const std::string& text = instance->getChild<LLUICtrl>("from_form")->getValue().asString();
+ const std::string& text = instance->childGetValue("from_form").asString();
if (text.empty())
{
// there's no text in this field yet, pre-populate
- instance->getChild<LLUICtrl>("from_form")->setValue(LLSD(email));
+ instance->childSetValue("from_form", LLSD(email));
}
}
}
@@ -319,17 +319,17 @@ bool LLFloaterPostcard::missingSubjMsgAlertCallback(const LLSD& notification, co
if(0 == option)
{
// User clicked OK
- if((getChild<LLUICtrl>("subject_form")->getValue().asString()).empty())
+ if((childGetValue("subject_form").asString()).empty())
{
// Stuff the subject back into the form.
- getChild<LLUICtrl>("subject_form")->setValue(getString("default_subject"));
+ childSetValue("subject_form", getString("default_subject"));
}
if(!mHasFirstMsgFocus)
{
// The user never switched focus to the messagee window.
// Using the default string.
- getChild<LLUICtrl>("msg_form")->setValue(getString("default_message"));
+ childSetValue("msg_form", getString("default_message"));
}
sendPostcard();
@@ -351,11 +351,11 @@ void LLFloaterPostcard::sendPostcard()
LLSD body = LLSD::emptyMap();
// the capability already encodes: agent ID, region ID
body["pos-global"] = mPosTakenGlobal.getValue();
- body["to"] = getChild<LLUICtrl>("to_form")->getValue().asString();
- body["from"] = getChild<LLUICtrl>("from_form")->getValue().asString();
- body["name"] = getChild<LLUICtrl>("name_form")->getValue().asString();
- body["subject"] = getChild<LLUICtrl>("subject_form")->getValue().asString();
- body["msg"] = getChild<LLUICtrl>("msg_form")->getValue().asString();
+ body["to"] = childGetValue("to_form").asString();
+ body["from"] = childGetValue("from_form").asString();
+ body["name"] = childGetValue("name_form").asString();
+ body["subject"] = childGetValue("subject_form").asString();
+ body["msg"] = childGetValue("msg_form").asString();
LLHTTPClient::post(url, body, new LLSendPostcardResponder(body, mAssetID, LLAssetType::AT_IMAGE_JPEG));
}
else