diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-05-05 00:43:27 -0700 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-05-05 00:43:27 -0700 |
commit | 4c9183e8bb6dc3faf80e301cf07c2d4d3abff405 (patch) | |
tree | a162fcffdad16049368a086e97867fcc3070fea7 | |
parent | 6672400206bc8770cb769f4a4696f714dc050041 (diff) | |
parent | 65c2ad687f4bff2721d99ff98bec8f02f0640db1 (diff) |
Merge pull request #1166 from Diapolo/signmessage_clear
add a clear all button to the sign message page (addresses #943)
-rw-r--r-- | src/qt/forms/messagepage.ui | 20 | ||||
-rw-r--r-- | src/qt/messagepage.cpp | 7 | ||||
-rw-r--r-- | src/qt/messagepage.h | 1 |
3 files changed, 25 insertions, 3 deletions
diff --git a/src/qt/forms/messagepage.ui b/src/qt/forms/messagepage.ui index ae1e062fca..3df5831db5 100644 --- a/src/qt/forms/messagepage.ui +++ b/src/qt/forms/messagepage.ui @@ -101,12 +101,12 @@ <italic>true</italic> </font> </property> - <property name="text"> - <string>Click "Sign Message" to get signature</string> - </property> <property name="readOnly"> <bool>true</bool> </property> + <property name="placeholderText"> + <string>Click "Sign Message" to get signature</string> + </property> </widget> </item> <item> @@ -140,6 +140,20 @@ </widget> </item> <item> + <widget class="QPushButton" name="clearButton"> + <property name="toolTip"> + <string>Reset all sign message fields</string> + </property> + <property name="text"> + <string>Clear all</string> + </property> + <property name="icon"> + <iconset resource="../bitcoin.qrc"> + <normaloff>:/icons/remove</normaloff>:/icons/remove</iconset> + </property> + </widget> + </item> + <item> <spacer name="horizontalSpacer"> <property name="orientation"> <enum>Qt::Horizontal</enum> diff --git a/src/qt/messagepage.cpp b/src/qt/messagepage.cpp index 18bb64fe6c..d658119a08 100644 --- a/src/qt/messagepage.cpp +++ b/src/qt/messagepage.cpp @@ -105,3 +105,10 @@ void MessagePage::on_signMessage_clicked() ui->signature->setText(QString::fromStdString(EncodeBase64(&vchSig[0], vchSig.size()))); ui->signature->setFont(GUIUtil::bitcoinAddressFont()); } + +void MessagePage::on_clearButton_clicked() +{ + ui->signFrom->clear(); + ui->message->clear(); + ui->signature->clear(); +} diff --git a/src/qt/messagepage.h b/src/qt/messagepage.h index 55e6228124..b5a38166da 100644 --- a/src/qt/messagepage.h +++ b/src/qt/messagepage.h @@ -33,6 +33,7 @@ private slots: void on_signMessage_clicked(); void on_copyToClipboard_clicked(); + void on_clearButton_clicked(); }; #endif // MESSAGEPAGE_H |