From: Luke Dashjr Date: Thu, 14 Jun 2012 18:21:07 +0000 (+0000) Subject: Merge branch '0.6.0.x' into 0.6.x X-Git-Tag: v0.4.0-unstable~129^2~1^2 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=5e322a72f94e3c759bb37cec37d8c066766b6072 Merge branch '0.6.0.x' into 0.6.x Conflicts: .gitignore src/bitcoinrpc.cpp src/main.cpp src/qt/bitcoingui.cpp src/ui_interface.h src/util.cpp --- 5e322a72f94e3c759bb37cec37d8c066766b6072 diff --cc .gitignore index fe93caa,95152ce..2b70e2c --- a/.gitignore +++ b/.gitignore @@@ -1,7 -1,7 +1,8 @@@ src/*.exe src/bitcoin src/bitcoind + src/test_bitcoin +src/build.h .*.swp *.*~* *.bak diff --cc src/bitcoinrpc.cpp index a954050,78812ba..3553f81 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@@ -224,9 -221,14 +224,9 @@@ Value stop(const Array& params, bool fH throw runtime_error( "stop\n" "Stop bitcoin server."); -#ifndef QT_GUI // Shutdown will take long enough that the response should get back - QueueShutdown(); - // NOTE: This should actually work with Bitcoin-Qt too now, but 0.6.0 didn't allow it + StartShutdown(); return "bitcoin server stopping"; -#else - throw runtime_error("NYI: cannot shut down GUI with RPC command"); -#endif } @@@ -2377,10 -2395,12 +2377,10 @@@ void ThreadRPCServer2(void* parg "(you do not need to remember this password)\n" "If the file does not exist, create it with owner-readable-only file permissions.\n"), strWhatAmI.c_str(), - GetConfigFile().c_str(), + GetConfigFile().string().c_str(), EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32).c_str()), _("Error"), wxOK | wxMODAL); - QueueShutdown(); -#ifndef QT_GUI + StartShutdown(); -#endif return; } @@@ -2401,10 -2426,12 +2401,10 @@@ { ThreadSafeMessageBox(strprintf(_("An error occured while setting up the RPC port %i for listening: %s"), endpoint.port(), e.what()), _("Error"), wxOK | wxMODAL); - QueueShutdown(); + StartShutdown(); return; } -#endif -#ifdef USE_SSL ssl::context context(io_service, ssl::context::sslv23); if (fUseSSL) { diff --cc src/init.h index 4826ab1,f038d7b..cc276a2 --- a/src/init.h +++ b/src/init.h @@@ -5,10 -5,9 +5,11 @@@ #ifndef BITCOIN_INIT_H #define BITCOIN_INIT_H +#include "wallet.h" + extern CWallet* pwalletMain; + void StartShutdown(); void Shutdown(void* parg); bool AppInit(int argc, char* argv[]); bool AppInit2(int argc, char* argv[]); diff --cc src/main.cpp index d236c6d,a4b0a1d..c5b0a72 --- a/src/main.cpp +++ b/src/main.cpp @@@ -1834,8 -1839,8 +1834,8 @@@ bool CheckDiskSpace(uint64 nAdditionalB string strMessage = _("Warning: Disk space is low"); strMiscWarning = strMessage; printf("*** %s\n", strMessage.c_str()); - ThreadSafeMessageBox(strMessage, "Bitcoin", wxOK | wxICON_EXCLAMATION); + ThreadSafeMessageBox(strMessage, "Bitcoin", wxOK | wxICON_EXCLAMATION | wxMODAL); - QueueShutdown(); + StartShutdown(); return false; } return true; diff --cc src/qt/bitcoin.cpp index 97a8f91,58070d4..b4f418e --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@@ -282,12 -293,9 +282,13 @@@ int main(int argc, char *argv[] app.exec(); window.hide(); + window.setClientModel(0); + window.setWalletModel(0); guiref = 0; + clientmodel = 0; + walletmodel = 0; } + // Shutdown the core and it's threads, but don't exit Bitcoin-Qt here Shutdown(NULL); } else diff --cc src/util.cpp index ef8f755,94bdba6..dca4197 --- a/src/util.cpp +++ b/src/util.cpp @@@ -26,31 -23,7 +26,32 @@@ namespace boost #include #include #include + #include +#include +#include + +#ifdef WIN32 +#ifdef _MSC_VER +#pragma warning(disable:4786) +#pragma warning(disable:4804) +#pragma warning(disable:4805) +#pragma warning(disable:4717) +#endif +#ifdef _WIN32_WINNT +#undef _WIN32_WINNT +#endif +#define _WIN32_WINNT 0x0501 +#ifdef _WIN32_IE +#undef _WIN32_IE +#endif +#define _WIN32_IE 0x0400 +#define WIN32_LEAN_AND_MEAN 1 +#ifndef NOMINMAX +#define NOMINMAX +#endif +#include "shlobj.h" +#include "shlwapi.h" +#endif using namespace std; using namespace boost;