diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2020-09-23 12:29:54 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2020-09-23 12:29:54 +0300 |
commit | d435e2ee26c7a71ee180ebff66bc793b0566e1a2 (patch) | |
tree | 2315e8a4205bee0713500371bad06154a5f6e603 /indra/newview | |
parent | fc7b5186944412d3f2125923aebf921730a79d20 (diff) |
Revert "SL-11867 Show “Unable to buy” message via notification"
This reverts commit 7e2e2503c5fb57736844bdad0f309d2d49ee86b2.
Diffstat (limited to 'indra/newview')
14 files changed, 103 insertions, 43 deletions
diff --git a/indra/newview/llfloaterbuycurrency.cpp b/indra/newview/llfloaterbuycurrency.cpp index 25348474a1..91436e52fe 100644 --- a/indra/newview/llfloaterbuycurrency.cpp +++ b/indra/newview/llfloaterbuycurrency.cpp @@ -74,6 +74,7 @@ public: void onClickBuy(); void onClickCancel(); + void onClickErrorWeb(); }; LLFloater* LLFloaterBuyCurrency::buildFloater(const LLSD& key) @@ -131,6 +132,7 @@ 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(); @@ -171,6 +173,7 @@ 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); @@ -180,16 +183,32 @@ void LLFloaterBuyCurrencyUI::updateUI() if (hasError) { // display an error from the server - LLSD args; - args["TITLE"] = getString("info_cannot_buy"); - args["MESSAGE"] = mManager.errorMessage(); - LLNotificationsUtil::add("CouldNotBuyCurrency", args); - closeFloater(); + 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()); } 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) { @@ -259,6 +278,14 @@ void LLFloaterBuyCurrencyUI::onClickCancel() LLStatusBar::sendMoneyBalanceRequest(); } +void LLFloaterBuyCurrencyUI::onClickErrorWeb() +{ + LLWeb::loadURL(mManager.errorURI()); + closeFloater(); + // Update L$ balance + LLStatusBar::sendMoneyBalanceRequest(); +} + // static void LLFloaterBuyCurrency::buyCurrency() { diff --git a/indra/newview/skins/default/xui/da/floater_buy_currency.xml b/indra/newview/skins/default/xui/da/floater_buy_currency.xml index b7ac181dd4..3c0428b2b0 100644 --- a/indra/newview/skins/default/xui/da/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/da/floater_buy_currency.xml @@ -60,7 +60,8 @@ objektet. </text> <button label="Køb nu" name="buy_btn"/> <button label="Annullér" name="cancel_btn"/> - <floater.string name="info_cannot_buy"> + <text name="info_cannot_buy"> Kan ikke købe - </floater.string> + </text> + <button label="Fortsæt til web" name="error_web"/> </floater> diff --git a/indra/newview/skins/default/xui/de/floater_buy_currency.xml b/indra/newview/skins/default/xui/de/floater_buy_currency.xml index eb94df1cad..65926c088c 100644 --- a/indra/newview/skins/default/xui/de/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/de/floater_buy_currency.xml @@ -59,7 +59,8 @@ </text> <button label="Jetzt kaufen" name="buy_btn"/> <button label="Abbrechen" name="cancel_btn"/> - <floater.string name="info_cannot_buy"> + <text name="info_cannot_buy"> Kaufabbruch - </floater.string> + </text> + <button label="Weiter zur Kontoseite" name="error_web"/> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency.xml b/indra/newview/skins/default/xui/en/floater_buy_currency.xml index 061af1b67c..553c5d51d0 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_currency.xml @@ -13,10 +13,6 @@ name="buy_currency"> Buy L$ [LINDENS] for approx. [LOCALAMOUNT] </floater.string> - <floater.string - name="info_cannot_buy"> - Unable to Buy - </floater.string> <icon height="215" image_name="Linden_Dollar_Background" @@ -290,4 +286,42 @@ Re-enter amount to see the latest exchange rate. left_pad="10" name="cancel_btn" width="90"/> + <icon + height="215" + image_name="Linden_Dollar_Alert" + layout="topleft" + left="0" + name="error_background" + top="15" + use_draw_context_alpha="false" + width="350"/> + <text + type="string" + font="SansSerifHuge" + left="165" + width="360" + height="25" + top="25" + name="info_cannot_buy"> + Unable to Buy + </text> + <text + type="string" + width="176" + height="125" + top="60" + left="165" + word_wrap="true" + follows="bottom|right" + name="cannot_buy_message"> + </text> + <button + follows="bottom|left" + height="20" + label="Continue to the Web" + layout="topleft" + left="170" + name="error_web" + top="200" + width="160"/> </floater> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 3228603f45..d141cfc313 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -1331,18 +1331,6 @@ You must agree to the Second Life Terms and Conditions, Privacy Policy, and Term <notification icon="alertmodal.tga" - name="CouldNotBuyCurrency" - type="alertmodal"> -[TITLE] -[MESSAGE] - <tag>fail</tag> - <usetemplate - name="okbutton" - yestext="OK"/> - </notification> - - <notification - icon="alertmodal.tga" name="CouldNotPutOnOutfit" type="alertmodal"> Could not put on outfit. diff --git a/indra/newview/skins/default/xui/es/floater_buy_currency.xml b/indra/newview/skins/default/xui/es/floater_buy_currency.xml index 086150dd57..dbff3fcf0e 100644 --- a/indra/newview/skins/default/xui/es/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/es/floater_buy_currency.xml @@ -60,7 +60,8 @@ no el objeto. </text> <button label="Comprar ahora" name="buy_btn"/> <button label="Cancelar" name="cancel_btn"/> - <floater.string name="info_cannot_buy"> + <text name="info_cannot_buy" left="150" font="SansSerifBig"> No se pudo hacer la compra - </floater.string> + </text> + <button label="Ir a la web" name="error_web"/> </floater> diff --git a/indra/newview/skins/default/xui/fr/floater_buy_currency.xml b/indra/newview/skins/default/xui/fr/floater_buy_currency.xml index 55b0d1825a..c295172abf 100644 --- a/indra/newview/skins/default/xui/fr/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/fr/floater_buy_currency.xml @@ -60,7 +60,8 @@ le Lindex... </text> <button label="Acheter" name="buy_btn"/> <button label="Annuler" name="cancel_btn"/> - <floater.string name="info_cannot_buy" left="160" width="200"> + <text name="info_cannot_buy" left="160" width="200"> Achat impossible - </floater.string> + </text> + <button label="Accéder au Web" name="error_web"/> </floater> diff --git a/indra/newview/skins/default/xui/it/floater_buy_currency.xml b/indra/newview/skins/default/xui/it/floater_buy_currency.xml index 522d26373e..53a2057455 100644 --- a/indra/newview/skins/default/xui/it/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/it/floater_buy_currency.xml @@ -60,7 +60,8 @@ l'oggetto. </text> <button label="Acquista" name="buy_btn"/> <button label="Annulla" name="cancel_btn"/> - <floater.string name="info_cannot_buy" left="160" font="SansSerifBig"> + <text name="info_cannot_buy" left="160" font="SansSerifBig"> Non in grado di acquistare - </floater.string> + </text> + <button label="Continua sul Web" name="error_web"/> </floater> diff --git a/indra/newview/skins/default/xui/ja/floater_buy_currency.xml b/indra/newview/skins/default/xui/ja/floater_buy_currency.xml index ac2db917cc..a472f163e3 100644 --- a/indra/newview/skins/default/xui/ja/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/ja/floater_buy_currency.xml @@ -59,7 +59,8 @@ </text> <button label="購入する" name="buy_btn"/> <button label="取り消し" name="cancel_btn"/> - <floater.string name="info_cannot_buy"> + <text name="info_cannot_buy"> 購入できません - </floater.string> + </text> + <button label="Web サイトに移動" name="error_web" width="140"/> </floater> diff --git a/indra/newview/skins/default/xui/pl/floater_buy_currency.xml b/indra/newview/skins/default/xui/pl/floater_buy_currency.xml index a1d703a15a..72167e0d3c 100644 --- a/indra/newview/skins/default/xui/pl/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/pl/floater_buy_currency.xml @@ -50,7 +50,8 @@ </text> <button label="Kup teraz" name="buy_btn" /> <button label="Anuluj" name="cancel_btn" /> - <floater.string name="info_cannot_buy"> + <text name="info_cannot_buy"> Nie można kupić - </floater.string> + </text> + <button label="Odwiedź stronę WWW" name="error_web" /> </floater> diff --git a/indra/newview/skins/default/xui/pt/floater_buy_currency.xml b/indra/newview/skins/default/xui/pt/floater_buy_currency.xml index c740b90472..513400954b 100644 --- a/indra/newview/skins/default/xui/pt/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/pt/floater_buy_currency.xml @@ -59,7 +59,8 @@ </text> <button label="Comprar já!" name="buy_btn"/> <button label="Fechar" name="cancel_btn"/> - <floater.string name="info_cannot_buy"> + <text name="info_cannot_buy" font="SansSerifBig"> Transação incompleta - </floater.string> + </text> + <button label="Prosseguir para a web" name="error_web"/> </floater> diff --git a/indra/newview/skins/default/xui/ru/floater_buy_currency.xml b/indra/newview/skins/default/xui/ru/floater_buy_currency.xml index ef55ce58d4..87e8bd524e 100644 --- a/indra/newview/skins/default/xui/ru/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/ru/floater_buy_currency.xml @@ -59,7 +59,8 @@ </text> <button label="Приобрести" name="buy_btn"/> <button label="Отмена" name="cancel_btn"/> - <floater.string name="info_cannot_buy"> + <text name="info_cannot_buy"> Нельзя купить - </floater.string> + </text> + <button label="Продолжить в Интернете" name="error_web"/> </floater> diff --git a/indra/newview/skins/default/xui/tr/floater_buy_currency.xml b/indra/newview/skins/default/xui/tr/floater_buy_currency.xml index 33c4b2287f..d90985dcff 100644 --- a/indra/newview/skins/default/xui/tr/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/tr/floater_buy_currency.xml @@ -59,7 +59,8 @@ </text> <button label="Şimdi Satın Al" name="buy_btn"/> <button label="İptal" name="cancel_btn"/> - <floater.string name="info_cannot_buy"> + <text name="info_cannot_buy"> Satın Alınamıyor - </floater.string> + </text> + <button label="Web'e devam et" name="error_web"/> </floater> diff --git a/indra/newview/skins/default/xui/zh/floater_buy_currency.xml b/indra/newview/skins/default/xui/zh/floater_buy_currency.xml index 41c8c26ccc..fcf2800728 100644 --- a/indra/newview/skins/default/xui/zh/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/zh/floater_buy_currency.xml @@ -59,7 +59,8 @@ </text> <button label="立即購買" name="buy_btn"/> <button label="取消" name="cancel_btn"/> - <floater.string name="info_cannot_buy"> + <text name="info_cannot_buy"> 無法購買 - </floater.string> + </text> + <button label="繼續到網頁" name="error_web"/> </floater> |