diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2018-01-16 20:48:12 -1000 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2018-01-16 20:48:38 -1000 |
commit | 062c8b69f4ccae323d675685da8cbfcb7ccd0c55 (patch) | |
tree | 9d058eaa68113eabcd7b5086644f7054675555d0 /src/qt/editaddressdialog.cpp | |
parent | cad504bf4c302f7a72e0a0e191f3fdbafda7340f (diff) | |
parent | 63ac8907ce6ab095b37858d6e96946b59ce1c13f (diff) | |
download | bitcoin-062c8b69f4ccae323d675685da8cbfcb7ccd0c55.tar.xz |
Merge #11991: [qt] Receive: checkbox for bech32 address
63ac8907c [qt] receive tab: bech32 address opt-in checkbox (Sjors Provoost)
Pull request description:
<img width="647" alt="schermafbeelding 2018-01-12 om 18 34 48" src="https://user-images.githubusercontent.com/10217/34887691-a6a796fe-f7c7-11e7-8b89-87ce07c61ce3.png">
Checkbox does what you would expect. Press tab from the amount field to get there.
It's unchecked by default.
When launched with `-addresstype=bech32` it's checked by default. When launched with `-addresstype=legacy` it unchecked and disabled.
The change in `receivecoinsdialog.ui` is smaller than it looks, due to the way git handles XML diffs. I had to add a horizontal spacer to make it look decent, see https://github.com/bitcoin/bitcoin/issues/11950#issuecomment-352870909. This causes column numbers to change in the rest of the grid.
I recommend testing on at least one other OS than OSX to be on the safe side.
Tree-SHA512: ec4b733b796d9a94278a5d8040a69d9574ef50021e68f94f61f2da75d1bb57f39272cbc9f1f7d34f733a19640daf666a23844fcd132f83bfdaf327d9d1d6f105
Diffstat (limited to 'src/qt/editaddressdialog.cpp')
-rw-r--r-- | src/qt/editaddressdialog.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qt/editaddressdialog.cpp b/src/qt/editaddressdialog.cpp index 6b7df2f2b9..a945fc6aa0 100644 --- a/src/qt/editaddressdialog.cpp +++ b/src/qt/editaddressdialog.cpp @@ -11,6 +11,8 @@ #include <QDataWidgetMapper> #include <QMessageBox> +extern OutputType g_address_type; + EditAddressDialog::EditAddressDialog(Mode _mode, QWidget *parent) : QDialog(parent), ui(new Ui::EditAddressDialog), @@ -77,7 +79,8 @@ bool EditAddressDialog::saveCurrentRow() address = model->addRow( mode == NewSendingAddress ? AddressTableModel::Send : AddressTableModel::Receive, ui->labelEdit->text(), - ui->addressEdit->text()); + ui->addressEdit->text(), + g_address_type); break; case EditReceivingAddress: case EditSendingAddress: |