Changeset View
Changeset View
Standalone View
Standalone View
src/qt/receivecoinsdialog.cpp
Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | if (_model && _model->getOptionsModel()) { | ||||
connect(tableView->selectionModel(), | connect(tableView->selectionModel(), | ||||
&QItemSelectionModel::selectionChanged, this, | &QItemSelectionModel::selectionChanged, this, | ||||
&ReceiveCoinsDialog::recentRequestsView_selectionChanged); | &ReceiveCoinsDialog::recentRequestsView_selectionChanged); | ||||
// Last 2 columns are set by the columnResizingFixer, when the table | // Last 2 columns are set by the columnResizingFixer, when the table | ||||
// geometry is ready. | // geometry is ready. | ||||
columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer( | columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer( | ||||
tableView, AMOUNT_MINIMUM_COLUMN_WIDTH, DATE_COLUMN_WIDTH, this); | tableView, AMOUNT_MINIMUM_COLUMN_WIDTH, DATE_COLUMN_WIDTH, this); | ||||
// Eventually disable the main receive button if private key operations | // Set the button to be enabled or disabled based on whether the wallet | ||||
// are disabled. | // can give out new addresses. | ||||
ui->receiveButton->setEnabled(!model->privateKeysDisabled()); | ui->receiveButton->setEnabled(model->canGetAddresses()); | ||||
// Enable/disable the receive button if the wallet is now able/unable to | |||||
// give out new addresses. | |||||
connect(model, &WalletModel::canGetAddressesChanged, [this] { | |||||
ui->receiveButton->setEnabled(model->canGetAddresses()); | |||||
}); | |||||
} | } | ||||
} | } | ||||
ReceiveCoinsDialog::~ReceiveCoinsDialog() { | ReceiveCoinsDialog::~ReceiveCoinsDialog() { | ||||
delete ui; | delete ui; | ||||
} | } | ||||
void ReceiveCoinsDialog::clear() { | void ReceiveCoinsDialog::clear() { | ||||
▲ Show 20 Lines • Show All 179 Lines • Show Last 20 Lines |