summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelclassified.cpp
diff options
context:
space:
mode:
authorCallum Prentice <callum@lindenlab.com>2010-02-04 17:03:41 -0800
committerCallum Prentice <callum@lindenlab.com>2010-02-04 17:03:41 -0800
commit259fa5fd0b67459145eb5463d79f37271ee7af0a (patch)
tree27c7eaddb0c6f7dd406228e3a61fc89b6fedb159 /indra/newview/llpanelclassified.cpp
parent80139d95adbcb2258c5541a4e0ace32f32b78ba5 (diff)
parenta4aed31ad9fd1874b134af87145ec93b283dbbfb (diff)
Merge with tip
Diffstat (limited to 'indra/newview/llpanelclassified.cpp')
-rw-r--r--indra/newview/llpanelclassified.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index e29320ffc2..3f5d80c123 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("ClassifiedInsufficientFunds");
+ return;
+ }
+ }
+ mCanClose = true;
sendUpdate();
resetDirty();
}