diff options
author | Jacek Antonelli | 2008-08-15 23:44:56 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:56 -0500 |
commit | c07901e29ed545bbb02e3bddf148fe1104b94e9f (patch) | |
tree | f1ada64ce834acd7d92a425efb96c4b86bcf16b1 /linden/indra/newview/llgivemoney.cpp | |
parent | Second Life viewer sources 1.15.0.2 (diff) | |
download | meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.zip meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.gz meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.bz2 meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.xz |
Second Life viewer sources 1.15.1.3
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llgivemoney.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/linden/indra/newview/llgivemoney.cpp b/linden/indra/newview/llgivemoney.cpp index 3722682..e89ab3d 100644 --- a/linden/indra/newview/llgivemoney.cpp +++ b/linden/indra/newview/llgivemoney.cpp | |||
@@ -155,7 +155,7 @@ LLFloaterPay::LLFloaterPay(const std::string& name, | |||
155 | 155 | ||
156 | childSetKeystrokeCallback("amount", &LLFloaterPay::onKeystroke, this); | 156 | childSetKeystrokeCallback("amount", &LLFloaterPay::onKeystroke, this); |
157 | childSetText("amount", last_amount); | 157 | childSetText("amount", last_amount); |
158 | childSetPrevalidate("amount", LLLineEditor::prevalidatePositiveS32); | 158 | childSetPrevalidate("amount", LLLineEditor::prevalidateNonNegativeS32); |
159 | 159 | ||
160 | info = new LLGiveMoneyInfo(this, 0); | 160 | info = new LLGiveMoneyInfo(this, 0); |
161 | mCallbackData.push_back(info); | 161 | mCallbackData.push_back(info); |
@@ -422,14 +422,9 @@ void LLFloaterPay::onKeystroke(LLLineEditor*, void* data) | |||
422 | LLFloaterPay* self = reinterpret_cast<LLFloaterPay*>(data); | 422 | LLFloaterPay* self = reinterpret_cast<LLFloaterPay*>(data); |
423 | if(self) | 423 | if(self) |
424 | { | 424 | { |
425 | if (!self->childGetText("amount").empty()) | 425 | // enable the Pay button when amount is non-empty and positive, disable otherwise |
426 | { | 426 | LLString amtstr = self->childGetText("amount"); |
427 | self->childSetEnabled("pay btn", TRUE); | 427 | self->childSetEnabled("pay btn", !amtstr.empty() && atoi(amtstr.c_str()) > 0); |
428 | } | ||
429 | else | ||
430 | { | ||
431 | self->childSetEnabled("pay btn", FALSE); | ||
432 | } | ||
433 | } | 428 | } |
434 | } | 429 | } |
435 | 430 | ||