Changeset View
Changeset View
Standalone View
Standalone View
src/qt/sendcoinsdialog.cpp
Show First 20 Lines • Show All 331 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
formatted.append(recipientElement); | formatted.append(recipientElement); | ||||
} | } | ||||
QString questionString = tr("Are you sure you want to send?"); | QString questionString = tr("Are you sure you want to send?"); | ||||
questionString.append("<br /><span style='font-size:10pt;'>"); | questionString.append("<br /><span style='font-size:10pt;'>"); | ||||
questionString.append(tr("Please, review your transaction.")); | questionString.append(tr("Please, review your transaction.")); | ||||
questionString.append("</span>"); | questionString.append("</span>%1"); | ||||
if (txFee > Amount::zero()) { | if (txFee > Amount::zero()) { | ||||
// append fee string if a fee is required | // append fee string if a fee is required | ||||
questionString.append("<hr /><b>"); | questionString.append("<hr /><b>"); | ||||
questionString.append(tr("Transaction fee")); | questionString.append(tr("Transaction fee")); | ||||
questionString.append("</b>"); | questionString.append("</b>"); | ||||
// append transaction size | // append transaction size | ||||
Show All 26 Lines | questionString.append( | ||||
.arg(tr("Total Amount")) | .arg(tr("Total Amount")) | ||||
.arg(BitcoinUnits::formatHtmlWithUnit( | .arg(BitcoinUnits::formatHtmlWithUnit( | ||||
model->getOptionsModel()->getDisplayUnit(), totalAmount))); | model->getOptionsModel()->getDisplayUnit(), totalAmount))); | ||||
questionString.append( | questionString.append( | ||||
QString("<br /><span style='font-size:10pt; " | QString("<br /><span style='font-size:10pt; " | ||||
"font-weight:normal;'>(=%1)</span>") | "font-weight:normal;'>(=%1)</span>") | ||||
.arg(alternativeUnits.join(" " + tr("or") + " "))); | .arg(alternativeUnits.join(" " + tr("or") + " "))); | ||||
QString informative_text; | |||||
QString detailed_text; | |||||
if (formatted.size() > 1) { | |||||
questionString = questionString.arg(""); | |||||
informative_text = | |||||
tr("To review recipient list click \"Show Details...\""); | |||||
detailed_text = formatted.join("\n\n"); | |||||
} else { | |||||
questionString = questionString.arg("<br /><br />" + formatted.at(0)); | |||||
} | |||||
SendConfirmationDialog confirmationDialog( | SendConfirmationDialog confirmationDialog( | ||||
tr("Confirm send coins"), questionString, | tr("Confirm send coins"), questionString, informative_text, | ||||
"To review recipient list click \"Show Details...\"", | detailed_text, SEND_CONFIRM_DELAY, this); | ||||
formatted.join("\n\n"), SEND_CONFIRM_DELAY, this); | |||||
confirmationDialog.exec(); | confirmationDialog.exec(); | ||||
QMessageBox::StandardButton retval = | QMessageBox::StandardButton retval = | ||||
static_cast<QMessageBox::StandardButton>(confirmationDialog.result()); | static_cast<QMessageBox::StandardButton>(confirmationDialog.result()); | ||||
if (retval != QMessageBox::Yes) { | if (retval != QMessageBox::Yes) { | ||||
fNewRecipientAllowed = true; | fNewRecipientAllowed = true; | ||||
return; | return; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 560 Lines • Show Last 20 Lines |