diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2012-07-08 18:48:56 +0200 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2012-07-08 18:49:07 +0200 |
commit | ddadf791f19cce8b20910b441e98bbc9bea597ac (patch) | |
tree | 070d8ac6a706472ac42fde7157a07469ff8cc363 /src/qt/addressbookpage.cpp | |
parent | ea53f183fce65619dbedca54c1aa7e4dba1daa32 (diff) |
replace some ugly code in addressbookpage.cpp
- add signals signMessage() and verifyMessage() in addressbookpage.cpp
- connect to them in bitcoingui.cpp to switch to the corresponding tab in the Sign/Verify Message dialog
- make gotoSignMessageTab() and gotoVerifyMessageTab() private slots
Diffstat (limited to 'src/qt/addressbookpage.cpp')
-rw-r--r-- | src/qt/addressbookpage.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp index e502d9bc31..7edf4b1ec6 100644 --- a/src/qt/addressbookpage.cpp +++ b/src/qt/addressbookpage.cpp @@ -190,10 +190,7 @@ void AddressBookPage::on_signMessage_clicked() addr = address.toString(); } - QObject *qoGUI = parent()->parent(); - BitcoinGUI *gui = qobject_cast<BitcoinGUI *>(qoGUI); - if (gui) - gui->gotoSignMessageTab(addr); + emit signMessage(addr); } void AddressBookPage::on_verifyMessage_clicked() @@ -208,10 +205,7 @@ void AddressBookPage::on_verifyMessage_clicked() addr = address.toString(); } - QObject *qoGUI = parent()->parent(); - BitcoinGUI *gui = qobject_cast<BitcoinGUI *>(qoGUI); - if (gui) - gui->gotoVerifyMessageTab(addr); + emit verifyMessage(addr); } void AddressBookPage::on_newAddressButton_clicked() |