@@ -279,26 +279,24 @@ void SendCoinsDialog::on_sendButton_clicked()
279
279
QStringList formatted;
280
280
for (const SendCoinsRecipient &rcp : currentTransaction.getRecipients ())
281
281
{
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 );
284
284
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 ()));
286
286
}
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 ;
291
290
292
291
QString recipientElement;
293
- recipientElement = " <br />" ;
294
292
295
293
#ifdef ENABLE_BIP70
296
294
if (!rcp.paymentRequest .IsInitialized ()) // normal payment
297
295
#endif
298
296
{
299
297
if (rcp.label .length () > 0 ) // label with address
300
298
{
301
- recipientElement.append (tr (" %1 to %2 " ).arg (amount, GUIUtil::HtmlEscape ( rcp.label ) ));
299
+ recipientElement.append (tr (" %1 to '%2' " ).arg (amount, rcp.label ));
302
300
recipientElement.append (QString (" (%1)" ).arg (address));
303
301
}
304
302
else // just address
@@ -309,7 +307,7 @@ void SendCoinsDialog::on_sendButton_clicked()
309
307
#ifdef ENABLE_BIP70
310
308
else if (!rcp.authenticatedMerchant .isEmpty ()) // authenticated payment request
311
309
{
312
- recipientElement.append (tr (" %1 to %2 " ).arg (amount, GUIUtil::HtmlEscape ( rcp.authenticatedMerchant ) ));
310
+ recipientElement.append (tr (" %1 to '%2' " ).arg (amount, rcp.authenticatedMerchant ));
313
311
}
314
312
else // unauthenticated payment request
315
313
{
@@ -323,7 +321,7 @@ void SendCoinsDialog::on_sendButton_clicked()
323
321
QString questionString = tr (" Are you sure you want to send?" );
324
322
questionString.append (" <br /><span style='font-size:10pt;'>" );
325
323
questionString.append (tr (" Please, review your transaction." ));
326
- questionString.append (" </span><br /> %1" );
324
+ questionString.append (" </span>%1" );
327
325
328
326
if (txFee > 0 )
329
327
{
@@ -364,8 +362,17 @@ void SendCoinsDialog::on_sendButton_clicked()
364
362
questionString.append (QString (" <br /><span style='font-size:10pt; font-weight:normal;'>(=%1)</span>" )
365
363
.arg (alternativeUnits.join (" " + tr (" or" ) + " " )));
366
364
367
- SendConfirmationDialog confirmationDialog (tr (" Confirm send coins" ),
368
- questionString.arg (formatted.join (" <br />" )), SEND_CONFIRM_DELAY, this );
365
+ QString informative_text;
366
+ QString detailed_text;
367
+ if (formatted.size () > 1 ) {
368
+ questionString = questionString.arg (" " );
369
+ informative_text = tr (" To review recipient list click \" Show Details...\" " );
370
+ detailed_text = formatted.join (" \n\n " );
371
+ } else {
372
+ questionString = questionString.arg (" <br /><br />" + formatted.at (0 ));
373
+ }
374
+
375
+ SendConfirmationDialog confirmationDialog (tr (" Confirm send coins" ), questionString, informative_text, detailed_text, SEND_CONFIRM_DELAY, this );
369
376
confirmationDialog.exec ();
370
377
QMessageBox::StandardButton retval = static_cast <QMessageBox::StandardButton>(confirmationDialog.result ());
371
378
@@ -881,10 +888,15 @@ void SendCoinsDialog::coinControlUpdateLabels()
881
888
}
882
889
}
883
890
884
- SendConfirmationDialog::SendConfirmationDialog (const QString &title, const QString &text, int _secDelay,
885
- QWidget *parent) :
886
- QMessageBox(QMessageBox::Question, title, text, QMessageBox::Yes | QMessageBox::Cancel, parent), secDelay(_secDelay)
891
+ SendConfirmationDialog::SendConfirmationDialog (const QString& title, const QString& text, const QString& informative_text, const QString& detailed_text, int _secDelay, QWidget* parent)
892
+ : QMessageBox(parent), secDelay(_secDelay)
887
893
{
894
+ setIcon (QMessageBox::Question);
895
+ setWindowTitle (title); // On macOS, the window title is ignored (as required by the macOS Guidelines).
896
+ setText (text);
897
+ setInformativeText (informative_text);
898
+ setDetailedText (detailed_text);
899
+ setStandardButtons (QMessageBox::Yes | QMessageBox::Cancel);
888
900
setDefaultButton (QMessageBox::Cancel);
889
901
yesButton = button (QMessageBox::Yes);
890
902
updateYesButton ();
0 commit comments