diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-20 10:13:24 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-20 10:13:24 -0800 |
commit | f38fa6a7357a91fcede3713cfce4971f0b0d5dfa (patch) | |
tree | 07ccb7b989cce22cfae95841802fc74d0749c040 /indra/newview/llpanelclassified.cpp | |
parent | f009fbcb03e7d4e87d41f60e2873ffcbcb02354b (diff) | |
parent | 8758fac7124ff07f2a003bf5719c19a4dab170b9 (diff) |
PE merge.
Diffstat (limited to 'indra/newview/llpanelclassified.cpp')
-rw-r--r-- | indra/newview/llpanelclassified.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index e29320ffc2..01b3f3bb7f 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -72,6 +72,7 @@ #include "llviewerwindow.h" // for window width, height #include "llappviewer.h" // abortQuit() #include "lltrans.h" +#include "llstatusbar.h" const S32 MINIMUM_PRICE_FOR_LISTING = 50; // L$ const S32 MATURE_UNDEFINED = -1; @@ -1364,6 +1365,7 @@ static const S32 CB_ITEM_PG = 1; LLPanelClassifiedEdit::LLPanelClassifiedEdit() : LLPanelClassifiedInfo() , mIsNew(false) + , mCanClose(false) { } @@ -1559,7 +1561,7 @@ void LLPanelClassifiedEdit::resetControls() bool LLPanelClassifiedEdit::canClose() { - return isValidName(); + return mCanClose; } void LLPanelClassifiedEdit::sendUpdate() @@ -1676,12 +1678,23 @@ void LLPanelClassifiedEdit::onChange() void LLPanelClassifiedEdit::onSaveClick() { + mCanClose = false; + if(!isValidName()) { notifyInvalidName(); return; } + if(isNew()) + { + if(gStatusBar->getBalance() < getPriceForListing()) + { + LLNotificationsUtil::add("ClassifiedInsuffisientFunds"); + return; + } + } + mCanClose = true; sendUpdate(); resetDirty(); } |