diff options
author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2010-01-20 13:16:23 +0200 |
---|---|---|
committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2010-01-20 13:16:23 +0200 |
commit | 284279966be66323418d5aaaaf96d16d90a12c8a (patch) | |
tree | 3514545fed768d9e552630e957830cce0cdb662e /indra | |
parent | f53f65cc1a90673af0b7dde970c175ed9acd60fc (diff) |
Fixed normal bug EXT-4476 - Classfield appears in classfield accordeon after error message about money scarcity has been closed.
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanelclassified.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llpanelclassified.h | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 10 |
3 files changed, 25 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(); } diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h index 10fdf60bbe..e46806f576 100644 --- a/indra/newview/llpanelclassified.h +++ b/indra/newview/llpanelclassified.h @@ -340,6 +340,7 @@ protected: private: bool mIsNew; + bool mCanClose; }; #endif // LL_LLPANELCLASSIFIED_H diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 1ec004b194..e5933816ef 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -770,6 +770,16 @@ Save changes to classified [NAME]? notext="Don't Save" yestext="Save"/> </notification> + + <notification + icon="alertmodal.tga" + name="ClassifiedInsuffisientFunds" + type="alertmodal"> +Insuffisient funds to create classified. + <usetemplate + name="okbutton" + yestext="OK"/> + </notification> <notification icon="alertmodal.tga" |