Browse Source

Merge pull request #5651

1d84aea Coin Control: Use U+2248 "ALMOST EQUAL TO" rather than a simple tilde (which may be mistaken for a negative sign) (Luke Dashjr)
0.13
Wladimir J. van der Laan 10 years ago
parent
commit
848f55d52f
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 16
      src/qt/coincontroldialog.cpp
  2. 2
      src/qt/coincontroldialog.h
  3. 8
      src/qt/sendcoinsdialog.cpp

16
src/qt/coincontroldialog.cpp

@ -304,19 +304,19 @@ void CoinControlDialog::clipboardAmount()
// copy label "Fee" to clipboard // copy label "Fee" to clipboard
void CoinControlDialog::clipboardFee() void CoinControlDialog::clipboardFee()
{ {
GUIUtil::setClipboard(ui->labelCoinControlFee->text().left(ui->labelCoinControlFee->text().indexOf(" ")).replace("~", "")); GUIUtil::setClipboard(ui->labelCoinControlFee->text().left(ui->labelCoinControlFee->text().indexOf(" ")).replace(ASYMP_UTF8, ""));
} }
// copy label "After fee" to clipboard // copy label "After fee" to clipboard
void CoinControlDialog::clipboardAfterFee() void CoinControlDialog::clipboardAfterFee()
{ {
GUIUtil::setClipboard(ui->labelCoinControlAfterFee->text().left(ui->labelCoinControlAfterFee->text().indexOf(" ")).replace("~", "")); GUIUtil::setClipboard(ui->labelCoinControlAfterFee->text().left(ui->labelCoinControlAfterFee->text().indexOf(" ")).replace(ASYMP_UTF8, ""));
} }
// copy label "Bytes" to clipboard // copy label "Bytes" to clipboard
void CoinControlDialog::clipboardBytes() void CoinControlDialog::clipboardBytes()
{ {
GUIUtil::setClipboard(ui->labelCoinControlBytes->text().replace("~", "")); GUIUtil::setClipboard(ui->labelCoinControlBytes->text().replace(ASYMP_UTF8, ""));
} }
// copy label "Priority" to clipboard // copy label "Priority" to clipboard
@ -334,7 +334,7 @@ void CoinControlDialog::clipboardLowOutput()
// copy label "Change" to clipboard // copy label "Change" to clipboard
void CoinControlDialog::clipboardChange() void CoinControlDialog::clipboardChange()
{ {
GUIUtil::setClipboard(ui->labelCoinControlChange->text().left(ui->labelCoinControlChange->text().indexOf(" ")).replace("~", "")); GUIUtil::setClipboard(ui->labelCoinControlChange->text().left(ui->labelCoinControlChange->text().indexOf(" ")).replace(ASYMP_UTF8, ""));
} }
// treeview: sort // treeview: sort
@ -600,16 +600,16 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
l2->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nAmount)); // Amount l2->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nAmount)); // Amount
l3->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nPayFee)); // Fee l3->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nPayFee)); // Fee
l4->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nAfterFee)); // After Fee l4->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nAfterFee)); // After Fee
l5->setText(((nBytes > 0) ? "~" : "") + QString::number(nBytes)); // Bytes l5->setText(((nBytes > 0) ? ASYMP_UTF8 : "") + QString::number(nBytes)); // Bytes
l6->setText(sPriorityLabel); // Priority l6->setText(sPriorityLabel); // Priority
l7->setText(fDust ? tr("yes") : tr("no")); // Dust l7->setText(fDust ? tr("yes") : tr("no")); // Dust
l8->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nChange)); // Change l8->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nChange)); // Change
if (nPayFee > 0 && !(payTxFee.GetFeePerK() > 0 && fPayAtLeastCustomFee && nBytes < 1000)) if (nPayFee > 0 && !(payTxFee.GetFeePerK() > 0 && fPayAtLeastCustomFee && nBytes < 1000))
{ {
l3->setText("~" + l3->text()); l3->setText(ASYMP_UTF8 + l3->text());
l4->setText("~" + l4->text()); l4->setText(ASYMP_UTF8 + l4->text());
if (nChange > 0) if (nChange > 0)
l8->setText("~" + l8->text()); l8->setText(ASYMP_UTF8 + l8->text());
} }
// turn labels "red" // turn labels "red"

2
src/qt/coincontroldialog.h

@ -25,6 +25,8 @@ namespace Ui {
class CoinControlDialog; class CoinControlDialog;
} }
#define ASYMP_UTF8 "\xE2\x89\x88"
class CoinControlDialog : public QDialog class CoinControlDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT

8
src/qt/sendcoinsdialog.cpp

@ -657,19 +657,19 @@ void SendCoinsDialog::coinControlClipboardAmount()
// Coin Control: copy label "Fee" to clipboard // Coin Control: copy label "Fee" to clipboard
void SendCoinsDialog::coinControlClipboardFee() void SendCoinsDialog::coinControlClipboardFee()
{ {
GUIUtil::setClipboard(ui->labelCoinControlFee->text().left(ui->labelCoinControlFee->text().indexOf(" ")).replace("~", "")); GUIUtil::setClipboard(ui->labelCoinControlFee->text().left(ui->labelCoinControlFee->text().indexOf(" ")).replace(ASYMP_UTF8, ""));
} }
// Coin Control: copy label "After fee" to clipboard // Coin Control: copy label "After fee" to clipboard
void SendCoinsDialog::coinControlClipboardAfterFee() void SendCoinsDialog::coinControlClipboardAfterFee()
{ {
GUIUtil::setClipboard(ui->labelCoinControlAfterFee->text().left(ui->labelCoinControlAfterFee->text().indexOf(" ")).replace("~", "")); GUIUtil::setClipboard(ui->labelCoinControlAfterFee->text().left(ui->labelCoinControlAfterFee->text().indexOf(" ")).replace(ASYMP_UTF8, ""));
} }
// Coin Control: copy label "Bytes" to clipboard // Coin Control: copy label "Bytes" to clipboard
void SendCoinsDialog::coinControlClipboardBytes() void SendCoinsDialog::coinControlClipboardBytes()
{ {
GUIUtil::setClipboard(ui->labelCoinControlBytes->text().replace("~", "")); GUIUtil::setClipboard(ui->labelCoinControlBytes->text().replace(ASYMP_UTF8, ""));
} }
// Coin Control: copy label "Priority" to clipboard // Coin Control: copy label "Priority" to clipboard
@ -687,7 +687,7 @@ void SendCoinsDialog::coinControlClipboardLowOutput()
// Coin Control: copy label "Change" to clipboard // Coin Control: copy label "Change" to clipboard
void SendCoinsDialog::coinControlClipboardChange() void SendCoinsDialog::coinControlClipboardChange()
{ {
GUIUtil::setClipboard(ui->labelCoinControlChange->text().left(ui->labelCoinControlChange->text().indexOf(" ")).replace("~", "")); GUIUtil::setClipboard(ui->labelCoinControlChange->text().left(ui->labelCoinControlChange->text().indexOf(" ")).replace(ASYMP_UTF8, ""));
} }
// Coin Control: settings menu - coin control enabled/disabled by user // Coin Control: settings menu - coin control enabled/disabled by user

Loading…
Cancel
Save