Skip to content

Commit e53fa4a

Browse files
committed
Remove custom fee radio group
Removes the extraneous custom fee radio group and its single radio button. The radio button is replaced with a label that has the radio button's text.
1 parent 09627b1 commit e53fa4a

File tree

2 files changed

+3
-20
lines changed

2 files changed

+3
-20
lines changed

src/qt/forms/sendcoinsdialog.ui

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -846,19 +846,13 @@
846846
<item>
847847
<layout class="QHBoxLayout" name="horizontalLayoutFee13">
848848
<item>
849-
<widget class="QRadioButton" name="radioCustomPerKilobyte">
849+
<widget class="QLabel" name="labelCustomPerKilobyte">
850850
<property name="toolTip">
851851
<string>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 satoshis in fee, while &quot;total at least&quot; pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</string>
852852
</property>
853853
<property name="text">
854854
<string>per kilobyte</string>
855855
</property>
856-
<property name="checked">
857-
<bool>true</bool>
858-
</property>
859-
<attribute name="buttonGroup">
860-
<string notr="true">groupCustomFee</string>
861-
</attribute>
862856
</widget>
863857
</item>
864858
<item>
@@ -1285,6 +1279,5 @@
12851279
<connections/>
12861280
<buttongroups>
12871281
<buttongroup name="groupFee"/>
1288-
<buttongroup name="groupCustomFee"/>
12891282
</buttongroups>
12901283
</ui>

src/qt/sendcoinsdialog.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,6 @@ SendCoinsDialog::SendCoinsDialog(const PlatformStyle *_platformStyle, QWidget *p
114114
settings.setValue("nFeeRadio", 1); // custom
115115
if (!settings.contains("nFeeRadio"))
116116
settings.setValue("nFeeRadio", 0); // recommended
117-
if (!settings.contains("nCustomFeeRadio") && settings.contains("nTransactionFee") && settings.value("nTransactionFee").toLongLong() > 0) // compatibility
118-
settings.setValue("nCustomFeeRadio", 1); // total at least
119-
if (!settings.contains("nCustomFeeRadio"))
120-
settings.setValue("nCustomFeeRadio", 0); // per kilobyte
121117
if (!settings.contains("nSmartFeeSliderPosition"))
122118
settings.setValue("nSmartFeeSliderPosition", 0);
123119
if (!settings.contains("nTransactionFee"))
@@ -127,8 +123,6 @@ SendCoinsDialog::SendCoinsDialog(const PlatformStyle *_platformStyle, QWidget *p
127123
ui->groupFee->setId(ui->radioSmartFee, 0);
128124
ui->groupFee->setId(ui->radioCustomFee, 1);
129125
ui->groupFee->button((int)std::max(0, std::min(1, settings.value("nFeeRadio").toInt())))->setChecked(true);
130-
ui->groupCustomFee->setId(ui->radioCustomPerKilobyte, 0);
131-
ui->groupCustomFee->button(0)->setChecked(true);
132126
ui->customFee->setValue(settings.value("nTransactionFee").toLongLong());
133127
ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool());
134128
minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool());
@@ -178,7 +172,6 @@ void SendCoinsDialog::setModel(WalletModel *_model)
178172
connect(ui->confTargetSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(coinControlUpdateLabels()));
179173
connect(ui->groupFee, SIGNAL(buttonClicked(int)), this, SLOT(updateFeeSectionControls()));
180174
connect(ui->groupFee, SIGNAL(buttonClicked(int)), this, SLOT(coinControlUpdateLabels()));
181-
connect(ui->groupCustomFee, SIGNAL(buttonClicked(int)), this, SLOT(coinControlUpdateLabels()));
182175
connect(ui->customFee, SIGNAL(valueChanged()), this, SLOT(coinControlUpdateLabels()));
183176
connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(setMinimumFee()));
184177
connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(updateFeeSectionControls()));
@@ -214,7 +207,6 @@ SendCoinsDialog::~SendCoinsDialog()
214207
QSettings settings;
215208
settings.setValue("fFeeSectionMinimized", fFeeMinimized);
216209
settings.setValue("nFeeRadio", ui->groupFee->checkedId());
217-
settings.setValue("nCustomFeeRadio", ui->groupCustomFee->checkedId());
218210
settings.setValue("nConfTarget", getConfTargetForIndex(ui->confTargetSelector->currentIndex()));
219211
settings.setValue("nTransactionFee", (qint64)ui->customFee->value());
220212
settings.setValue("fPayOnlyMinFee", ui->checkBoxMinimumFee->isChecked());
@@ -609,7 +601,6 @@ void SendCoinsDialog::on_buttonMinimizeFee_clicked()
609601

610602
void SendCoinsDialog::setMinimumFee()
611603
{
612-
ui->radioCustomPerKilobyte->setChecked(true);
613604
ui->customFee->setValue(GetRequiredFee(1000));
614605
}
615606

@@ -622,7 +613,7 @@ void SendCoinsDialog::updateFeeSectionControls()
622613
ui->labelFeeEstimation ->setEnabled(ui->radioSmartFee->isChecked());
623614
ui->checkBoxMinimumFee ->setEnabled(ui->radioCustomFee->isChecked());
624615
ui->labelMinFeeWarning ->setEnabled(ui->radioCustomFee->isChecked());
625-
ui->radioCustomPerKilobyte ->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked());
616+
ui->labelCustomPerKilobyte ->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked());
626617
ui->customFee ->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked());
627618
}
628619

@@ -634,8 +625,7 @@ void SendCoinsDialog::updateFeeMinimizedLabel()
634625
if (ui->radioSmartFee->isChecked())
635626
ui->labelFeeMinimized->setText(ui->labelSmartFee->text());
636627
else {
637-
ui->labelFeeMinimized->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), ui->customFee->value()) +
638-
((ui->radioCustomPerKilobyte->isChecked()) ? "/kB" : ""));
628+
ui->labelFeeMinimized->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), ui->customFee->value()) + "/kB");
639629
}
640630
}
641631

0 commit comments

Comments
 (0)