From fabbf80f2f956e056e423f24318e9157367ff569 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 21 Mar 2016 18:29:17 +0100 Subject: [ui] Move InitError, InitWarning, AmountErrMsg --- src/ui_interface.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/ui_interface.cpp (limited to 'src/ui_interface.cpp') 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=: '%s'"), optname, strValue); +} -- cgit v1.2.3