--- a/trb e251a4a9d640580cf087f2ab78d80b92f708769d2a84e987d32cdd9bcb7e245bdffc3412dc32fca4170af126ad77742c2a668fb0f0a06c216510934a75333ced +++ b/trb e56875060ce8fd2d41c96a063ce8a21eaa93662090730a47fb25c0f7d4cde3928eb6f9008e53807ff6b99454d7bf20d340fb3eba9b3e3b589dcd31dbf6ff0997 @@ -5476,7 +5476,7 @@ #endif ############################################################################## -46344 @ ./bitcoin/src/wallet.cpp +46322 @ ./bitcoin/src/wallet.cpp ############################################################################## // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers @@ -5747,7 +5747,6 @@ if (fInsertedNew || fUpdated) if (!wtx.WriteToDisk()) return false; -#ifndef QT_GUI // If default receiving address gets used, replace it with a new one CScript scriptDefaultKey; scriptDefaultKey.SetBitcoinAddress(vchDefaultKey); @@ -5763,7 +5762,6 @@ } } } -#endif // Notify UI vWalletUpdated.push_back(hash); @@ -6895,7 +6893,7 @@ ############################################################################## -2041 @ ./bitcoin/src/headers.h +1996 @ ./bitcoin/src/headers.h ############################################################################## // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers @@ -6988,11 +6986,7 @@ #include "bignum.h" #include "base58.h" #include "main.h" -#ifdef QT_GUI -#include "qtui.h" -#else #include "noui.h" -#endif ############################################################################## 4305 @ ./bitcoin/src/protocol.h @@ -7149,7 +7143,7 @@ #endif // __INCLUDED_PROTOCOL_H__ ############################################################################## -87519 @ ./bitcoin/src/bitcoinrpc.cpp +87209 @ ./bitcoin/src/bitcoinrpc.cpp ############################################################################## // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers @@ -7316,13 +7310,9 @@ throw runtime_error( "stop\n" "Stop bitcoin server."); -#ifndef QT_GUI // Shutdown will take long enough that the response should get back CreateThread(Shutdown, NULL); return "bitcoin server stopping"; -#else - throw runtime_error("NYI: cannot shut down GUI with RPC command"); -#endif } @@ -8705,11 +8695,6 @@ if (pwalletMain->IsCrypted()) throw JSONRPCError(-15, "Error: running with an encrypted wallet, but encryptwallet was called."); -#ifdef QT_GUI - // shutting down via RPC while the GUI is running does not work (yet): - throw runtime_error("Not Yet Implemented: use GUI to encrypt wallet, not RPC command"); -#endif - // TODO: get rid of this .c_str() by implementing SecureString::operator=(std::string) // Alternately, find a way to make params[0] mlock()'d to begin with. SecureString strWalletPass; @@ -9337,9 +9322,7 @@ strWhatAmI.c_str(), GetConfigFile().c_str(), EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32).c_str()); -#ifndef QT_GUI CreateThread(Shutdown, NULL); -#endif return; } @@ -13698,7 +13681,7 @@ #endif ############################################################################## -33086 @ ./bitcoin/src/db.cpp +33064 @ ./bitcoin/src/db.cpp ############################################################################## // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers @@ -14621,9 +14604,7 @@ ssKey >> strKey; // Options -#ifndef QT_GUI if (strKey == "fGenerateBitcoins") ssValue >> fGenerateBitcoins; -#endif if (strKey == "nTransactionFee") ssValue >> nTransactionFee; if (strKey == "fLimitProcessors") ssValue >> fLimitProcessors; if (strKey == "nLimitProcessors") ssValue >> nLimitProcessors; @@ -19646,59 +19627,6 @@ !.gitignore ############################################################################## -2206 @ ./bitcoin/src/qtui.h -############################################################################## -// Copyright (c) 2010 Satoshi Nakamoto -// Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_EXTERNUI_H -#define BITCOIN_EXTERNUI_H - -#include -#include -#include "wallet.h" - -typedef void wxWindow; -#define wxYES 0x00000002 -#define wxOK 0x00000004 -#define wxNO 0x00000008 -#define wxYES_NO (wxYES|wxNO) -#define wxCANCEL 0x00000010 -#define wxAPPLY 0x00000020 -#define wxCLOSE 0x00000040 -#define wxOK_DEFAULT 0x00000000 -#define wxYES_DEFAULT 0x00000000 -#define wxNO_DEFAULT 0x00000080 -#define wxCANCEL_DEFAULT 0x80000000 -#define wxICON_EXCLAMATION 0x00000100 -#define wxICON_HAND 0x00000200 -#define wxICON_WARNING wxICON_EXCLAMATION -#define wxICON_ERROR wxICON_HAND -#define wxICON_QUESTION 0x00000400 -#define wxICON_INFORMATION 0x00000800 -#define wxICON_STOP wxICON_HAND -#define wxICON_ASTERISK wxICON_INFORMATION -#define wxICON_MASK (0x00000100|0x00000200|0x00000400|0x00000800) -#define wxFORWARD 0x00001000 -#define wxBACKWARD 0x00002000 -#define wxRESET 0x00004000 -#define wxHELP 0x00008000 -#define wxMORE 0x00010000 -#define wxSETUP 0x00020000 - -extern int MyMessageBox(const std::string& message, const std::string& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1); -#define wxMessageBox MyMessageBox -extern int ThreadSafeMessageBox(const std::string& message, const std::string& caption, int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1); -extern bool ThreadSafeAskFee(int64 nFeeRequired, const std::string& strCaption, wxWindow* parent); -extern void CalledSetStatusBar(const std::string& strText, int nField); -extern void UIThreadCall(boost::function0 fn); -extern void MainFrameRepaint(); -extern void InitMessage(const std::string &message); -extern std::string _(const char* psz); - -#endif - -############################################################################## 39360 @ ./bitcoin/src/script.cpp ############################################################################## // Copyright (c) 2009-2010 Satoshi Nakamoto @@ -20906,7 +20834,7 @@ } ############################################################################## -20625 @ ./bitcoin/src/util.h +20598 @ ./bitcoin/src/util.h ############################################################################## // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers @@ -21044,12 +20972,11 @@ return ret; } #define closesocket(s) myclosesocket(s) -#if !defined(QT_GUI) inline const char* _(const char* psz) { return psz; } -#endif + @@ -21918,7 +21845,7 @@ } ############################################################################## -18319 @ ./bitcoin/src/init.cpp +17577 @ ./bitcoin/src/init.cpp ############################################################################## // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers @@ -21934,16 +21861,6 @@ #include #include -#if defined(BITCOIN_NEED_QT_PLUGINS) && !defined(_BITCOIN_QT_PLUGINS_INCLUDED) -#define _BITCOIN_QT_PLUGINS_INCLUDED -#define __INSURE__ -#include -Q_IMPORT_PLUGIN(qcncodecs) -Q_IMPORT_PLUGIN(qjpcodecs) -Q_IMPORT_PLUGIN(qtwcodecs) -Q_IMPORT_PLUGIN(qkrcodecs) -Q_IMPORT_PLUGIN(qtaccessiblewidgets) -#endif using namespace std; using namespace boost; @@ -22013,7 +21930,7 @@ // // Start // -#if !defined(QT_GUI) + int main(int argc, char* argv[]) { bool fRet = false; @@ -22024,7 +21941,7 @@ return 1; } -#endif + bool AppInit(int argc, char* argv[]) { @@ -22128,10 +22045,7 @@ #endif #endif " -paytxfee= \t " + _("Fee per kB to add to transactions you send\n") + -#ifdef QT_GUI - " -server \t\t " + _("Accept command line and JSON-RPC commands\n") + -#endif -#if !defined(WIN32) && !defined(QT_GUI) +#if !defined(WIN32) " -daemon \t\t " + _("Run in the background as a daemon and accept commands\n") + #endif " -testnet \t\t " + _("Use the test network\n") + @@ -22163,19 +22077,14 @@ // Remove tabs strUsage.erase(std::remove(strUsage.begin(), strUsage.end(), '\t'), strUsage.end()); -#if defined(QT_GUI) && defined(WIN32) - // On windows, show a message box, as there is no stderr - wxMessageBox(strUsage, "Usage"); -#else fprintf(stderr, "%s", strUsage.c_str()); -#endif return false; } fTestNet = GetBoolArg("-testnet"); fDebug = GetBoolArg("-debug"); -#if !defined(WIN32) && !defined(QT_GUI) +#if !defined(WIN32) fDaemon = GetBoolArg("-daemon"); #else fDaemon = false; @@ -22187,14 +22096,11 @@ fServer = GetBoolArg("-server"); /* force fServer when running without GUI */ -#if !defined(QT_GUI) fServer = true; -#endif fPrintToConsole = GetBoolArg("-printtoconsole"); fPrintToDebugger = GetBoolArg("-printtodebugger"); fLogTimestamps = GetBoolArg("-logtimestamps"); -#ifndef QT_GUI for (int i = 1; i < argc; i++) if (!IsSwitchChar(argv[i][0])) fCommandLine = true; @@ -22204,9 +22110,8 @@ int ret = CommandLineRPC(argc, argv); exit(ret); } -#endif -#if !defined(WIN32) && !defined(QT_GUI) +#if !defined(WIN32) if (fDaemon) { // Daemonize @@ -22463,10 +22368,8 @@ if (fServer) CreateThread(ThreadRPCServer, NULL); -#if !defined(QT_GUI) while (1) Sleep(5000); -#endif return true; }