Skip to content

Commit 2ee756f

Browse files
committed
Show recipient list as detailedText of QMessageBox
1 parent 654e419 commit 2ee756f

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

src/qt/sendcoinsdialog.cpp

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -279,26 +279,24 @@ void SendCoinsDialog::on_sendButton_clicked()
279279
QStringList formatted;
280280
for (const SendCoinsRecipient &rcp : currentTransaction.getRecipients())
281281
{
282-
// generate bold amount string with wallet name in case of multiwallet
283-
QString amount = "<b>" + BitcoinUnits::formatHtmlWithUnit(model->getOptionsModel()->getDisplayUnit(), rcp.amount);
282+
// generate amount string with wallet name in case of multiwallet
283+
QString amount = BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), rcp.amount);
284284
if (model->isMultiwallet()) {
285-
amount.append(" <u>"+tr("from wallet %1").arg(GUIUtil::HtmlEscape(model->getWalletName()))+"</u> ");
285+
amount.append(tr(" from wallet '%1'").arg(model->getWalletName()));
286286
}
287-
amount.append("</b>");
288-
// generate monospace address string
289-
QString address = "<span style='font-family: monospace;'>" + rcp.address;
290-
address.append("</span>");
287+
288+
// generate address string
289+
QString address = rcp.address;
291290

292291
QString recipientElement;
293-
recipientElement = "<br />";
294292

295293
#ifdef ENABLE_BIP70
296294
if (!rcp.paymentRequest.IsInitialized()) // normal payment
297295
#endif
298296
{
299297
if(rcp.label.length() > 0) // label with address
300298
{
301-
recipientElement.append(tr("%1 to %2").arg(amount, GUIUtil::HtmlEscape(rcp.label)));
299+
recipientElement.append(tr("%1 to '%2'").arg(amount, rcp.label));
302300
recipientElement.append(QString(" (%1)").arg(address));
303301
}
304302
else // just address
@@ -309,7 +307,7 @@ void SendCoinsDialog::on_sendButton_clicked()
309307
#ifdef ENABLE_BIP70
310308
else if(!rcp.authenticatedMerchant.isEmpty()) // authenticated payment request
311309
{
312-
recipientElement.append(tr("%1 to %2").arg(amount, GUIUtil::HtmlEscape(rcp.authenticatedMerchant)));
310+
recipientElement.append(tr("%1 to '%2'").arg(amount, rcp.authenticatedMerchant));
313311
}
314312
else // unauthenticated payment request
315313
{
@@ -323,7 +321,7 @@ void SendCoinsDialog::on_sendButton_clicked()
323321
QString questionString = tr("Are you sure you want to send?");
324322
questionString.append("<br /><span style='font-size:10pt;'>");
325323
questionString.append(tr("Please, review your transaction."));
326-
questionString.append("</span><br />%1");
324+
questionString.append("</span>");
327325

328326
if(txFee > 0)
329327
{
@@ -364,7 +362,7 @@ void SendCoinsDialog::on_sendButton_clicked()
364362
questionString.append(QString("<br /><span style='font-size:10pt; font-weight:normal;'>(=%1)</span>")
365363
.arg(alternativeUnits.join(" " + tr("or") + " ")));
366364

367-
SendConfirmationDialog confirmationDialog(tr("Confirm send coins"), questionString.arg(formatted.join("<br />")), "", "", SEND_CONFIRM_DELAY, this);
365+
SendConfirmationDialog confirmationDialog(tr("Confirm send coins"), questionString, "To review recipient list click \"Show Details...\"", formatted.join("\n\n"), SEND_CONFIRM_DELAY, this);
368366
confirmationDialog.exec();
369367
QMessageBox::StandardButton retval = static_cast<QMessageBox::StandardButton>(confirmationDialog.result());
370368

0 commit comments

Comments
 (0)