mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Merge #11334: qt: Remove custom fee radio group and remove nCustomFeeRadio setting
e53fa4a
Remove custom fee radio group (Andrew Chow)
Pull request description:
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.
Continuation of #11332
Tree-SHA512: b47b675f900ee4e2f4823203a42bb697f707ba67a8504d730c53d4dae511d0ed03226af34efd7ea45570c6111f8b3b6c39ac28f1b5c090de225903442ad4159a
This commit is contained in:
commit
44313d8250
@ -846,19 +846,13 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayoutFee13">
|
<layout class="QHBoxLayout" name="horizontalLayoutFee13">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="radioCustomPerKilobyte">
|
<widget class="QLabel" name="labelCustomPerKilobyte">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</string>
|
<string>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>per kilobyte</string>
|
<string>per kilobyte</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<attribute name="buttonGroup">
|
|
||||||
<string notr="true">groupCustomFee</string>
|
|
||||||
</attribute>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -1285,6 +1279,5 @@
|
|||||||
<connections/>
|
<connections/>
|
||||||
<buttongroups>
|
<buttongroups>
|
||||||
<buttongroup name="groupFee"/>
|
<buttongroup name="groupFee"/>
|
||||||
<buttongroup name="groupCustomFee"/>
|
|
||||||
</buttongroups>
|
</buttongroups>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -114,10 +114,6 @@ SendCoinsDialog::SendCoinsDialog(const PlatformStyle *_platformStyle, QWidget *p
|
|||||||
settings.setValue("nFeeRadio", 1); // custom
|
settings.setValue("nFeeRadio", 1); // custom
|
||||||
if (!settings.contains("nFeeRadio"))
|
if (!settings.contains("nFeeRadio"))
|
||||||
settings.setValue("nFeeRadio", 0); // recommended
|
settings.setValue("nFeeRadio", 0); // recommended
|
||||||
if (!settings.contains("nCustomFeeRadio") && settings.contains("nTransactionFee") && settings.value("nTransactionFee").toLongLong() > 0) // compatibility
|
|
||||||
settings.setValue("nCustomFeeRadio", 1); // total at least
|
|
||||||
if (!settings.contains("nCustomFeeRadio"))
|
|
||||||
settings.setValue("nCustomFeeRadio", 0); // per kilobyte
|
|
||||||
if (!settings.contains("nSmartFeeSliderPosition"))
|
if (!settings.contains("nSmartFeeSliderPosition"))
|
||||||
settings.setValue("nSmartFeeSliderPosition", 0);
|
settings.setValue("nSmartFeeSliderPosition", 0);
|
||||||
if (!settings.contains("nTransactionFee"))
|
if (!settings.contains("nTransactionFee"))
|
||||||
@ -127,8 +123,6 @@ SendCoinsDialog::SendCoinsDialog(const PlatformStyle *_platformStyle, QWidget *p
|
|||||||
ui->groupFee->setId(ui->radioSmartFee, 0);
|
ui->groupFee->setId(ui->radioSmartFee, 0);
|
||||||
ui->groupFee->setId(ui->radioCustomFee, 1);
|
ui->groupFee->setId(ui->radioCustomFee, 1);
|
||||||
ui->groupFee->button((int)std::max(0, std::min(1, settings.value("nFeeRadio").toInt())))->setChecked(true);
|
ui->groupFee->button((int)std::max(0, std::min(1, settings.value("nFeeRadio").toInt())))->setChecked(true);
|
||||||
ui->groupCustomFee->setId(ui->radioCustomPerKilobyte, 0);
|
|
||||||
ui->groupCustomFee->button(0)->setChecked(true);
|
|
||||||
ui->customFee->setValue(settings.value("nTransactionFee").toLongLong());
|
ui->customFee->setValue(settings.value("nTransactionFee").toLongLong());
|
||||||
ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool());
|
ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool());
|
||||||
minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool());
|
minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool());
|
||||||
@ -178,7 +172,6 @@ void SendCoinsDialog::setModel(WalletModel *_model)
|
|||||||
connect(ui->confTargetSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(coinControlUpdateLabels()));
|
connect(ui->confTargetSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(coinControlUpdateLabels()));
|
||||||
connect(ui->groupFee, SIGNAL(buttonClicked(int)), this, SLOT(updateFeeSectionControls()));
|
connect(ui->groupFee, SIGNAL(buttonClicked(int)), this, SLOT(updateFeeSectionControls()));
|
||||||
connect(ui->groupFee, SIGNAL(buttonClicked(int)), this, SLOT(coinControlUpdateLabels()));
|
connect(ui->groupFee, SIGNAL(buttonClicked(int)), this, SLOT(coinControlUpdateLabels()));
|
||||||
connect(ui->groupCustomFee, SIGNAL(buttonClicked(int)), this, SLOT(coinControlUpdateLabels()));
|
|
||||||
connect(ui->customFee, SIGNAL(valueChanged()), this, SLOT(coinControlUpdateLabels()));
|
connect(ui->customFee, SIGNAL(valueChanged()), this, SLOT(coinControlUpdateLabels()));
|
||||||
connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(setMinimumFee()));
|
connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(setMinimumFee()));
|
||||||
connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(updateFeeSectionControls()));
|
connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(updateFeeSectionControls()));
|
||||||
@ -214,7 +207,6 @@ SendCoinsDialog::~SendCoinsDialog()
|
|||||||
QSettings settings;
|
QSettings settings;
|
||||||
settings.setValue("fFeeSectionMinimized", fFeeMinimized);
|
settings.setValue("fFeeSectionMinimized", fFeeMinimized);
|
||||||
settings.setValue("nFeeRadio", ui->groupFee->checkedId());
|
settings.setValue("nFeeRadio", ui->groupFee->checkedId());
|
||||||
settings.setValue("nCustomFeeRadio", ui->groupCustomFee->checkedId());
|
|
||||||
settings.setValue("nConfTarget", getConfTargetForIndex(ui->confTargetSelector->currentIndex()));
|
settings.setValue("nConfTarget", getConfTargetForIndex(ui->confTargetSelector->currentIndex()));
|
||||||
settings.setValue("nTransactionFee", (qint64)ui->customFee->value());
|
settings.setValue("nTransactionFee", (qint64)ui->customFee->value());
|
||||||
settings.setValue("fPayOnlyMinFee", ui->checkBoxMinimumFee->isChecked());
|
settings.setValue("fPayOnlyMinFee", ui->checkBoxMinimumFee->isChecked());
|
||||||
@ -609,7 +601,6 @@ void SendCoinsDialog::on_buttonMinimizeFee_clicked()
|
|||||||
|
|
||||||
void SendCoinsDialog::setMinimumFee()
|
void SendCoinsDialog::setMinimumFee()
|
||||||
{
|
{
|
||||||
ui->radioCustomPerKilobyte->setChecked(true);
|
|
||||||
ui->customFee->setValue(GetRequiredFee(1000));
|
ui->customFee->setValue(GetRequiredFee(1000));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -622,7 +613,7 @@ void SendCoinsDialog::updateFeeSectionControls()
|
|||||||
ui->labelFeeEstimation ->setEnabled(ui->radioSmartFee->isChecked());
|
ui->labelFeeEstimation ->setEnabled(ui->radioSmartFee->isChecked());
|
||||||
ui->checkBoxMinimumFee ->setEnabled(ui->radioCustomFee->isChecked());
|
ui->checkBoxMinimumFee ->setEnabled(ui->radioCustomFee->isChecked());
|
||||||
ui->labelMinFeeWarning ->setEnabled(ui->radioCustomFee->isChecked());
|
ui->labelMinFeeWarning ->setEnabled(ui->radioCustomFee->isChecked());
|
||||||
ui->radioCustomPerKilobyte ->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked());
|
ui->labelCustomPerKilobyte ->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked());
|
||||||
ui->customFee ->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked());
|
ui->customFee ->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -634,8 +625,7 @@ void SendCoinsDialog::updateFeeMinimizedLabel()
|
|||||||
if (ui->radioSmartFee->isChecked())
|
if (ui->radioSmartFee->isChecked())
|
||||||
ui->labelFeeMinimized->setText(ui->labelSmartFee->text());
|
ui->labelFeeMinimized->setText(ui->labelSmartFee->text());
|
||||||
else {
|
else {
|
||||||
ui->labelFeeMinimized->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), ui->customFee->value()) +
|
ui->labelFeeMinimized->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), ui->customFee->value()) + "/kB");
|
||||||
((ui->radioCustomPerKilobyte->isChecked()) ? "/kB" : ""));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user