diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2016-08-09 05:45:50 +0000 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2016-08-09 05:45:50 +0000 |
commit | df634908ba758232413c50e8f1f7a80d546d777b (patch) | |
tree | 92cccae378b192f5f70986d2167209cbfd24ae08 /src/ui_interface.h | |
parent | e98e3dde6a976a2c8f266ee963d6931fd4b37262 (diff) | |
parent | e4382fbef56a0e04b0ed834e8b3a3a16f81db149 (diff) | |
download | bitcoin-df634908ba758232413c50e8f1f7a80d546d777b.tar.xz |
Merge tag 'branch-0.13' into bugfix_gitdir
Diffstat (limited to 'src/ui_interface.h')
-rw-r--r-- | src/ui_interface.h | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/src/ui_interface.h b/src/ui_interface.h index 1231d5ed0b..7e6557f8e2 100644 --- a/src/ui_interface.h +++ b/src/ui_interface.h @@ -1,6 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto -// Copyright (c) 2012 The Bitcoin developers -// Distributed under the MIT/X11 software license, see the accompanying +// Copyright (c) 2012-2015 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_UI_INTERFACE_H @@ -15,6 +15,7 @@ class CBasicKeyStore; class CWallet; class uint256; +class CBlockIndex; /** General change type (added, updated, removed). */ enum ChangeType @@ -75,20 +76,19 @@ public: /** Show message box. */ boost::signals2::signal<bool (const std::string& message, const std::string& caption, unsigned int style), boost::signals2::last_value<bool> > ThreadSafeMessageBox; + /** If possible, ask the user a question. If not, falls back to ThreadSafeMessageBox(noninteractive_message, caption, style) and returns false. */ + boost::signals2::signal<bool (const std::string& message, const std::string& noninteractive_message, const std::string& caption, unsigned int style), boost::signals2::last_value<bool> > ThreadSafeQuestion; + /** Progress message during initialization. */ boost::signals2::signal<void (const std::string &message)> InitMessage; - /** Translate a message to the native language of the user. */ - boost::signals2::signal<std::string (const char* psz)> Translate; - /** Number of network connections changed. */ boost::signals2::signal<void (int newNumConnections)> NotifyNumConnectionsChanged; /** - * New, updated or cancelled alert. - * @note called with lock cs_mapAlerts held. + * Status bar alerts changed. */ - boost::signals2::signal<void (const uint256 &hash, ChangeType status)> NotifyAlertChanged; + boost::signals2::signal<void ()> NotifyAlertChanged; /** A wallet has been loaded. */ boost::signals2::signal<void (CWallet* wallet)> LoadWallet; @@ -97,19 +97,23 @@ public: boost::signals2::signal<void (const std::string &title, int nProgress)> ShowProgress; /** New block has been accepted */ - boost::signals2::signal<void (const uint256& hash)> NotifyBlockTip; + boost::signals2::signal<void (bool, const CBlockIndex *)> NotifyBlockTip; + + /** Best header has changed */ + boost::signals2::signal<void (bool, const CBlockIndex *)> NotifyHeaderTip; + + /** Banlist did change. */ + boost::signals2::signal<void (void)> BannedListChanged; }; -extern CClientUIInterface uiInterface; +/** Show warning message **/ +void InitWarning(const std::string& str); -/** - * Translation function: Call Translate signal on UI interface, which returns a boost::optional result. - * If no translation slot is registered, nothing is returned, and simply return the input. - */ -inline std::string _(const char* psz) -{ - boost::optional<std::string> rv = uiInterface.Translate(psz); - return rv ? (*rv) : psz; -} +/** Show error message **/ +bool InitError(const std::string& str); + +std::string AmountErrMsg(const char* const optname, const std::string& strValue); + +extern CClientUIInterface uiInterface; #endif // BITCOIN_UI_INTERFACE_H |