SL-11867 Show “Unable to buy” message via notification

meow-7.2.2
maxim_productengine 2020-02-17 17:43:00 +02:00 committed by Mnikolenko Productengine
parent bac27a9d74
commit 7e2e2503c5
14 changed files with 43 additions and 103 deletions

View File

@ -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()
{

View File

@ -60,8 +60,7 @@ objektet.
</text>
<button label="Køb nu" name="buy_btn"/>
<button label="Annullér" name="cancel_btn"/>
<text name="info_cannot_buy">
<floater.string name="info_cannot_buy">
Kan ikke købe
</text>
<button label="Fortsæt til web" name="error_web"/>
</floater.string>
</floater>

View File

@ -59,8 +59,7 @@
</text>
<button label="Jetzt kaufen" name="buy_btn"/>
<button label="Abbrechen" name="cancel_btn"/>
<text name="info_cannot_buy">
<floater.string name="info_cannot_buy">
Kaufabbruch
</text>
<button label="Weiter zur Kontoseite" name="error_web"/>
</floater.string>
</floater>

View File

@ -13,6 +13,10 @@
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"
@ -286,42 +290,4 @@ 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>

View File

@ -1329,6 +1329,18 @@ There was a problem uploading a report screenshot due to the following reason: [
You must agree to the Second Life Terms and Conditions, Privacy Policy, and Terms of Service to continue logging into [SECOND_LIFE].
</notification>
<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"

View File

@ -60,8 +60,7 @@ no el objeto.
</text>
<button label="Comprar ahora" name="buy_btn"/>
<button label="Cancelar" name="cancel_btn"/>
<text name="info_cannot_buy" left="150" font="SansSerifBig">
<floater.string name="info_cannot_buy">
No se pudo hacer la compra
</text>
<button label="Ir a la web" name="error_web"/>
</floater.string>
</floater>

View File

@ -60,8 +60,7 @@ le Lindex...
</text>
<button label="Acheter" name="buy_btn"/>
<button label="Annuler" name="cancel_btn"/>
<text name="info_cannot_buy" left="160" width="200">
<floater.string name="info_cannot_buy" left="160" width="200">
Achat impossible
</text>
<button label="Accéder au Web" name="error_web"/>
</floater.string>
</floater>

View File

@ -60,8 +60,7 @@ l&apos;oggetto.
</text>
<button label="Acquista" name="buy_btn"/>
<button label="Annulla" name="cancel_btn"/>
<text name="info_cannot_buy" left="160" font="SansSerifBig">
<floater.string name="info_cannot_buy" left="160" font="SansSerifBig">
Non in grado di acquistare
</text>
<button label="Continua sul Web" name="error_web"/>
</floater.string>
</floater>

View File

@ -59,8 +59,7 @@
</text>
<button label="購入する" name="buy_btn"/>
<button label="取り消し" name="cancel_btn"/>
<text name="info_cannot_buy">
<floater.string name="info_cannot_buy">
購入できません
</text>
<button label="Web サイトに移動" name="error_web" width="140"/>
</floater.string>
</floater>

View File

@ -50,8 +50,7 @@
</text>
<button label="Kup teraz" name="buy_btn" />
<button label="Anuluj" name="cancel_btn" />
<text name="info_cannot_buy">
<floater.string name="info_cannot_buy">
Nie można kupić
</text>
<button label="Odwiedź stronę WWW" name="error_web" />
</floater.string>
</floater>

View File

@ -59,8 +59,7 @@
</text>
<button label="Comprar já!" name="buy_btn"/>
<button label="Fechar" name="cancel_btn"/>
<text name="info_cannot_buy" font="SansSerifBig">
<floater.string name="info_cannot_buy">
Transação incompleta
</text>
<button label="Prosseguir para a web" name="error_web"/>
</floater.string>
</floater>

View File

@ -59,8 +59,7 @@
</text>
<button label="Приобрести" name="buy_btn"/>
<button label="Отмена" name="cancel_btn"/>
<text name="info_cannot_buy">
<floater.string name="info_cannot_buy">
Нельзя купить
</text>
<button label="Продолжить в Интернете" name="error_web"/>
</floater.string>
</floater>

View File

@ -59,8 +59,7 @@
</text>
<button label="Şimdi Satın Al" name="buy_btn"/>
<button label="İptal" name="cancel_btn"/>
<text name="info_cannot_buy">
<floater.string name="info_cannot_buy">
Satın Alınamıyor
</text>
<button label="Web&apos;e devam et" name="error_web"/>
</floater.string>
</floater>

View File

@ -59,8 +59,7 @@
</text>
<button label="立即購買" name="buy_btn"/>
<button label="取消" name="cancel_btn"/>
<text name="info_cannot_buy">
<floater.string name="info_cannot_buy">
無法購買
</text>
<button label="繼續到網頁" name="error_web"/>
</floater.string>
</floater>