From 98cc2365034a93c69704daa69efb389799cc9627 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 24 Aug 2010 18:44:39 +0100 Subject: Backed out changeset a62bf7c0af21 Backing out this merge that I pushed (prematurely) to the wrong place. --- 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 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("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("msg_form")->setFocusChangedCallback(boost::bind(onMsgFormFocusRecieved, _1, this)); - getChild("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("from_form")->getValue().asString()); - std::string to(self->getChild("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("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("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->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("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("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("subject_form")->getValue().asString()).empty()) + if((childGetValue("subject_form").asString()).empty()) { // Stuff the subject back into the form. - getChild("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("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("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(); + 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 -- cgit v1.2.3