Merge pull request #3285

d3207b6 [Qt] coin-control features GUI cleanup 3 (Philip Kaufmann)
834e14e [Qt] coin-control features GUI cleanup 2 (Philip Kaufmann)
This commit is contained in:
Wladimir J. van der Laan 2013-12-03 17:26:39 +01:00
commit f15bd3c96f
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
4 changed files with 147 additions and 101 deletions

View File

@ -590,7 +590,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
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) ? "~" : "") + QString::number(nBytes)); // Bytes
l6->setText(sPriorityLabel); // Priority l6->setText(sPriorityLabel); // Priority
l7->setText((fLowOutput ? (fDust ? tr("DUST") : tr("yes")) : tr("no"))); // Low Output / Dust l7->setText((fLowOutput ? (fDust ? tr("Dust") : tr("yes")) : tr("no"))); // Low Output / Dust
l8->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nChange)); // Change l8->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nChange)); // Change
// turn labels "red" // turn labels "red"
@ -600,10 +600,25 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
l8->setStyleSheet((nChange > 0 && nChange < CENT) ? "color:red;" : ""); // Change < 0.01BTC l8->setStyleSheet((nChange > 0 && nChange < CENT) ? "color:red;" : ""); // Change < 0.01BTC
// tool tips // tool tips
l5->setToolTip(tr("This label turns red, if the transaction size is bigger than 1000 bytes.\n\n This means a fee of at least %1 per kb is required.\n\n Can vary +/- 1 Byte per input.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::nMinTxFee))); QString toolTip1 = tr("This label turns red, if the transaction size is greater than 1000 bytes.") + "<br /><br />";
l6->setToolTip(tr("Transactions with higher priority get more likely into a block.\n\nThis label turns red, if the priority is smaller than \"medium\".\n\n This means a fee of at least %1 per kb is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::nMinTxFee))); toolTip1 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::nMinTxFee)) + "<br /><br />";
l7->setToolTip(tr("This label turns red, if any recipient receives an amount smaller than %1.\n\n This means a fee of at least %2 is required. \n\n Amounts below 0.546 times the minimum relay fee are shown as DUST.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CENT)).arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::nMinTxFee))); toolTip1 += tr("Can vary +/- 1 byte per input.");
l8->setToolTip(tr("This label turns red, if the change is smaller than %1.\n\n This means a fee of at least %2 is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CENT)).arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::nMinTxFee)));
QString toolTip2 = tr("Transactions with higher priority are more likely to get included into a block.") + "<br /><br />";
toolTip2 += tr("This label turns red, if the priority is smaller than \"medium\"") + "<br /><br />";
toolTip2 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::nMinTxFee));
QString toolTip3 = tr("This label turns red, if any recipient receives an amount smaller than %1.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CENT)) + "<br /><br />";
toolTip3 += tr("This means a fee of at least %1 is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::nMinTxFee)) + "<br /><br />";
toolTip3 += tr("Amounts below 0.546 times the minimum relay fee are shown as dust.");
QString toolTip4 = tr("This label turns red, if the change is smaller than %1.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CENT)) + "<br /><br />";
toolTip4 += tr("This means a fee of at least %1 is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::nMinTxFee));
l5->setToolTip(toolTip1);
l6->setToolTip(toolTip2);
l7->setToolTip(toolTip3);
l8->setToolTip(toolTip4);
dialog->findChild<QLabel *>("labelCoinControlBytesText") ->setToolTip(l5->toolTip()); dialog->findChild<QLabel *>("labelCoinControlBytesText") ->setToolTip(l5->toolTip());
dialog->findChild<QLabel *>("labelCoinControlPriorityText") ->setToolTip(l6->toolTip()); dialog->findChild<QLabel *>("labelCoinControlPriorityText") ->setToolTip(l6->toolTip());
dialog->findChild<QLabel *>("labelCoinControlLowOutputText")->setToolTip(l7->toolTip()); dialog->findChild<QLabel *>("labelCoinControlLowOutputText")->setToolTip(l7->toolTip());

View File

@ -38,8 +38,11 @@
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="labelCoinControlQuantityText"> <widget class="QLabel" name="labelCoinControlQuantityText">
<property name="styleSheet"> <property name="font">
<string notr="true">font-weight:bold;</string> <font>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="text"> <property name="text">
<string>Quantity:</string> <string>Quantity:</string>
@ -64,8 +67,11 @@
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="labelCoinControlBytesText"> <widget class="QLabel" name="labelCoinControlBytesText">
<property name="styleSheet"> <property name="font">
<string notr="true">font-weight:bold;</string> <font>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="text"> <property name="text">
<string>Bytes:</string> <string>Bytes:</string>
@ -106,8 +112,11 @@
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="labelCoinControlAmountText"> <widget class="QLabel" name="labelCoinControlAmountText">
<property name="styleSheet"> <property name="font">
<string notr="true">font-weight:bold;</string> <font>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="text"> <property name="text">
<string>Amount:</string> <string>Amount:</string>
@ -132,8 +141,11 @@
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="labelCoinControlPriorityText"> <widget class="QLabel" name="labelCoinControlPriorityText">
<property name="styleSheet"> <property name="font">
<string notr="true">font-weight:bold;</string> <font>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="text"> <property name="text">
<string>Priority:</string> <string>Priority:</string>
@ -148,6 +160,9 @@
<property name="contextMenuPolicy"> <property name="contextMenuPolicy">
<enum>Qt::ActionsContextMenu</enum> <enum>Qt::ActionsContextMenu</enum>
</property> </property>
<property name="text">
<string notr="true">medium</string>
</property>
<property name="textInteractionFlags"> <property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property> </property>
@ -171,8 +186,11 @@
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="labelCoinControlFeeText"> <widget class="QLabel" name="labelCoinControlFeeText">
<property name="styleSheet"> <property name="font">
<string notr="true">font-weight:bold;</string> <font>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="text"> <property name="text">
<string>Fee:</string> <string>Fee:</string>
@ -200,8 +218,11 @@
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="styleSheet"> <property name="font">
<string notr="true">font-weight:bold;</string> <font>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="text"> <property name="text">
<string>Low Output:</string> <string>Low Output:</string>
@ -220,7 +241,7 @@
<enum>Qt::ActionsContextMenu</enum> <enum>Qt::ActionsContextMenu</enum>
</property> </property>
<property name="text"> <property name="text">
<string>no</string> <string notr="true">no</string>
</property> </property>
<property name="textInteractionFlags"> <property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
@ -245,8 +266,11 @@
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="labelCoinControlAfterFeeText"> <widget class="QLabel" name="labelCoinControlAfterFeeText">
<property name="styleSheet"> <property name="font">
<string notr="true">font-weight:bold;</string> <font>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="text"> <property name="text">
<string>After Fee:</string> <string>After Fee:</string>
@ -274,8 +298,11 @@
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="styleSheet"> <property name="font">
<string notr="true">font-weight:bold;</string> <font>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="text"> <property name="text">
<string>Change:</string> <string>Change:</string>
@ -377,7 +404,7 @@
<item> <item>
<widget class="QLabel" name="labelLocked"> <widget class="QLabel" name="labelLocked">
<property name="text"> <property name="text">
<string>(1 locked)</string> <string notr="true">(1 locked)</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -39,7 +39,7 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayoutCoinControl2"> <layout class="QVBoxLayout" name="verticalLayoutCoinControl2">
<property name="spacing"> <property name="spacing">
<number>-1</number> <number>0</number>
</property> </property>
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
@ -173,7 +173,16 @@
<string notr="true"/> <string notr="true"/>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayoutCoinControl5"> <layout class="QHBoxLayout" name="horizontalLayoutCoinControl5">
<property name="margin"> <property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
@ -206,8 +215,11 @@
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="labelCoinControlQuantityText"> <widget class="QLabel" name="labelCoinControlQuantityText">
<property name="styleSheet"> <property name="font">
<string notr="true">font-weight:bold;</string> <font>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="text"> <property name="text">
<string>Quantity:</string> <string>Quantity:</string>
@ -219,12 +231,6 @@
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QLabel" name="labelCoinControlQuantity"> <widget class="QLabel" name="labelCoinControlQuantity">
<property name="font">
<font>
<family>Monospace</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -244,8 +250,11 @@
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="labelCoinControlBytesText"> <widget class="QLabel" name="labelCoinControlBytesText">
<property name="styleSheet"> <property name="font">
<string notr="true">font-weight:bold;</string> <font>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="text"> <property name="text">
<string>Bytes:</string> <string>Bytes:</string>
@ -254,12 +263,6 @@
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QLabel" name="labelCoinControlBytes"> <widget class="QLabel" name="labelCoinControlBytes">
<property name="font">
<font>
<family>Monospace</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -295,8 +298,11 @@
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="labelCoinControlAmountText"> <widget class="QLabel" name="labelCoinControlAmountText">
<property name="styleSheet"> <property name="font">
<string notr="true">font-weight:bold;</string> <font>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="text"> <property name="text">
<string>Amount:</string> <string>Amount:</string>
@ -308,12 +314,6 @@
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QLabel" name="labelCoinControlAmount"> <widget class="QLabel" name="labelCoinControlAmount">
<property name="font">
<font>
<family>Monospace</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -330,8 +330,11 @@
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="labelCoinControlPriorityText"> <widget class="QLabel" name="labelCoinControlPriorityText">
<property name="styleSheet"> <property name="font">
<string notr="true">font-weight:bold;</string> <font>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="text"> <property name="text">
<string>Priority:</string> <string>Priority:</string>
@ -340,12 +343,6 @@
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QLabel" name="labelCoinControlPriority"> <widget class="QLabel" name="labelCoinControlPriority">
<property name="font">
<font>
<family>Monospace</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -353,7 +350,7 @@
<enum>Qt::ActionsContextMenu</enum> <enum>Qt::ActionsContextMenu</enum>
</property> </property>
<property name="text"> <property name="text">
<string>medium</string> <string notr="true">medium</string>
</property> </property>
<property name="textInteractionFlags"> <property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
@ -381,8 +378,11 @@
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="labelCoinControlFeeText"> <widget class="QLabel" name="labelCoinControlFeeText">
<property name="styleSheet"> <property name="font">
<string notr="true">font-weight:bold;</string> <font>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="text"> <property name="text">
<string>Fee:</string> <string>Fee:</string>
@ -394,12 +394,6 @@
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QLabel" name="labelCoinControlFee"> <widget class="QLabel" name="labelCoinControlFee">
<property name="font">
<font>
<family>Monospace</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -416,8 +410,11 @@
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="labelCoinControlLowOutputText"> <widget class="QLabel" name="labelCoinControlLowOutputText">
<property name="styleSheet"> <property name="font">
<string notr="true">font-weight:bold;</string> <font>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="text"> <property name="text">
<string>Low Output:</string> <string>Low Output:</string>
@ -426,12 +423,6 @@
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QLabel" name="labelCoinControlLowOutput"> <widget class="QLabel" name="labelCoinControlLowOutput">
<property name="font">
<font>
<family>Monospace</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -439,7 +430,7 @@
<enum>Qt::ActionsContextMenu</enum> <enum>Qt::ActionsContextMenu</enum>
</property> </property>
<property name="text"> <property name="text">
<string>no</string> <string notr="true">no</string>
</property> </property>
<property name="textInteractionFlags"> <property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
@ -467,8 +458,11 @@
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="labelCoinControlAfterFeeText"> <widget class="QLabel" name="labelCoinControlAfterFeeText">
<property name="styleSheet"> <property name="font">
<string notr="true">font-weight:bold;</string> <font>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="text"> <property name="text">
<string>After Fee:</string> <string>After Fee:</string>
@ -480,12 +474,6 @@
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QLabel" name="labelCoinControlAfterFee"> <widget class="QLabel" name="labelCoinControlAfterFee">
<property name="font">
<font>
<family>Monospace</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -502,8 +490,11 @@
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="labelCoinControlChangeText"> <widget class="QLabel" name="labelCoinControlChangeText">
<property name="styleSheet"> <property name="font">
<string notr="true">font-weight:bold;</string> <font>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="text"> <property name="text">
<string>Change:</string> <string>Change:</string>
@ -512,12 +503,6 @@
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QLabel" name="labelCoinControlChange"> <widget class="QLabel" name="labelCoinControlChange">
<property name="font">
<font>
<family>Monospace</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
@ -555,13 +540,16 @@
</property> </property>
<item> <item>
<widget class="QCheckBox" name="checkBoxCoinControlChange"> <widget class="QCheckBox" name="checkBoxCoinControlChange">
<property name="toolTip">
<string>If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address.</string>
</property>
<property name="text"> <property name="text">
<string>custom change address</string> <string>Custom change address</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="lineEditCoinControlChange"> <widget class="QValidatedLineEdit" name="lineEditCoinControlChange">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -626,7 +614,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>830</width> <width>830</width>
<height>165</height> <height>178</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,1"> <layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,1">
@ -729,7 +717,7 @@
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
</property> </property>
<property name="text"> <property name="text">
<string>123.456 BTC</string> <string notr="true">123.456 BTC</string>
</property> </property>
<property name="textInteractionFlags"> <property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
@ -778,6 +766,13 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>QValidatedLineEdit</class>
<extends>QLineEdit</extends>
<header>qvalidatedlineedit.h</header>
</customwidget>
</customwidgets>
<resources> <resources>
<include location="../bitcoin.qrc"/> <include location="../bitcoin.qrc"/>
</resources> </resources>

View File

@ -529,16 +529,17 @@ void SendCoinsDialog::coinControlButtonClicked()
// Coin Control: checkbox custom change address // Coin Control: checkbox custom change address
void SendCoinsDialog::coinControlChangeChecked(int state) void SendCoinsDialog::coinControlChangeChecked(int state)
{ {
if (model) if (state == Qt::Unchecked)
{ {
if (state == Qt::Checked) CoinControlDialog::coinControl->destChange = CNoDestination();
CoinControlDialog::coinControl->destChange = CBitcoinAddress(ui->lineEditCoinControlChange->text().toStdString()).Get(); ui->lineEditCoinControlChange->setValid(true);
else ui->labelCoinControlChangeLabel->clear();
CoinControlDialog::coinControl->destChange = CNoDestination();
} }
else
// use this to re-validate an already entered address
coinControlChangeEdited(ui->lineEditCoinControlChange->text());
ui->lineEditCoinControlChange->setEnabled((state == Qt::Checked)); ui->lineEditCoinControlChange->setEnabled((state == Qt::Checked));
ui->labelCoinControlChangeLabel->setVisible((state == Qt::Checked));
} }
// Coin Control: custom change address changed // Coin Control: custom change address changed
@ -554,6 +555,10 @@ void SendCoinsDialog::coinControlChangeEdited(const QString & text)
ui->labelCoinControlChangeLabel->setText(""); ui->labelCoinControlChangeLabel->setText("");
else if (!CBitcoinAddress(text.toStdString()).IsValid()) else if (!CBitcoinAddress(text.toStdString()).IsValid())
{ {
// invalid change address
CoinControlDialog::coinControl->destChange = CNoDestination();
ui->lineEditCoinControlChange->setValid(false);
ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}"); ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}");
ui->labelCoinControlChangeLabel->setText(tr("Warning: Invalid Bitcoin address")); ui->labelCoinControlChangeLabel->setText(tr("Warning: Invalid Bitcoin address"));
} }
@ -571,6 +576,10 @@ void SendCoinsDialog::coinControlChangeEdited(const QString & text)
ui->labelCoinControlChangeLabel->setText(tr("(no label)")); ui->labelCoinControlChangeLabel->setText(tr("(no label)"));
else else
{ {
// unknown change address
CoinControlDialog::coinControl->destChange = CNoDestination();
ui->lineEditCoinControlChange->setValid(false);
ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}"); ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}");
ui->labelCoinControlChangeLabel->setText(tr("Warning: Unknown change address")); ui->labelCoinControlChangeLabel->setText(tr("Warning: Unknown change address"));
} }