mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Bitcoin-Qt: add "send coins" to context menu in addressbook
- allows to directly select an address from the addressbook, chose "send coins" from the context menu, which sends you to sendcoins tab and fills in the selected address
This commit is contained in:
@@ -245,6 +245,26 @@ QWidget *SendCoinsDialog::setupTabChain(QWidget *prev)
|
||||
return ui->sendButton;
|
||||
}
|
||||
|
||||
void SendCoinsDialog::setAddress(const QString &address)
|
||||
{
|
||||
SendCoinsEntry *entry = 0;
|
||||
// Replace the first entry if it is still unused
|
||||
if(ui->entries->count() == 1)
|
||||
{
|
||||
SendCoinsEntry *first = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(0)->widget());
|
||||
if(first->isClear())
|
||||
{
|
||||
entry = first;
|
||||
}
|
||||
}
|
||||
if(!entry)
|
||||
{
|
||||
entry = addEntry();
|
||||
}
|
||||
|
||||
entry->setAddress(address);
|
||||
}
|
||||
|
||||
void SendCoinsDialog::pasteEntry(const SendCoinsRecipient &rv)
|
||||
{
|
||||
if(!fNewRecipientAllowed)
|
||||
|
||||
Reference in New Issue
Block a user