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 000000000..c778e40a9 --- /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 From faef293cf311a1063b31f90b645cb491d0140930 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Fri, 8 Jan 2016 01:14:09 +0100 Subject: [wallet] Add high transaction fee warnings --- src/ui_interface.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/ui_interface.cpp') diff --git a/src/ui_interface.cpp b/src/ui_interface.cpp index c778e40a9..74a13e0e0 100644 --- a/src/ui_interface.cpp +++ b/src/ui_interface.cpp @@ -18,6 +18,11 @@ void InitWarning(const std::string& str) uiInterface.ThreadSafeMessageBox(str, "", CClientUIInterface::MSG_WARNING); } +std::string AmountHighWarn(const std::string& optname) +{ + return strprintf(_("%s is set very high!"), optname); +} + std::string AmountErrMsg(const char* const optname, const std::string& strValue) { return strprintf(_("Invalid amount for -%s=: '%s'"), optname, strValue); -- cgit v1.2.3