1 // Copyright (c) 2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2012 The Bitcoin developers
3 // Distributed under the MIT/X11 software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
6 #include "ui_interface.h"
8 #include "bitcoinrpc.h"
12 static int noui_ThreadSafeMessageBox(const std::string& message, const std::string& caption, unsigned int style)
14 std::string strCaption;
15 // Check for usage of predefined caption
17 case CClientUIInterface::MSG_ERROR:
18 strCaption += _("Error");
20 case CClientUIInterface::MSG_WARNING:
21 strCaption += _("Warning");
23 case CClientUIInterface::MSG_INFORMATION:
24 strCaption += _("Information");
27 strCaption += caption; // Use supplied caption (can be empty)
30 printf("%s: %s\n", strCaption.c_str(), message.c_str());
31 fprintf(stderr, "%s: %s\n", strCaption.c_str(), message.c_str());
35 static bool noui_ThreadSafeAskFee(int64 /*nFeeRequired*/)
42 // Connect bitcoind signal handlers
43 uiInterface.ThreadSafeMessageBox.connect(noui_ThreadSafeMessageBox);
44 uiInterface.ThreadSafeAskFee.connect(noui_ThreadSafeAskFee);