aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2012-05-10 23:55:34 -0700
committerWladimir J. van der Laan <laanwj@gmail.com>2012-05-10 23:55:34 -0700
commitb66737e6dfe993a17c60fdf06a301a7fe71fa298 (patch)
tree47b4262b7f98db7639b5962fff50ffad0538e3a6 /src/qt
parentb8a5e30d9136673163555615e17098c07b4c821f (diff)
parent840470ec79c2a51c1d03fb81d10f0f6e603d03dd (diff)
Merge pull request #1204 from Diapolo/messagepage_focus_placeholder
GUI messagepage: add placeholder text to address field (like in sendcoins dialog)...
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoingui.cpp12
-rw-r--r--src/qt/bitcoingui.h5
-rw-r--r--src/qt/forms/messagepage.ui2
-rw-r--r--src/qt/messagepage.cpp7
4 files changed, 13 insertions, 13 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index e6f8aec755..55672472ec 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -728,8 +728,11 @@ void BitcoinGUI::gotoSendCoinsPage()
disconnect(exportAction, SIGNAL(triggered()), 0, 0);
}
-void BitcoinGUI::gotoMessagePage()
+void BitcoinGUI::gotoMessagePage(QString addr)
{
+ if(!addr.isEmpty())
+ messagePage->setAddress(addr);
+
#ifdef FIRST_CLASS_MESSAGING
messageAction->setChecked(true);
centralWidget->setCurrentWidget(messagePage);
@@ -738,16 +741,9 @@ void BitcoinGUI::gotoMessagePage()
disconnect(exportAction, SIGNAL(triggered()), 0, 0);
#else
messagePage->show();
- messagePage->setFocus();
#endif
}
-void BitcoinGUI::gotoMessagePage(QString addr)
-{
- gotoMessagePage();
- messagePage->setAddress(addr);
-}
-
void BitcoinGUI::dragEnterEvent(QDragEnterEvent *event)
{
// Accept only URIs
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index eb4f883496..bc3c9a1dfc 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -46,7 +46,7 @@ public:
functionality.
*/
void setWalletModel(WalletModel *walletModel);
-
+
protected:
void changeEvent(QEvent *e);
void closeEvent(QCloseEvent *event);
@@ -130,8 +130,7 @@ public slots:
void askFee(qint64 nFeeRequired, bool *payFee);
void handleURI(QString strURI);
- void gotoMessagePage();
- void gotoMessagePage(QString);
+ void gotoMessagePage(QString addr = "");
private slots:
/** Switch to overview (home) page */
diff --git a/src/qt/forms/messagepage.ui b/src/qt/forms/messagepage.ui
index 512e47ad6d..7c8f3b5ad6 100644
--- a/src/qt/forms/messagepage.ui
+++ b/src/qt/forms/messagepage.ui
@@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
- <string>Message</string>
+ <string>Sign Message Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
diff --git a/src/qt/messagepage.cpp b/src/qt/messagepage.cpp
index 236b67bf37..c04d8b2c78 100644
--- a/src/qt/messagepage.cpp
+++ b/src/qt/messagepage.cpp
@@ -24,14 +24,17 @@ 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->signFrom->setPlaceholderText(tr("Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)"));
ui->signature->setPlaceholderText(tr("Click \"Sign Message\" to get signature"));
#endif
GUIUtil::setupAddressWidget(ui->signFrom, this);
ui->signature->installEventFilter(this);
+
+ ui->signFrom->setFocus();
}
MessagePage::~MessagePage()
@@ -117,6 +120,8 @@ void MessagePage::on_clearButton_clicked()
ui->signFrom->clear();
ui->message->clear();
ui->signature->clear();
+
+ ui->signFrom->setFocus();
}
bool MessagePage::eventFilter(QObject *object, QEvent *event)