aboutsummaryrefslogtreecommitdiff
path: root/src/qt/messagepage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/messagepage.cpp')
-rw-r--r--src/qt/messagepage.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/qt/messagepage.cpp b/src/qt/messagepage.cpp
index d658119a08..236b67bf37 100644
--- a/src/qt/messagepage.cpp
+++ b/src/qt/messagepage.cpp
@@ -24,8 +24,14 @@ MessagePage::MessagePage(QWidget *parent) :
ui(new Ui::MessagePage)
{
ui->setupUi(this);
+
+#if (QT_VERSION >= 0x040700)
+ /* Do not move this to the XML file, Qt before 4.7 will choke on it */
+ ui->signature->setPlaceholderText(tr("Click \"Sign Message\" to get signature"));
+#endif
GUIUtil::setupAddressWidget(ui->signFrom, this);
+ ui->signature->installEventFilter(this);
}
MessagePage::~MessagePage()
@@ -112,3 +118,14 @@ void MessagePage::on_clearButton_clicked()
ui->message->clear();
ui->signature->clear();
}
+
+bool MessagePage::eventFilter(QObject *object, QEvent *event)
+{
+ if(object == ui->signature && (event->type() == QEvent::MouseButtonPress ||
+ event->type() == QEvent::FocusIn))
+ {
+ ui->signature->selectAll();
+ return true;
+ }
+ return QDialog::eventFilter(object, event);
+}