diff options
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 c1640e2609..ba7526ccd5 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); - getChildView("fastpay 1")->setVisible( FALSE); + childSetVisible("fastpay 1", FALSE); mQuickPayButton[i] = getChild<LLButton>("fastpay 1"); mQuickPayInfo[i] = info; @@ -168,7 +168,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; @@ -178,7 +178,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; @@ -188,14 +188,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) @@ -203,19 +203,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); @@ -249,27 +249,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); @@ -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->getChildView("fastpay text")->setVisible(TRUE); + self->childSetVisible("fastpay text",TRUE); if ( pay_button > max_pay_amount ) { @@ -399,7 +399,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); } @@ -415,11 +415,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); @@ -434,7 +434,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(); @@ -455,8 +455,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 @@ -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->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); } } @@ -500,7 +500,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; |