Browse Source

GUI: Receive: Remove option to reuse a previous address

This was justified by the need to "resent" an invoice, but now that we have the request history, that need should be gone.
0.16
Luke Dashjr 11 years ago
parent
commit
927f4ff5a2
  1. 22
      src/qt/forms/receivecoinsdialog.ui
  2. 22
      src/qt/receivecoinsdialog.cpp

22
src/qt/forms/receivecoinsdialog.ui

@ -28,23 +28,6 @@
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<item> <item>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="7" column="2">
<widget class="QCheckBox" name="reuseAddress">
<property name="toolTip">
<string>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</string>
</property>
<property name="text">
<string>R&amp;euse an existing receiving address (not recommended)</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="6" column="0"> <item row="6" column="0">
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="label_3">
<property name="toolTip"> <property name="toolTip">
@ -127,7 +110,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="8" column="2"> <item row="7" column="2">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QPushButton" name="receiveButton"> <widget class="QPushButton" name="receiveButton">
@ -184,7 +167,7 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="8" column="0"> <item row="7" column="0">
<widget class="QLabel" name="label_7"> <widget class="QLabel" name="label_7">
<property name="text"> <property name="text">
<string/> <string/>
@ -324,7 +307,6 @@
<tabstop>reqLabel</tabstop> <tabstop>reqLabel</tabstop>
<tabstop>reqAmount</tabstop> <tabstop>reqAmount</tabstop>
<tabstop>reqMessage</tabstop> <tabstop>reqMessage</tabstop>
<tabstop>reuseAddress</tabstop>
<tabstop>receiveButton</tabstop> <tabstop>receiveButton</tabstop>
<tabstop>clearButton</tabstop> <tabstop>clearButton</tabstop>
<tabstop>recentRequestsView</tabstop> <tabstop>recentRequestsView</tabstop>

22
src/qt/receivecoinsdialog.cpp

@ -101,7 +101,6 @@ void ReceiveCoinsDialog::clear()
ui->reqAmount->clear(); ui->reqAmount->clear();
ui->reqLabel->setText(""); ui->reqLabel->setText("");
ui->reqMessage->setText(""); ui->reqMessage->setText("");
ui->reuseAddress->setChecked(false);
updateDisplayUnit(); updateDisplayUnit();
} }
@ -130,25 +129,8 @@ void ReceiveCoinsDialog::on_receiveButton_clicked()
QString address; QString address;
QString label = ui->reqLabel->text(); QString label = ui->reqLabel->text();
if(ui->reuseAddress->isChecked()) /* Generate new receiving address */
{ address = model->getAddressTableModel()->addRow(AddressTableModel::Receive, label, "");
/* Choose existing receiving address */
AddressBookPage dlg(platformStyle, AddressBookPage::ForSelection, AddressBookPage::ReceivingTab, this);
dlg.setModel(model->getAddressTableModel());
if(dlg.exec())
{
address = dlg.getReturnValue();
if(label.isEmpty()) /* If no label provided, use the previously used label */
{
label = model->getAddressTableModel()->labelForAddress(address);
}
} else {
return;
}
} else {
/* Generate new receiving address */
address = model->getAddressTableModel()->addRow(AddressTableModel::Receive, label, "");
}
SendCoinsRecipient info(address, label, SendCoinsRecipient info(address, label,
ui->reqAmount->value(), ui->reqMessage->text()); ui->reqAmount->value(), ui->reqMessage->text());
ReceiveRequestDialog *dialog = new ReceiveRequestDialog(this); ReceiveRequestDialog *dialog = new ReceiveRequestDialog(this);

Loading…
Cancel
Save