]> Git Repo - VerusCoin.git/blob - src/noui.cpp
Merge pull request #2115 from forrestv/getblocktemplate_allfees
[VerusCoin.git] / src / noui.cpp
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.
5
6 #include "ui_interface.h"
7 #include "init.h"
8 #include "bitcoinrpc.h"
9
10 #include <string>
11
12 static int noui_ThreadSafeMessageBox(const std::string& message, const std::string& caption, unsigned int style)
13 {
14     std::string strCaption;
15     // Check for usage of predefined caption
16     switch (style) {
17     case CClientUIInterface::MSG_ERROR:
18         strCaption += _("Error");
19         break;
20     case CClientUIInterface::MSG_WARNING:
21         strCaption += _("Warning");
22         break;
23     case CClientUIInterface::MSG_INFORMATION:
24         strCaption += _("Information");
25         break;
26     default:
27         strCaption += caption; // Use supplied caption (can be empty)
28     }
29
30     printf("%s: %s\n", strCaption.c_str(), message.c_str());
31     fprintf(stderr, "%s: %s\n", strCaption.c_str(), message.c_str());
32     return 4;
33 }
34
35 static bool noui_ThreadSafeAskFee(int64 /*nFeeRequired*/)
36 {
37     return true;
38 }
39
40 void noui_connect()
41 {
42     // Connect bitcoind signal handlers
43     uiInterface.ThreadSafeMessageBox.connect(noui_ThreadSafeMessageBox);
44     uiInterface.ThreadSafeAskFee.connect(noui_ThreadSafeAskFee);
45 }
This page took 0.026542 seconds and 4 git commands to generate.