소스 검색

Merge #13319: [0.16.1] gui: Backport bech32 checkbox

dcb13a0ab6 qt: Update translations pre-rc1 (MarcoFalke)
0eda98d01b GUI: Allow generating Bech32 addresses with a legacy-address default (Luke Dashjr)
ea487f9f90 GUI: Rephrase Bech32 checkbox text/tooltip (Luke Dashjr)

Pull request description:

Tree-SHA512: 1298fa92579bcbdc80537a3a5b2f8aae460c7ebcb46fbade4305d45c883e1717587e24711792b5f65fd25b7a5999d7b9c82e63f5b4d18240f9ec4a0041efdb9a
tags/v0.16.1
Wladimir J. van der Laan 2 년 전
부모
커밋
07fb2a6e16
No account linked to committer's email address
4개의 변경된 파일34개의 추가작업 그리고 39개의 파일을 삭제
  1. 0
    2
      src/qt/bitcoinstrings.cpp
  2. 2
    2
      src/qt/forms/receivecoinsdialog.ui
  3. 24
    29
      src/qt/locale/bitcoin_en.ts
  4. 8
    6
      src/qt/receivecoinsdialog.cpp

+ 0
- 2
src/qt/bitcoinstrings.cpp 파일 보기

@@ -166,8 +166,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
"Set lowest fee rate (in %s/kB) for transactions to be included in block "
"creation. (default: %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Set maximum BIP141 block weight to this * 4. Deprecated, use blockmaxweight"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Set the number of script verification threads (%u to %d, 0 = auto, <0 = "
"leave that many cores free, default: %d)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""

+ 2
- 2
src/qt/forms/receivecoinsdialog.ui 파일 보기

@@ -206,10 +206,10 @@
<enum>Qt::StrongFocus</enum>
</property>
<property name="toolTip">
<string>Bech32 addresses (BIP-173) are cheaper to spend from and offer better protection against typos. When unchecked a P2SH wrapped SegWit address will be created, compatible with older wallets.</string>
<string>Native segwit addresses (aka Bech32 or BIP-173) reduce your transaction fees later on and offer better protection against typos, but old wallets don't support them. When unchecked, an address compatible with older wallets will be created instead.</string>
</property>
<property name="text">
<string>Generate Bech32 address</string>
<string>Generate native segwit (Bech32) address</string>
</property>
</widget>
</item>

+ 24
- 29
src/qt/locale/bitcoin_en.ts 파일 보기

@@ -635,7 +635,7 @@
<translation>Catching up...</translation>
</message>
<message>
<location line="+145"/>
<location line="+150"/>
<source>Date: %1
</source>
<translation type="unfinished"></translation>
@@ -695,7 +695,7 @@
<translation>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</translation>
</message>
<message>
<location filename="../bitcoin.cpp" line="+534"/>
<location filename="../bitcoin.cpp" line="+531"/>
<source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
<translation type="unfinished"></translation>
</message>
@@ -788,7 +788,7 @@
<translation type="unfinished">Confirmed</translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="+53"/>
<location filename="../coincontroldialog.cpp" line="+52"/>
<source>Copy address</source>
<translation type="unfinished"></translation>
</message>
@@ -874,7 +874,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<location line="+42"/>
<location line="+48"/>
<location line="+52"/>
<source>(no label)</source>
<translation type="unfinished"></translation>
@@ -2453,27 +2453,27 @@
<translation type="unfinished"></translation>
</message>
<message>
<location line="+142"/>
<source>Requested payments history</source>
<location line="+78"/>
<source>Native segwit addresses (aka Bech32 or BIP-173) reduce your transaction fees later on and offer better protection against typos, but old wallets don&apos;t support them. When unchecked, an address compatible with older wallets will be created instead.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="-162"/>
<source>&amp;Request payment</source>
<location line="+3"/>
<source>Generate native segwit (Bech32) address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+98"/>
<source>Bech32 addresses (BIP-173) are cheaper to spend from and offer better protection against typos. When unchecked a P2SH wrapped SegWit address will be created, compatible with older wallets.</source>
<location line="+61"/>
<source>Requested payments history</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>Generate Bech32 address</source>
<location line="-162"/>
<source>&amp;Request payment</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+86"/>
<location line="+187"/>
<source>Show the selected request (does the same as double clicking an entry)</source>
<translation type="unfinished"></translation>
</message>
@@ -4025,7 +4025,7 @@
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+351"/>
<location filename="../bitcoinstrings.cpp" line="+349"/>
<source>Options:</source>
<translation>Options:</translation>
</message>
@@ -4050,7 +4050,7 @@
<translation>Accept command line and JSON-RPC commands</translation>
</message>
<message>
<location line="-209"/>
<location line="-207"/>
<source>Distributed under the MIT software license, see the accompanying file %s or %s</source>
<translation type="unfinished"></translation>
</message>
@@ -4075,7 +4075,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<location line="+151"/>
<location line="+149"/>
<source>Error: A fatal internal error occurred, see debug.log for details</source>
<translation type="unfinished"></translation>
</message>
@@ -4100,7 +4100,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<location line="-397"/>
<location line="-395"/>
<source>Bitcoin Core</source>
<translation type="unfinished">Bitcoin Core</translation>
</message>
@@ -4210,7 +4210,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<location line="+3"/>
<source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
<translation type="unfinished"></translation>
</message>
@@ -4625,7 +4625,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<location line="-397"/>
<location line="-395"/>
<source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
<translation type="unfinished"></translation>
</message>
@@ -4680,7 +4680,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<location line="+44"/>
<location line="+42"/>
<source>The transaction amount is too small to send after the fee has been deducted</source>
<translation type="unfinished"></translation>
</message>
@@ -4925,17 +4925,17 @@
<translation>Password for JSON-RPC connections</translation>
</message>
<message>
<location line="-263"/>
<location line="-261"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation>Execute command when the best block changes (%s in cmd is replaced by block hash)</translation>
</message>
<message>
<location line="+185"/>
<location line="+183"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation>Allow DNS lookups for -addnode, -seednode and -connect</translation>
</message>
<message>
<location line="-260"/>
<location line="-258"/>
<source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
<translation type="unfinished"></translation>
</message>
@@ -5000,12 +5000,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<location line="+34"/>
<source>Set maximum BIP141 block weight to this * 4. Deprecated, use blockmaxweight</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<location line="+37"/>
<source>Sets the serialization of raw transaction or block hex returned in non-verbose mode, non-segwit(0) or segwit(1) (default: %d)</source>
<translation type="unfinished"></translation>
</message>

+ 8
- 6
src/qt/receivecoinsdialog.cpp 파일 보기

@@ -94,14 +94,11 @@ void ReceiveCoinsDialog::setModel(WalletModel *_model)
// Last 2 columns are set by the columnResizingFixer, when the table geometry is ready.
columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer(tableView, AMOUNT_MINIMUM_COLUMN_WIDTH, DATE_COLUMN_WIDTH, this);

// configure bech32 checkbox, disable if launched with legacy as default:
if (model->getDefaultAddressType() == OUTPUT_TYPE_BECH32) {
ui->useBech32->setCheckState(Qt::Checked);
} else {
ui->useBech32->setCheckState(Qt::Unchecked);
}

ui->useBech32->setVisible(model->getDefaultAddressType() != OUTPUT_TYPE_LEGACY);
}
}

@@ -144,9 +141,14 @@ void ReceiveCoinsDialog::on_receiveButton_clicked()
QString address;
QString label = ui->reqLabel->text();
/* Generate new receiving address */
OutputType address_type = model->getDefaultAddressType();
if (address_type != OUTPUT_TYPE_LEGACY) {
address_type = ui->useBech32->isChecked() ? OUTPUT_TYPE_BECH32 : OUTPUT_TYPE_P2SH_SEGWIT;
OutputType address_type;
if (ui->useBech32->isChecked()) {
address_type = OUTPUT_TYPE_BECH32;
} else {
address_type = model->getDefaultAddressType();
if (address_type == OUTPUT_TYPE_BECH32) {
address_type = OUTPUT_TYPE_P2SH_SEGWIT;
}
}
address = model->getAddressTableModel()->addRow(AddressTableModel::Receive, label, "", address_type);
SendCoinsRecipient info(address, label,

Loading…
취소
저장