mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
ui: Support wallets unloaded dynamically
This commit is contained in:
@@ -429,6 +429,10 @@ public:
|
||||
bool hdEnabled() override { return m_wallet.IsHDEnabled(); }
|
||||
OutputType getDefaultAddressType() override { return m_wallet.m_default_address_type; }
|
||||
OutputType getDefaultChangeType() override { return m_wallet.m_default_change_type; }
|
||||
std::unique_ptr<Handler> handleUnload(UnloadFn fn) override
|
||||
{
|
||||
return MakeHandler(m_wallet.NotifyUnload.connect(fn));
|
||||
}
|
||||
std::unique_ptr<Handler> handleShowProgress(ShowProgressFn fn) override
|
||||
{
|
||||
return MakeHandler(m_wallet.ShowProgress.connect(fn));
|
||||
|
||||
@@ -242,6 +242,10 @@ public:
|
||||
// Get default change type.
|
||||
virtual OutputType getDefaultChangeType() = 0;
|
||||
|
||||
//! Register handler for unload message.
|
||||
using UnloadFn = std::function<void()>;
|
||||
virtual std::unique_ptr<Handler> handleUnload(UnloadFn fn) = 0;
|
||||
|
||||
//! Register handler for show progress messages.
|
||||
using ShowProgressFn = std::function<void(const std::string& title, int progress)>;
|
||||
virtual std::unique_ptr<Handler> handleShowProgress(ShowProgressFn fn) = 0;
|
||||
|
||||
Reference in New Issue
Block a user