summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterpay.cpp5
-rw-r--r--indra/newview/llviewermessage.cpp18
-rw-r--r--indra/newview/skins/default/xui/en/floater_pay.xml24
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml3
4 files changed, 39 insertions, 11 deletions
diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp
index dfe462c8d1..87973c2286 100644
--- a/indra/newview/llfloaterpay.cpp
+++ b/indra/newview/llfloaterpay.cpp
@@ -284,7 +284,6 @@ void LLFloaterPay::processPayPriceReply(LLMessageSystem* msg, void **userdata)
self->mQuickPayButton[i]->setLabelUnselected(button_str);
self->mQuickPayButton[i]->setVisible(TRUE);
self->mQuickPayInfo[i]->mAmount = pay_button;
- self->getChildView("fastpay text")->setVisible(TRUE);
if ( pay_button > max_pay_amount )
{
@@ -412,7 +411,6 @@ void LLFloaterPay::payDirectly(money_callback callback,
floater->getChildView("pay btn")->setVisible(TRUE);
floater->getChildView("amount text")->setVisible(TRUE);
- floater->getChildView("fastpay text")->setVisible(TRUE);
for(S32 i=0;i<MAX_PAY_BUTTONS;++i)
{
floater->mQuickPayButton[i]->setVisible(TRUE);
@@ -594,7 +592,8 @@ void LLFloaterPay::give(S32 amount)
else
{
// just transfer the L$
- mCallback(mTargetUUID, gAgent.getRegion(), amount, mTargetIsGroup, TRANS_GIFT, LLStringUtil::null);
+ std::string paymentMessage(getChild<LLLineEditor>("payment_message")->getValue().asString());
+ mCallback(mTargetUUID, gAgent.getRegion(), amount, mTargetIsGroup, TRANS_GIFT, (paymentMessage.empty() ? LLStringUtil::null : paymentMessage));
// check if the payee needs to be unmuted
LLMuteList::getInstance()->autoRemove(mTargetUUID, LLMuteList::AR_MONEY);
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 3925154c0f..1a220a07b9 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -5467,9 +5467,12 @@ static std::string reason_from_transaction_type(S32 transaction_type,
case TRANS_CLASSIFIED_CHARGE:
return LLTrans::getString("to publish a classified ad");
+ case TRANS_GIFT:
+ // Simulator returns "Payment" if no custom description has been entered
+ return (item_desc == "Payment" ? std::string() : item_desc);
+
// These have no reason to display, but are expected and should not
// generate warnings
- case TRANS_GIFT:
case TRANS_PAY_OBJECT:
case TRANS_OBJECT_PAYS:
return std::string();
@@ -5579,6 +5582,7 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
LLSD payload;
bool you_paid_someone = (source_id == gAgentID);
+ std::string gift_suffix = (transaction_type == TRANS_GIFT ? "_gift" : "");
if (you_paid_someone)
{
if(!gSavedSettings.getBOOL("NotifyMoneySpend"))
@@ -5592,8 +5596,8 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
{
if (dest_id.notNull())
{
- message = success ? LLTrans::getString("you_paid_ldollars", args) :
- LLTrans::getString("you_paid_failure_ldollars", args);
+ message = success ? LLTrans::getString("you_paid_ldollars" + gift_suffix, args) :
+ LLTrans::getString("you_paid_failure_ldollars" + gift_suffix, args);
}
else
{
@@ -5620,7 +5624,8 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
payload["dest_id"] = dest_id;
notification = success ? "PaymentSent" : "PaymentFailure";
}
- else {
+ else
+ {
// ...someone paid you
if(!gSavedSettings.getBOOL("NotifyMoneyReceived"))
{
@@ -5631,9 +5636,10 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
name_id = source_id;
if (!reason.empty())
{
- message = LLTrans::getString("paid_you_ldollars", args);
+ message = LLTrans::getString("paid_you_ldollars" + gift_suffix, args);
}
- else {
+ else
+ {
message = LLTrans::getString("paid_you_ldollars_no_reason", args);
}
final_args["MESSAGE"] = message;
diff --git a/indra/newview/skins/default/xui/en/floater_pay.xml b/indra/newview/skins/default/xui/en/floater_pay.xml
index 9d91f801a6..3e3f8b49ce 100644
--- a/indra/newview/skins/default/xui/en/floater_pay.xml
+++ b/indra/newview/skins/default/xui/en/floater_pay.xml
@@ -2,7 +2,7 @@
<floater
legacy_header_height="18"
can_minimize="false"
- height="186"
+ height="208"
layout="topleft"
name="Give Money"
help_topic="give_money"
@@ -43,6 +43,26 @@
width="180">
Test Name That Is Extremely Long To Check Clipping
</text>
+ <text
+ type="string"
+ follows="top|left"
+ height="18"
+ left="10"
+ name="payment_message_label"
+ top_pad="6"
+ width="120">
+ Description (optional):
+ </text>
+ <line_editor
+ border_style="line"
+ follows="left|top|right"
+ height="19"
+ top_delta="-2"
+ layout="topleft"
+ max_length_bytes="127"
+ name="payment_message"
+ right="-11"
+ width="109" />
<panel
border_thickness="0"
height="104"
@@ -125,7 +145,7 @@
top_pad="0"
max_length_bytes="9"
name="amount"
- width="90" />
+ right="-1" />
<button
enabled="false"
height="23"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 1eb186dfeb..a0a92c5293 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3694,12 +3694,15 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<!-- Financial operations strings -->
<string name="paid_you_ldollars">[NAME] paid you L$[AMOUNT] [REASON].</string>
+ <string name="paid_you_ldollars_gift">[NAME] paid you L$[AMOUNT]: [REASON]</string>
<string name="paid_you_ldollars_no_reason">[NAME] paid you L$[AMOUNT].</string>
<string name="you_paid_ldollars">You paid [NAME] L$[AMOUNT] [REASON].</string>
+ <string name="you_paid_ldollars_gift">You paid [NAME] L$[AMOUNT]: [REASON]</string>
<string name="you_paid_ldollars_no_info">You paid L$[AMOUNT].</string>
<string name="you_paid_ldollars_no_reason">You paid [NAME] L$[AMOUNT].</string>
<string name="you_paid_ldollars_no_name">You paid L$[AMOUNT] [REASON].</string>
<string name="you_paid_failure_ldollars">You failed to pay [NAME] L$[AMOUNT] [REASON].</string>
+ <string name="you_paid_failure_ldollars_gift">You failed to pay [NAME] L$[AMOUNT]: [REASON]</string>
<string name="you_paid_failure_ldollars_no_info">You failed to pay L$[AMOUNT].</string>
<string name="you_paid_failure_ldollars_no_reason">You failed to pay [NAME] L$[AMOUNT].</string>
<string name="you_paid_failure_ldollars_no_name">You failed to pay L$[AMOUNT] [REASON].</string>