aboutsummaryrefslogtreecommitdiff
path: root/src/qt/verifymessagedialog.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2012-05-14 23:15:38 -0700
committerWladimir J. van der Laan <laanwj@gmail.com>2012-05-14 23:15:38 -0700
commit790fe2e558d93572f87b7f4117a54d899903c5bf (patch)
tree6a91b9dcd7955ae8cecdf12dc78dcde5a9c1561b /src/qt/verifymessagedialog.cpp
parent2643ce97ae40d9ed6260b7d2608f7ca9181bb391 (diff)
parent34aa3112c8d3366303873fbd217e23d9cba798e4 (diff)
Merge pull request #1308 from Diapolo/polish_verifymessage
GUI: adapt user-experience from messagepage for verifymessagedialog
Diffstat (limited to 'src/qt/verifymessagedialog.cpp')
-rw-r--r--src/qt/verifymessagedialog.cpp35
1 files changed, 32 insertions, 3 deletions
diff --git a/src/qt/verifymessagedialog.cpp b/src/qt/verifymessagedialog.cpp
index 8842908718..1f82e2ac31 100644
--- a/src/qt/verifymessagedialog.cpp
+++ b/src/qt/verifymessagedialog.cpp
@@ -22,7 +22,16 @@ VerifyMessageDialog::VerifyMessageDialog(AddressTableModel *addressModel, QWidge
{
ui->setupUi(this);
+#if (QT_VERSION >= 0x040700)
+ /* Do not move this to the XML file, Qt before 4.7 will choke on it */
+ ui->lnSig->setPlaceholderText(tr("Enter Bitcoin signature"));
+ ui->lnAddress->setPlaceholderText(tr("Click \"Apply\" to obtain address"));
+#endif
+
GUIUtil::setupAddressWidget(ui->lnAddress, this);
+ ui->lnAddress->installEventFilter(this);
+
+ ui->edMessage->setFocus();
}
VerifyMessageDialog::~VerifyMessageDialog()
@@ -63,13 +72,33 @@ bool VerifyMessageDialog::checkAddress()
return true;
}
-void VerifyMessageDialog::on_buttonBox_clicked(QAbstractButton *button)
+void VerifyMessageDialog::on_verifyMessage_clicked()
{
- if(ui->buttonBox->buttonRole(button) == QDialogButtonBox::ApplyRole)
- checkAddress();
+ checkAddress();
}
void VerifyMessageDialog::on_copyToClipboard_clicked()
{
QApplication::clipboard()->setText(ui->lnAddress->text());
}
+
+void VerifyMessageDialog::on_clearButton_clicked()
+{
+ ui->edMessage->clear();
+ ui->lnSig->clear();
+ ui->lnAddress->clear();
+ ui->lblStatus->clear();
+
+ ui->edMessage->setFocus();
+}
+
+bool VerifyMessageDialog::eventFilter(QObject *object, QEvent *event)
+{
+ if(object == ui->lnAddress && (event->type() == QEvent::MouseButtonPress ||
+ event->type() == QEvent::FocusIn))
+ {
+ ui->lnAddress->selectAll();
+ return true;
+ }
+ return QDialog::eventFilter(object, event);
+}