diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-24 19:22:00 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-24 19:22:00 +0100 |
commit | e416840f85dc4a367894036b9fe483f17d959c54 (patch) | |
tree | e12956cbe7a0082bbaaa545cb80d9e86b13f88e8 /indra/newview/llfloaterpay.cpp | |
parent | 98cc2365034a93c69704daa69efb389799cc9627 (diff) |
Backed out changeset c3d41f18ce2b
back-out the back-out for this branch. yay.
Diffstat (limited to 'indra/newview/llfloaterpay.cpp')
-rw-r--r-- | indra/newview/llfloaterpay.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp index ebc0b90fa9..151a76285b 100644 --- a/indra/newview/llfloaterpay.cpp +++ b/indra/newview/llfloaterpay.cpp @@ -152,7 +152,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<LLButton>("fastpay 1"); mQuickPayInfo[i] = info; @@ -162,7 +162,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<LLButton>("fastpay 5"); mQuickPayInfo[i] = info; @@ -172,7 +172,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<LLButton>("fastpay 10"); mQuickPayInfo[i] = info; @@ -182,14 +182,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<LLButton>("fastpay 20"); mQuickPayInfo[i] = info; ++i; - childSetVisible("amount text", FALSE); + getChildView("amount text")->setVisible( FALSE); std::string last_amount; if(sLastAmount > 0) @@ -197,19 +197,19 @@ BOOL LLFloaterPay::postBuild() last_amount = llformat("%d", sLastAmount); } - childSetVisible("amount", FALSE); + getChildView("amount")->setVisible( FALSE); getChild<LLLineEditor>("amount")->setKeystrokeCallback(&LLFloaterPay::onKeystroke, this); - childSetText("amount", last_amount); - childSetPrevalidate("amount", LLTextValidate::validateNonNegativeS32); + getChild<LLUICtrl>("amount")->setValue(last_amount); + getChild<LLLineEditor>("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); @@ -243,27 +243,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<LLUICtrl>("amount")->setValue(llformat("%d", llabs(price))); } S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_ButtonData); @@ -286,7 +286,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 ) { @@ -393,7 +393,7 @@ void LLFloaterPay::payViaObject(money_callback callback, LLSafeHandle<LLObjectSe BOOL is_group = FALSE; node->mPermissions->getOwnership(owner_id, is_group); - floater->childSetText("object_name_text",node->mName); + floater->getChild<LLUICtrl>("object_name_text")->setValue(node->mName); floater->finishPayUI(owner_id, is_group); } @@ -409,11 +409,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;i<MAX_PAY_BUTTONS;++i) { floater->mQuickPayButton[i]->setVisible(TRUE); @@ -428,7 +428,7 @@ void LLFloaterPay::finishPayUI(const LLUUID& target_id, BOOL is_group) // Make sure the amount field has focus - childSetFocus("amount", TRUE); + getChild<LLUICtrl>("amount")->setFocus( TRUE); LLLineEditor* amount = getChild<LLLineEditor>("amount"); amount->selectAll(); @@ -449,8 +449,8 @@ void LLFloaterPay::onCacheOwnerName(const LLUUID& owner_id, setTitle(getString("payee_resident")); } - childSetTextArg("payee_name", "[FIRST]", firstname); - childSetTextArg("payee_name", "[LAST]", lastname); + getChild<LLUICtrl>("payee_name")->setTextArg("[FIRST]", firstname); + getChild<LLUICtrl>("payee_name")->setTextArg("[LAST]", lastname); } // static @@ -470,8 +470,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<LLUICtrl>("amount")->getValue().asString(); + self->getChildView("pay btn")->setEnabled(!amtstr.empty() && atoi(amtstr.c_str()) > 0); } } @@ -494,7 +494,7 @@ void LLFloaterPay::give(S32 amount) // text field. if(amount == 0) { - amount = atoi(childGetText("amount").c_str()); + amount = atoi(getChild<LLUICtrl>("amount")->getValue().asString().c_str()); } sLastAmount = amount; |