aboutsummaryrefslogtreecommitdiff
path: root/src/ui_interface.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2016-03-21 18:29:17 +0100
committerMarcoFalke <falke.marco@gmail.com>2016-04-02 15:26:21 +0200
commitfabbf80f2f956e056e423f24318e9157367ff569 (patch)
tree29cd6a37252053386a071d2a4ffcb8f9a77c0ff4 /src/ui_interface.cpp
parent30c2dd8d0598afac9319d3a813a89a682b9c0d34 (diff)
downloadbitcoin-fabbf80f2f956e056e423f24318e9157367ff569.tar.xz
[ui] Move InitError, InitWarning, AmountErrMsg
Diffstat (limited to 'src/ui_interface.cpp')
-rw-r--r--src/ui_interface.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/ui_interface.cpp b/src/ui_interface.cpp
new file mode 100644
index 0000000000..c778e40a90
--- /dev/null
+++ b/src/ui_interface.cpp
@@ -0,0 +1,24 @@
+// Copyright (c) 2010-2016 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "ui_interface.h"
+#include "util.h"
+
+CClientUIInterface uiInterface;
+
+bool InitError(const std::string& str)
+{
+ uiInterface.ThreadSafeMessageBox(str, "", CClientUIInterface::MSG_ERROR);
+ return false;
+}
+
+void InitWarning(const std::string& str)
+{
+ uiInterface.ThreadSafeMessageBox(str, "", CClientUIInterface::MSG_WARNING);
+}
+
+std::string AmountErrMsg(const char* const optname, const std::string& strValue)
+{
+ return strprintf(_("Invalid amount for -%s=<amount>: '%s'"), optname, strValue);
+}