From 566e3969f98c7ac10fe151ba119a78ac5eda2e3c Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Fri, 30 Jul 2010 10:02:30 -0700 Subject: deprecated LLPanel::child*() methods --- indra/newview/llfloaterpostcard.cpp | 42 ++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'indra/newview/llfloaterpostcard.cpp') diff --git a/indra/newview/llfloaterpostcard.cpp b/indra/newview/llfloaterpostcard.cpp index 8da44e2035..dc4553ef96 100644 --- a/indra/newview/llfloaterpostcard.cpp +++ b/indra/newview/llfloaterpostcard.cpp @@ -99,16 +99,16 @@ BOOL LLFloaterPostcard::postBuild() childSetAction("cancel_btn", onClickCancel, this); childSetAction("send_btn", onClickSend, this); - childDisable("from_form"); + getChildView("from_form")->setEnabled(FALSE); std::string name_string; LLAgentUI::buildFullname(name_string); - childSetValue("name_form", LLSD(name_string)); + getChild("name_form")->setValue(LLSD(name_string)); // For the first time a user focusess to .the msg box, all text will be selected. getChild("msg_form")->setFocusChangedCallback(boost::bind(onMsgFormFocusRecieved, _1, this)); - childSetFocus("to_form", TRUE); + getChild("to_form")->setFocus(TRUE); return TRUE; } @@ -215,8 +215,8 @@ void LLFloaterPostcard::onClickSend(void* data) { LLFloaterPostcard *self = (LLFloaterPostcard *)data; - std::string from(self->childGetValue("from_form").asString()); - std::string to(self->childGetValue("to_form").asString()); + std::string from(self->getChild("from_form")->getValue().asString()); + std::string to(self->getChild("to_form")->getValue().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,})*"); @@ -232,7 +232,7 @@ void LLFloaterPostcard::onClickSend(void* data) return; } - std::string subject(self->childGetValue("subject_form").asString()); + std::string subject(self->getChild("subject_form")->getValue().asString()); if(subject.empty() || !self->mHasFirstMsgFocus) { LLNotificationsUtil::add("PromptMissingSubjMsg", LLSD(), LLSD(), boost::bind(&LLFloaterPostcard::missingSubjMsgAlertCallback, self, _1, _2)); @@ -275,11 +275,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->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->addString("To", self->getChild("to_form")->getValue().asString()); + msg->addString("From", self->getChild("from_form")->getValue().asString()); + msg->addString("Name", self->getChild("name_form")->getValue().asString()); + msg->addString("Subject", self->getChild("subject_form")->getValue().asString()); + msg->addString("Msg", self->getChild("msg_form")->getValue().asString()); msg->addBOOL("AllowPublish", FALSE); msg->addBOOL("MaturePublish", FALSE); gAgent.sendReliableMessage(); @@ -296,11 +296,11 @@ void LLFloaterPostcard::updateUserInfo(const std::string& email) iter != inst_list.end(); ++iter) { LLFloater* instance = *iter; - const std::string& text = instance->childGetValue("from_form").asString(); + const std::string& text = instance->getChild("from_form")->getValue().asString(); if (text.empty()) { // there's no text in this field yet, pre-populate - instance->childSetValue("from_form", LLSD(email)); + instance->getChild("from_form")->setValue(LLSD(email)); } } } @@ -325,17 +325,17 @@ bool LLFloaterPostcard::missingSubjMsgAlertCallback(const LLSD& notification, co if(0 == option) { // User clicked OK - if((childGetValue("subject_form").asString()).empty()) + if((getChild("subject_form")->getValue().asString()).empty()) { // Stuff the subject back into the form. - childSetValue("subject_form", getString("default_subject")); + getChild("subject_form")->setValue(getString("default_subject")); } if(!mHasFirstMsgFocus) { // The user never switched focus to the messagee window. // Using the default string. - childSetValue("msg_form", getString("default_message")); + getChild("msg_form")->setValue(getString("default_message")); } sendPostcard(); @@ -357,11 +357,11 @@ void LLFloaterPostcard::sendPostcard() LLSD body = LLSD::emptyMap(); // the capability already encodes: agent ID, region ID body["pos-global"] = mPosTakenGlobal.getValue(); - 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(); + body["to"] = getChild("to_form")->getValue().asString(); + body["from"] = getChild("from_form")->getValue().asString(); + body["name"] = getChild("name_form")->getValue().asString(); + body["subject"] = getChild("subject_form")->getValue().asString(); + body["msg"] = getChild("msg_form")->getValue().asString(); LLHTTPClient::post(url, body, new LLSendPostcardResponder(body, mAssetID, LLAssetType::AT_IMAGE_JPEG)); } else -- cgit v1.2.3