aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.cpp
diff options
context:
space:
mode:
authorchromatic <[email protected]>2021-04-21 16:35:06 -0700
committerchromatic <[email protected]>2021-05-23 19:37:09 -0700
commit0565a85c7cd8df3ea3cfee2a5a9f252b870408ad (patch)
tree4006f4d38b76df9d9f5c49e3563c730478889db5 /src/qt/bitcoingui.cpp
parentMerge pull request #1976 from langerhans/1.14.4-travis-pgsql (diff)
downloaddiscoin-0565a85c7cd8df3ea3cfee2a5a9f252b870408ad.tar.xz
discoin-0565a85c7cd8df3ea3cfee2a5a9f252b870408ad.zip
Add GUI to import private keys
Addresses GH #1808. There are several possible future improvements: * add a new icon for key import * reduce duplication of code between the RPC private key importer and the GUI private key importer * improving error messages for various error states
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r--src/qt/bitcoingui.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 71c1fd355..f7e58abee 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -102,6 +102,7 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *_platformStyle, const NetworkStyle *
sendCoinsMenuAction(0),
usedSendingAddressesAction(0),
usedReceivingAddressesAction(0),
+ importPrivateKeyAction(0),
signMessageAction(0),
verifyMessageAction(0),
aboutAction(0),
@@ -392,6 +393,9 @@ void BitcoinGUI::createActions()
openAction = new QAction(platformStyle->TextColorIcon(":/icons/open"), tr("Open &URI..."), this);
openAction->setStatusTip(tr("Open a dogecoin: URI or payment request"));
+ importPrivateKeyAction = new QAction(platformStyle->TextColorIcon(":/icons/address-book"), tr("&Import Private Key..."), this);
+ importPrivateKeyAction->setStatusTip(tr("Import a Dogecoin private key"));
+
showHelpMessageAction = new QAction(platformStyle->TextColorIcon(":/icons/info"), tr("&Command-line options"), this);
showHelpMessageAction->setMenuRole(QAction::NoRole);
showHelpMessageAction->setStatusTip(tr("Show the %1 help message to get a list with possible Dogecoin command-line options").arg(tr(PACKAGE_NAME)));
@@ -418,6 +422,7 @@ void BitcoinGUI::createActions()
connect(usedReceivingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedReceivingAddresses()));
connect(openAction, SIGNAL(triggered()), this, SLOT(openClicked()));
connect(paperWalletAction, SIGNAL(triggered()), walletFrame, SLOT(printPaperWallets()));
+ connect(importPrivateKeyAction, SIGNAL(triggered()), walletFrame, SLOT(importPrivateKey()));
}
#endif // ENABLE_WALLET
@@ -445,6 +450,7 @@ void BitcoinGUI::createMenuBar()
file->addAction(verifyMessageAction);
file->addAction(paperWalletAction);
file->addSeparator();
+ file->addAction(importPrivateKeyAction);
file->addAction(usedSendingAddressesAction);
file->addAction(usedReceivingAddressesAction);
file->addSeparator();