aboutsummaryrefslogtreecommitdiff
path: root/src/qt/sendcoinsdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/sendcoinsdialog.cpp')
-rw-r--r--src/qt/sendcoinsdialog.cpp41
1 files changed, 22 insertions, 19 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index faddfcd4d0..ef36aab1a4 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2016 The Bitcoin Core developers
+// Copyright (c) 2011-2017 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -181,7 +181,7 @@ void SendCoinsDialog::setModel(WalletModel *_model)
updateSmartFeeLabel();
// set default rbf checkbox state
- ui->optInRBF->setCheckState(model->getDefaultWalletRbf() ? Qt::Checked : Qt::Unchecked);
+ ui->optInRBF->setCheckState(Qt::Checked);
// set the smartfee-sliders default value (wallets default conf.target or last stored value)
QSettings settings;
@@ -256,7 +256,7 @@ void SendCoinsDialog::on_sendButton_clicked()
// Always use a CCoinControl instance, use the CoinControlDialog instance if CoinControl has been enabled
CCoinControl ctrl;
if (model->getOptionsModel()->getCoinControlFeatures())
- ctrl = *CoinControlDialog::coinControl;
+ ctrl = *CoinControlDialog::coinControl();
updateCoinControlState(ctrl);
@@ -336,20 +336,22 @@ void SendCoinsDialog::on_sendButton_clicked()
}
questionString.append(tr("Total Amount %1")
.arg(BitcoinUnits::formatHtmlWithUnit(model->getOptionsModel()->getDisplayUnit(), totalAmount)));
- questionString.append(QString("<span style='font-size:10pt;font-weight:normal;'><br />(=%2)</span>")
+ questionString.append(QString("<span style='font-size:10pt;font-weight:normal;'><br />(=%1)</span>")
.arg(alternativeUnits.join(" " + tr("or") + "<br />")));
- if (ui->optInRBF->isChecked())
- {
- questionString.append("<hr /><span>");
- questionString.append(tr("You can increase the fee later (signals Replace-By-Fee)."));
- questionString.append("</span>");
+ questionString.append("<hr /><span>");
+ if (ui->optInRBF->isChecked()) {
+ questionString.append(tr("You can increase the fee later (signals Replace-By-Fee, BIP-125)."));
+ } else {
+ questionString.append(tr("Not signalling Replace-By-Fee, BIP-125."));
}
+ questionString.append("</span>");
+
SendConfirmationDialog confirmationDialog(tr("Confirm send coins"),
questionString.arg(formatted.join("<br />")), SEND_CONFIRM_DELAY, this);
confirmationDialog.exec();
- QMessageBox::StandardButton retval = (QMessageBox::StandardButton)confirmationDialog.result();
+ QMessageBox::StandardButton retval = static_cast<QMessageBox::StandardButton>(confirmationDialog.result());
if(retval != QMessageBox::Yes)
{
@@ -365,8 +367,9 @@ void SendCoinsDialog::on_sendButton_clicked()
if (sendStatus.status == WalletModel::OK)
{
accept();
- CoinControlDialog::coinControl->UnSelectAll();
+ CoinControlDialog::coinControl()->UnSelectAll();
coinControlUpdateLabels();
+ Q_EMIT coinsSent(currentTransaction.getTransaction()->GetHash());
}
fNewRecipientAllowed = true;
}
@@ -602,7 +605,7 @@ void SendCoinsDialog::useAvailableBalance(SendCoinsEntry* entry)
// Get CCoinControl instance if CoinControl is enabled or create a new one.
CCoinControl coin_control;
if (model->getOptionsModel()->getCoinControlFeatures()) {
- coin_control = *CoinControlDialog::coinControl;
+ coin_control = *CoinControlDialog::coinControl();
}
// Calculate available amount to send.
@@ -752,7 +755,7 @@ void SendCoinsDialog::coinControlFeatureChanged(bool checked)
ui->frameCoinControl->setVisible(checked);
if (!checked && model) // coin control features disabled
- CoinControlDialog::coinControl->SetNull();
+ CoinControlDialog::coinControl()->SetNull();
coinControlUpdateLabels();
}
@@ -771,7 +774,7 @@ void SendCoinsDialog::coinControlChangeChecked(int state)
{
if (state == Qt::Unchecked)
{
- CoinControlDialog::coinControl->destChange = CNoDestination();
+ CoinControlDialog::coinControl()->destChange = CNoDestination();
ui->labelCoinControlChangeLabel->clear();
}
else
@@ -787,7 +790,7 @@ void SendCoinsDialog::coinControlChangeEdited(const QString& text)
if (model && model->getAddressTableModel())
{
// Default to no change address until verified
- CoinControlDialog::coinControl->destChange = CNoDestination();
+ CoinControlDialog::coinControl()->destChange = CNoDestination();
ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}");
const CTxDestination dest = DecodeDestination(text.toStdString());
@@ -810,7 +813,7 @@ void SendCoinsDialog::coinControlChangeEdited(const QString& text)
QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel);
if(btnRetVal == QMessageBox::Yes)
- CoinControlDialog::coinControl->destChange = dest;
+ CoinControlDialog::coinControl()->destChange = dest;
else
{
ui->lineEditCoinControlChange->setText("");
@@ -829,7 +832,7 @@ void SendCoinsDialog::coinControlChangeEdited(const QString& text)
else
ui->labelCoinControlChangeLabel->setText(tr("(no label)"));
- CoinControlDialog::coinControl->destChange = dest;
+ CoinControlDialog::coinControl()->destChange = dest;
}
}
}
@@ -841,7 +844,7 @@ void SendCoinsDialog::coinControlUpdateLabels()
if (!model || !model->getOptionsModel())
return;
- updateCoinControlState(*CoinControlDialog::coinControl);
+ updateCoinControlState(*CoinControlDialog::coinControl());
// set pay amounts
CoinControlDialog::payAmounts.clear();
@@ -859,7 +862,7 @@ void SendCoinsDialog::coinControlUpdateLabels()
}
}
- if (CoinControlDialog::coinControl->HasSelected())
+ if (CoinControlDialog::coinControl()->HasSelected())
{
// actual coin control calculation
CoinControlDialog::updateLabels(model, this);