diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-24 18:44:39 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-24 18:44:39 +0100 |
commit | 98cc2365034a93c69704daa69efb389799cc9627 (patch) | |
tree | 4c3ec75b78a26a736f18a2153af025040ae05a4b /indra/newview/llfloaterpay.cpp | |
parent | 6ba23344c95157793af9e4154933ae8df61630e8 (diff) |
Backed out changeset a62bf7c0af21
Backing out this merge that I pushed (prematurely) to the wrong place.
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 151a76285b..ebc0b90fa9 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); - getChildView("fastpay 1")->setVisible( FALSE); + childSetVisible("fastpay 1", 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); - getChildView("fastpay 5")->setVisible( FALSE); + childSetVisible("fastpay 5", 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); - getChildView("fastpay 10")->setVisible( FALSE); + childSetVisible("fastpay 10", 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); - getChildView("fastpay 20")->setVisible( FALSE); + childSetVisible("fastpay 20", FALSE); mQuickPayButton[i] = getChild<LLButton>("fastpay 20"); mQuickPayInfo[i] = info; ++i; - getChildView("amount text")->setVisible( FALSE); + childSetVisible("amount text", FALSE); std::string last_amount; if(sLastAmount > 0) @@ -197,19 +197,19 @@ BOOL LLFloaterPay::postBuild() last_amount = llformat("%d", sLastAmount); } - getChildView("amount")->setVisible( FALSE); + childSetVisible("amount", FALSE); getChild<LLLineEditor>("amount")->setKeystrokeCallback(&LLFloaterPay::onKeystroke, this); - getChild<LLUICtrl>("amount")->setValue(last_amount); - getChild<LLLineEditor>("amount")->setPrevalidate(LLTextValidate::validateNonNegativeS32); + childSetText("amount", last_amount); + childSetPrevalidate("amount", LLTextValidate::validateNonNegativeS32); info = new LLGiveMoneyInfo(this, 0); mCallbackData.push_back(info); childSetAction("pay btn",&LLFloaterPay::onGive,info); setDefaultBtn("pay btn"); - getChildView("pay btn")->setVisible( FALSE); - getChildView("pay btn")->setEnabled((sLastAmount > 0)); + childSetVisible("pay btn", FALSE); + childSetEnabled("pay btn", (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->getChildView("amount")->setVisible( FALSE); - self->getChildView("pay btn")->setVisible( FALSE); - self->getChildView("amount text")->setVisible( FALSE); + self->childSetVisible("amount", FALSE); + self->childSetVisible("pay btn", FALSE); + self->childSetVisible("amount text", FALSE); } else if (PAY_PRICE_DEFAULT == price) { - self->getChildView("amount")->setVisible( TRUE); - self->getChildView("pay btn")->setVisible( TRUE); - self->getChildView("amount text")->setVisible( TRUE); + self->childSetVisible("amount", TRUE); + self->childSetVisible("pay btn", TRUE); + self->childSetVisible("amount text", 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->getChildView("amount")->setVisible( TRUE); - self->getChildView("pay btn")->setVisible( TRUE); - self->getChildView("pay btn")->setEnabled(TRUE); - self->getChildView("amount text")->setVisible( TRUE); + self->childSetVisible("amount", TRUE); + self->childSetVisible("pay btn", TRUE); + self->childSetEnabled("pay btn", TRUE); + self->childSetVisible("amount text", TRUE); - self->getChild<LLUICtrl>("amount")->setValue(llformat("%d", llabs(price))); + self->childSetText("amount", 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->getChildView("fastpay text")->setVisible(TRUE); + self->childSetVisible("fastpay text",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->getChild<LLUICtrl>("object_name_text")->setValue(node->mName); + floater->childSetText("object_name_text",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->getChildView("amount")->setVisible( TRUE); - floater->getChildView("pay btn")->setVisible( TRUE); - floater->getChildView("amount text")->setVisible( TRUE); + floater->childSetVisible("amount", TRUE); + floater->childSetVisible("pay btn", TRUE); + floater->childSetVisible("amount text", TRUE); - floater->getChildView("fastpay text")->setVisible(TRUE); + floater->childSetVisible("fastpay text",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 - getChild<LLUICtrl>("amount")->setFocus( TRUE); + childSetFocus("amount", TRUE); LLLineEditor* amount = getChild<LLLineEditor>("amount"); amount->selectAll(); @@ -449,8 +449,8 @@ void LLFloaterPay::onCacheOwnerName(const LLUUID& owner_id, setTitle(getString("payee_resident")); } - getChild<LLUICtrl>("payee_name")->setTextArg("[FIRST]", firstname); - getChild<LLUICtrl>("payee_name")->setTextArg("[LAST]", lastname); + childSetTextArg("payee_name", "[FIRST]", firstname); + childSetTextArg("payee_name", "[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->getChild<LLUICtrl>("amount")->getValue().asString(); - self->getChildView("pay btn")->setEnabled(!amtstr.empty() && atoi(amtstr.c_str()) > 0); + std::string amtstr = self->childGetText("amount"); + self->childSetEnabled("pay btn", !amtstr.empty() && atoi(amtstr.c_str()) > 0); } } @@ -494,7 +494,7 @@ void LLFloaterPay::give(S32 amount) // text field. if(amount == 0) { - amount = atoi(getChild<LLUICtrl>("amount")->getValue().asString().c_str()); + amount = atoi(childGetText("amount").c_str()); } sLastAmount = amount; |