summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterbuycurrency.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2020-09-28 22:29:19 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2020-09-28 22:29:19 +0300
commit1d458de94934d0d56cef15596d414f155db166a0 (patch)
tree8c835b12674ca0dab4214496974848c27babd139 /indra/newview/llfloaterbuycurrency.cpp
parente9d50aeb3d1fa6b6251296f792d75cbc480f68fb (diff)
parentbac6652cdcd2d8333df04c3ebd3a6a7b752328b3 (diff)
Merge branch 'master' into DRTVWR-515-maint
# Conflicts: # indra/newview/llpanelprimmediacontrols.cpp
Diffstat (limited to 'indra/newview/llfloaterbuycurrency.cpp')
-rw-r--r--indra/newview/llfloaterbuycurrency.cpp37
1 files changed, 5 insertions, 32 deletions
diff --git a/indra/newview/llfloaterbuycurrency.cpp b/indra/newview/llfloaterbuycurrency.cpp
index 91436e52fe..25348474a1 100644
--- a/indra/newview/llfloaterbuycurrency.cpp
+++ b/indra/newview/llfloaterbuycurrency.cpp
@@ -74,7 +74,6 @@ public:
void onClickBuy();
void onClickCancel();
- void onClickErrorWeb();
};
LLFloater* LLFloaterBuyCurrency::buildFloater(const LLSD& key)
@@ -132,7 +131,6 @@ BOOL LLFloaterBuyCurrencyUI::postBuild()
getChild<LLUICtrl>("buy_btn")->setCommitCallback( boost::bind(&LLFloaterBuyCurrencyUI::onClickBuy, this));
getChild<LLUICtrl>("cancel_btn")->setCommitCallback( boost::bind(&LLFloaterBuyCurrencyUI::onClickCancel, this));
- getChild<LLUICtrl>("error_web")->setCommitCallback( boost::bind(&LLFloaterBuyCurrencyUI::onClickErrorWeb, this));
center();
@@ -173,7 +171,6 @@ void LLFloaterBuyCurrencyUI::updateUI()
// hide most widgets - we'll turn them on as needed next
getChildView("info_buying")->setVisible(FALSE);
- getChildView("info_cannot_buy")->setVisible(FALSE);
getChildView("info_need_more")->setVisible(FALSE);
getChildView("purchase_warning_repurchase")->setVisible(FALSE);
getChildView("purchase_warning_notenough")->setVisible(FALSE);
@@ -183,32 +180,16 @@ void LLFloaterBuyCurrencyUI::updateUI()
if (hasError)
{
// display an error from the server
- getChildView("normal_background")->setVisible(FALSE);
- getChildView("error_background")->setVisible(TRUE);
- getChildView("info_cannot_buy")->setVisible(TRUE);
- getChildView("cannot_buy_message")->setVisible(TRUE);
- getChildView("balance_label")->setVisible(FALSE);
- getChildView("balance_amount")->setVisible(FALSE);
- getChildView("buying_label")->setVisible(FALSE);
- getChildView("buying_amount")->setVisible(FALSE);
- getChildView("total_label")->setVisible(FALSE);
- getChildView("total_amount")->setVisible(FALSE);
-
- LLTextBox* message = getChild<LLTextBox>("cannot_buy_message");
- if (message)
- {
- message->setText(mManager.errorMessage());
- }
-
- getChildView("error_web")->setVisible( !mManager.errorURI().empty());
+ LLSD args;
+ args["TITLE"] = getString("info_cannot_buy");
+ args["MESSAGE"] = mManager.errorMessage();
+ LLNotificationsUtil::add("CouldNotBuyCurrency", args);
+ closeFloater();
}
else
{
// display the main Buy L$ interface
getChildView("normal_background")->setVisible(TRUE);
- getChildView("error_background")->setVisible(FALSE);
- getChildView("cannot_buy_message")->setVisible(FALSE);
- getChildView("error_web")->setVisible(FALSE);
if (mHasTarget)
{
@@ -278,14 +259,6 @@ void LLFloaterBuyCurrencyUI::onClickCancel()
LLStatusBar::sendMoneyBalanceRequest();
}
-void LLFloaterBuyCurrencyUI::onClickErrorWeb()
-{
- LLWeb::loadURL(mManager.errorURI());
- closeFloater();
- // Update L$ balance
- LLStatusBar::sendMoneyBalanceRequest();
-}
-
// static
void LLFloaterBuyCurrency::buyCurrency()
{