X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fnoui.h;h=4ae57365a6cc3bc9c82b71e5acf4dec2dfd995f9;hb=7cfbe1fee465e82ddbdc8ed17dfcce791bd765f5;hp=d0072df7f22942b765051790045c0679be08a8cb;hpb=e8ef3da7133dd9fc411fa8b3cc8b8fc2f9c58a98;p=novacoin.git diff --git a/src/noui.h b/src/noui.h index d0072df..4ae5736 100644 --- a/src/noui.h +++ b/src/noui.h @@ -1,14 +1,14 @@ // Copyright (c) 2010 Satoshi Nakamoto +// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_NOUI_H #define BITCOIN_NOUI_H #include -#include #include "wallet.h" +#include "init.h" -typedef void wxWindow; #define wxYES 0x00000002 #define wxOK 0x00000004 #define wxNO 0x00000008 @@ -35,35 +35,42 @@ typedef void wxWindow; #define wxHELP 0x00008000 #define wxMORE 0x00010000 #define wxSETUP 0x00020000 +// Force blocking, modal message box dialog (not just notification) +#define wxMODAL 0x00040000 -inline int MyMessageBox(const std::string& message, const std::string& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1) +inline int ThreadSafeMessageBox(const std::string& message, const std::string& caption, int style=wxOK) { printf("%s: %s\n", caption.c_str(), message.c_str()); fprintf(stderr, "%s: %s\n", caption.c_str(), message.c_str()); return 4; } -#define wxMessageBox MyMessageBox -inline int ThreadSafeMessageBox(const std::string& message, const std::string& caption, int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1) +inline bool ThreadSafeAskFee(int64 nFeeRequired, const std::string& strCaption) { - return MyMessageBox(message, caption, style, parent, x, y); + return true; } -inline bool ThreadSafeAskFee(int64 nFeeRequired, const std::string& strCaption, wxWindow* parent) +inline void MainFrameRepaint() { - return true; } -inline void CalledSetStatusBar(const std::string& strText, int nField) +inline void AddressBookRepaint() { } -inline void UIThreadCall(boost::function0 fn) +inline void InitMessage(const std::string &message) { } -inline void MainFrameRepaint() +inline const char* _(const char* psz) +{ + return psz; +} + +inline void QueueShutdown() { + // Without UI, Shutdown can simply be started in a new thread + CreateThread(Shutdown, NULL); } #endif