mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
[Qt] allow deletion of payment-requests in sendcoins
- this adds a delete button for insecure and secure payment requests in the sendcoins dialog - it also enables the delete button even for single and empty entries, as this is much easier to handle and doesn't need to special case single entries - big parts of the ui file were changed, because I copied the delete button and had to delete the layout too and created it from scratch (which seems to cleanup the rows and colums in the layout also, which is nice IMHO)
This commit is contained in:
@@ -75,15 +75,13 @@ void SendCoinsEntry::setModel(WalletModel *model)
|
||||
connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
|
||||
|
||||
connect(ui->payAmount, SIGNAL(textChanged()), this, SIGNAL(payAmountChanged()));
|
||||
connect(ui->deleteButton, SIGNAL(clicked()), this, SLOT(deleteClicked()));
|
||||
connect(ui->deleteButton_is, SIGNAL(clicked()), this, SLOT(deleteClicked()));
|
||||
connect(ui->deleteButton_s, SIGNAL(clicked()), this, SLOT(deleteClicked()));
|
||||
|
||||
clear();
|
||||
}
|
||||
|
||||
void SendCoinsEntry::setRemoveEnabled(bool enabled)
|
||||
{
|
||||
ui->deleteButton->setEnabled(enabled);
|
||||
}
|
||||
|
||||
void SendCoinsEntry::clear()
|
||||
{
|
||||
// clear UI elements for normal payment
|
||||
@@ -105,7 +103,7 @@ void SendCoinsEntry::clear()
|
||||
updateDisplayUnit();
|
||||
}
|
||||
|
||||
void SendCoinsEntry::on_deleteButton_clicked()
|
||||
void SendCoinsEntry::deleteClicked()
|
||||
{
|
||||
emit removeEntry(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user