From 9b526997d93d9290602a86f91a7f096da4395d97 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/llfloaterpay.cpp | 66 +++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'indra/newview/llfloaterpay.cpp') diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp index ba7526ccd5..c1640e2609 100644 --- a/indra/newview/llfloaterpay.cpp +++ b/indra/newview/llfloaterpay.cpp @@ -158,7 +158,7 @@ BOOL LLFloaterPay::postBuild() mCallbackData.push_back(info); childSetAction("fastpay 1",&LLFloaterPay::onGive,info); - childSetVisible("fastpay 1", FALSE); + getChildView("fastpay 1")->setVisible( FALSE); mQuickPayButton[i] = getChild("fastpay 1"); mQuickPayInfo[i] = info; @@ -168,7 +168,7 @@ BOOL LLFloaterPay::postBuild() mCallbackData.push_back(info); childSetAction("fastpay 5",&LLFloaterPay::onGive,info); - childSetVisible("fastpay 5", FALSE); + getChildView("fastpay 5")->setVisible( FALSE); mQuickPayButton[i] = getChild("fastpay 5"); mQuickPayInfo[i] = info; @@ -178,7 +178,7 @@ BOOL LLFloaterPay::postBuild() mCallbackData.push_back(info); childSetAction("fastpay 10",&LLFloaterPay::onGive,info); - childSetVisible("fastpay 10", FALSE); + getChildView("fastpay 10")->setVisible( FALSE); mQuickPayButton[i] = getChild("fastpay 10"); mQuickPayInfo[i] = info; @@ -188,14 +188,14 @@ BOOL LLFloaterPay::postBuild() mCallbackData.push_back(info); childSetAction("fastpay 20",&LLFloaterPay::onGive,info); - childSetVisible("fastpay 20", FALSE); + getChildView("fastpay 20")->setVisible( FALSE); mQuickPayButton[i] = getChild("fastpay 20"); mQuickPayInfo[i] = info; ++i; - childSetVisible("amount text", FALSE); + getChildView("amount text")->setVisible( FALSE); std::string last_amount; if(sLastAmount > 0) @@ -203,19 +203,19 @@ BOOL LLFloaterPay::postBuild() last_amount = llformat("%d", sLastAmount); } - childSetVisible("amount", FALSE); + getChildView("amount")->setVisible( FALSE); getChild("amount")->setKeystrokeCallback(&LLFloaterPay::onKeystroke, this); - childSetText("amount", last_amount); - childSetPrevalidate("amount", LLTextValidate::validateNonNegativeS32); + getChild("amount")->setValue(last_amount); + getChild("amount")->setPrevalidate(LLTextValidate::validateNonNegativeS32); info = new LLGiveMoneyInfo(this, 0); mCallbackData.push_back(info); childSetAction("pay btn",&LLFloaterPay::onGive,info); setDefaultBtn("pay btn"); - childSetVisible("pay btn", FALSE); - childSetEnabled("pay btn", (sLastAmount > 0)); + getChildView("pay btn")->setVisible( FALSE); + getChildView("pay btn")->setEnabled((sLastAmount > 0)); childSetAction("cancel btn",&LLFloaterPay::onCancel,this); @@ -249,27 +249,27 @@ void LLFloaterPay::processPayPriceReply(LLMessageSystem* msg, void **userdata) if (PAY_PRICE_HIDE == price) { - self->childSetVisible("amount", FALSE); - self->childSetVisible("pay btn", FALSE); - self->childSetVisible("amount text", FALSE); + self->getChildView("amount")->setVisible( FALSE); + self->getChildView("pay btn")->setVisible( FALSE); + self->getChildView("amount text")->setVisible( FALSE); } else if (PAY_PRICE_DEFAULT == price) { - self->childSetVisible("amount", TRUE); - self->childSetVisible("pay btn", TRUE); - self->childSetVisible("amount text", TRUE); + self->getChildView("amount")->setVisible( TRUE); + self->getChildView("pay btn")->setVisible( TRUE); + self->getChildView("amount text")->setVisible( TRUE); } else { // PAY_PRICE_HIDE and PAY_PRICE_DEFAULT are negative values // So we take the absolute value here after we have checked for those cases - self->childSetVisible("amount", TRUE); - self->childSetVisible("pay btn", TRUE); - self->childSetEnabled("pay btn", TRUE); - self->childSetVisible("amount text", TRUE); + self->getChildView("amount")->setVisible( TRUE); + self->getChildView("pay btn")->setVisible( TRUE); + self->getChildView("pay btn")->setEnabled(TRUE); + self->getChildView("amount text")->setVisible( TRUE); - self->childSetText("amount", llformat("%d", llabs(price))); + self->getChild("amount")->setValue(llformat("%d", llabs(price))); } S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_ButtonData); @@ -292,7 +292,7 @@ void LLFloaterPay::processPayPriceReply(LLMessageSystem* msg, void **userdata) self->mQuickPayButton[i]->setLabelUnselected(button_str); self->mQuickPayButton[i]->setVisible(TRUE); self->mQuickPayInfo[i]->mAmount = pay_button; - self->childSetVisible("fastpay text",TRUE); + self->getChildView("fastpay text")->setVisible(TRUE); if ( pay_button > max_pay_amount ) { @@ -399,7 +399,7 @@ void LLFloaterPay::payViaObject(money_callback callback, LLSafeHandlemPermissions->getOwnership(owner_id, is_group); - floater->childSetText("object_name_text",node->mName); + floater->getChild("object_name_text")->setValue(node->mName); floater->finishPayUI(owner_id, is_group); } @@ -415,11 +415,11 @@ void LLFloaterPay::payDirectly(money_callback callback, floater->setCallback(callback); floater->mObjectSelection = NULL; - floater->childSetVisible("amount", TRUE); - floater->childSetVisible("pay btn", TRUE); - floater->childSetVisible("amount text", TRUE); + floater->getChildView("amount")->setVisible( TRUE); + floater->getChildView("pay btn")->setVisible( TRUE); + floater->getChildView("amount text")->setVisible( TRUE); - floater->childSetVisible("fastpay text",TRUE); + floater->getChildView("fastpay text")->setVisible(TRUE); for(S32 i=0;imQuickPayButton[i]->setVisible(TRUE); @@ -434,7 +434,7 @@ void LLFloaterPay::finishPayUI(const LLUUID& target_id, BOOL is_group) // Make sure the amount field has focus - childSetFocus("amount", TRUE); + getChild("amount")->setFocus( TRUE); LLLineEditor* amount = getChild("amount"); amount->selectAll(); @@ -455,8 +455,8 @@ void LLFloaterPay::onCacheOwnerName(const LLUUID& owner_id, setTitle(getString("payee_resident")); } - childSetTextArg("payee_name", "[FIRST]", firstname); - childSetTextArg("payee_name", "[LAST]", lastname); + getChild("payee_name")->setTextArg("[FIRST]", firstname); + getChild("payee_name")->setTextArg("[LAST]", lastname); } // static @@ -476,8 +476,8 @@ void LLFloaterPay::onKeystroke(LLLineEditor*, void* data) if(self) { // enable the Pay button when amount is non-empty and positive, disable otherwise - std::string amtstr = self->childGetText("amount"); - self->childSetEnabled("pay btn", !amtstr.empty() && atoi(amtstr.c_str()) > 0); + std::string amtstr = self->getChild("amount")->getValue().asString(); + self->getChildView("pay btn")->setEnabled(!amtstr.empty() && atoi(amtstr.c_str()) > 0); } } @@ -500,7 +500,7 @@ void LLFloaterPay::give(S32 amount) // text field. if(amount == 0) { - amount = atoi(childGetText("amount").c_str()); + amount = atoi(getChild("amount")->getValue().asString().c_str()); } sLastAmount = amount; -- cgit v1.2.3