diff options
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/bitcoin.cpp | 1 | ||||
-rw-r--r-- | src/qt/createwalletdialog.cpp | 6 | ||||
-rw-r--r-- | src/qt/createwalletdialog.h | 7 | ||||
-rwxr-xr-x | src/qt/res/animation/makespinner.sh | 6 | ||||
-rw-r--r-- | src/qt/splashscreen.cpp | 1 | ||||
-rw-r--r-- | src/qt/splashscreen.h | 1 | ||||
-rw-r--r-- | src/qt/walletcontroller.cpp | 4 |
7 files changed, 16 insertions, 10 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 3f412d8f19..922aac531f 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -273,7 +273,6 @@ void BitcoinApplication::createSplashScreen(const NetworkStyle *networkStyle) // We don't hold a direct pointer to the splash screen after creation, but the splash // screen will take care of deleting itself when finish() happens. m_splash->show(); - connect(this, &BitcoinApplication::requestedInitialize, m_splash, &SplashScreen::handleLoadWallet); connect(this, &BitcoinApplication::splashFinished, m_splash, &SplashScreen::finish); connect(this, &BitcoinApplication::requestedShutdown, m_splash, &QWidget::close); } diff --git a/src/qt/createwalletdialog.cpp b/src/qt/createwalletdialog.cpp index f9a61c3e60..eba70331f8 100644 --- a/src/qt/createwalletdialog.cpp +++ b/src/qt/createwalletdialog.cpp @@ -6,7 +6,7 @@ #include <config/bitcoin-config.h> #endif -#include <external_signer.h> +#include <interfaces/node.h> #include <qt/createwalletdialog.h> #include <qt/forms/ui_createwalletdialog.h> @@ -113,7 +113,7 @@ CreateWalletDialog::~CreateWalletDialog() delete ui; } -void CreateWalletDialog::setSigners(const std::vector<ExternalSigner>& signers) +void CreateWalletDialog::setSigners(const std::vector<std::unique_ptr<interfaces::ExternalSigner>>& signers) { m_has_signers = !signers.empty(); if (m_has_signers) { @@ -126,7 +126,7 @@ void CreateWalletDialog::setSigners(const std::vector<ExternalSigner>& signers) ui->blank_wallet_checkbox->setChecked(false); ui->disable_privkeys_checkbox->setEnabled(false); ui->disable_privkeys_checkbox->setChecked(true); - const std::string label = signers[0].m_name; + const std::string label = signers[0]->getName(); ui->wallet_name_line_edit->setText(QString::fromStdString(label)); ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true); } else { diff --git a/src/qt/createwalletdialog.h b/src/qt/createwalletdialog.h index fc13cc44eb..63a5e012d8 100644 --- a/src/qt/createwalletdialog.h +++ b/src/qt/createwalletdialog.h @@ -7,7 +7,12 @@ #include <QDialog> +#include <memory> + +namespace interfaces { class ExternalSigner; +} // namespace interfaces + class WalletModel; namespace Ui { @@ -24,7 +29,7 @@ public: explicit CreateWalletDialog(QWidget* parent); virtual ~CreateWalletDialog(); - void setSigners(const std::vector<ExternalSigner>& signers); + void setSigners(const std::vector<std::unique_ptr<interfaces::ExternalSigner>>& signers); QString walletName() const; bool isEncryptWalletChecked() const; diff --git a/src/qt/res/animation/makespinner.sh b/src/qt/res/animation/makespinner.sh index 83142f5034..647ee1aed8 100755 --- a/src/qt/res/animation/makespinner.sh +++ b/src/qt/res/animation/makespinner.sh @@ -5,10 +5,10 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C -FRAMEDIR=$(dirname $0) +FRAMEDIR=$(dirname "$0") for i in {0..35} do - frame=$(printf "%03d" $i) + frame=$(printf "%03d" "$i") angle=$((i * 10)) - convert $FRAMEDIR/../src/spinner.png -background "rgba(0,0,0,0.0)" -distort SRT $angle $FRAMEDIR/spinner-$frame.png + convert "${FRAMEDIR}/../src/spinner.png" -background "rgba(0,0,0,0.0)" -distort SRT $angle "${FRAMEDIR}/spinner-${frame}.png" done diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp index 61b52fd08a..85703b3350 100644 --- a/src/qt/splashscreen.cpp +++ b/src/qt/splashscreen.cpp @@ -194,6 +194,7 @@ void SplashScreen::subscribeToCoreSignals() // Connect signals to client m_handler_init_message = m_node->handleInitMessage(std::bind(InitMessage, this, std::placeholders::_1)); m_handler_show_progress = m_node->handleShowProgress(std::bind(ShowProgress, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)); + m_handler_init_wallet = m_node->handleInitWallet([this]() { handleLoadWallet(); }); } void SplashScreen::handleLoadWallet() diff --git a/src/qt/splashscreen.h b/src/qt/splashscreen.h index 386039291c..8a5875d2a6 100644 --- a/src/qt/splashscreen.h +++ b/src/qt/splashscreen.h @@ -66,6 +66,7 @@ private: bool m_shutdown = false; std::unique_ptr<interfaces::Handler> m_handler_init_message; std::unique_ptr<interfaces::Handler> m_handler_show_progress; + std::unique_ptr<interfaces::Handler> m_handler_init_wallet; std::unique_ptr<interfaces::Handler> m_handler_load_wallet; std::list<std::unique_ptr<interfaces::Wallet>> m_connected_wallets; std::list<std::unique_ptr<interfaces::Handler>> m_connected_wallet_handlers; diff --git a/src/qt/walletcontroller.cpp b/src/qt/walletcontroller.cpp index a0ad59f12a..b9a9fcf3d1 100644 --- a/src/qt/walletcontroller.cpp +++ b/src/qt/walletcontroller.cpp @@ -280,9 +280,9 @@ void CreateWalletActivity::create() { m_create_wallet_dialog = new CreateWalletDialog(m_parent_widget); - std::vector<ExternalSigner> signers; + std::vector<std::unique_ptr<interfaces::ExternalSigner>> signers; try { - signers = node().externalSigners(); + signers = node().listExternalSigners(); } catch (const std::runtime_error& e) { QMessageBox::critical(nullptr, tr("Can't list signers"), e.what()); } |