Changeset View
Changeset View
Standalone View
Standalone View
src/qt/signverifymessagedialog.cpp
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | |||||
void SignVerifyMessageDialog::setAddress_VM(const QString &address) { | void SignVerifyMessageDialog::setAddress_VM(const QString &address) { | ||||
ui->addressIn_VM->setText(address); | ui->addressIn_VM->setText(address); | ||||
ui->messageIn_VM->setFocus(); | ui->messageIn_VM->setFocus(); | ||||
} | } | ||||
void SignVerifyMessageDialog::showTab_SM(bool fShow) { | void SignVerifyMessageDialog::showTab_SM(bool fShow) { | ||||
ui->tabWidget->setCurrentIndex(0); | ui->tabWidget->setCurrentIndex(0); | ||||
if (fShow) this->show(); | if (fShow) { | ||||
this->show(); | |||||
} | |||||
} | } | ||||
void SignVerifyMessageDialog::showTab_VM(bool fShow) { | void SignVerifyMessageDialog::showTab_VM(bool fShow) { | ||||
ui->tabWidget->setCurrentIndex(1); | ui->tabWidget->setCurrentIndex(1); | ||||
if (fShow) this->show(); | if (fShow) { | ||||
this->show(); | |||||
} | |||||
} | } | ||||
void SignVerifyMessageDialog::on_addressBookButton_SM_clicked() { | void SignVerifyMessageDialog::on_addressBookButton_SM_clicked() { | ||||
if (model && model->getAddressTableModel()) { | if (model && model->getAddressTableModel()) { | ||||
AddressBookPage dlg(platformStyle, AddressBookPage::ForSelection, | AddressBookPage dlg(platformStyle, AddressBookPage::ForSelection, | ||||
AddressBookPage::ReceivingTab, this); | AddressBookPage::ReceivingTab, this); | ||||
dlg.setModel(model->getAddressTableModel()); | dlg.setModel(model->getAddressTableModel()); | ||||
if (dlg.exec()) { | if (dlg.exec()) { | ||||
setAddress_SM(dlg.getReturnValue()); | setAddress_SM(dlg.getReturnValue()); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
void SignVerifyMessageDialog::on_pasteButton_SM_clicked() { | void SignVerifyMessageDialog::on_pasteButton_SM_clicked() { | ||||
setAddress_SM(QApplication::clipboard()->text()); | setAddress_SM(QApplication::clipboard()->text()); | ||||
} | } | ||||
void SignVerifyMessageDialog::on_signMessageButton_SM_clicked() { | void SignVerifyMessageDialog::on_signMessageButton_SM_clicked() { | ||||
if (!model) return; | if (!model) { | ||||
return; | |||||
} | |||||
/* Clear old signature to ensure users don't get confused on error with an | /* Clear old signature to ensure users don't get confused on error with an | ||||
* old signature displayed */ | * old signature displayed */ | ||||
ui->signatureOut_SM->clear(); | ui->signatureOut_SM->clear(); | ||||
CTxDestination destination = DecodeDestination( | CTxDestination destination = DecodeDestination( | ||||
ui->addressIn_SM->text().toStdString(), model->getChainParams()); | ui->addressIn_SM->text().toStdString(), model->getChainParams()); | ||||
if (!IsValidDestination(destination)) { | if (!IsValidDestination(destination)) { | ||||
▲ Show 20 Lines • Show All 163 Lines • Show Last 20 Lines |