X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Finit.cpp;h=9d37eb3c061e9ee6bca3bb333b1ba8efbfcc04d3;hb=a20c0d0f6792acf532309eee2e9f29120c801ee4;hp=8531b2071aa51b76fa253677033d1a2372c10912;hpb=52d3a48128b66e731afd54cec7cab0a687d303cf;p=novacoin.git diff --git a/src/init.cpp b/src/init.cpp index 8531b20..9d37eb3 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -13,17 +13,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 - #ifdef WIN32 #define strncasecmp strnicmp #endif @@ -182,6 +171,7 @@ bool AppInit2(int argc, char* argv[]) " -splash \t\t " + _("Show splash screen on startup (default: 1)") + "\n" + " -datadir= \t\t " + _("Specify data directory") + "\n" + " -dbcache= \t\t " + _("Set database cache size in megabytes (default: 25)") + "\n" + + " -dblogsize= \t\t " + _("Set database disk log size in megabytes (default: 100)") + "\n" + " -timeout= \t " + _("Specify connection timeout (in milliseconds)") + "\n" + " -proxy= \t " + _("Connect through socks4 proxy") + "\n" + " -dns \t " + _("Allow DNS lookups for addnode and connect") + "\n" + @@ -232,14 +222,12 @@ bool AppInit2(int argc, char* argv[]) " -checkblocks= \t\t " + _("How many blocks to check at startup (default: 2500, 0 = all)") + "\n" + " -checklevel= \t\t " + _("How thorough the block verification is (0-6, default: 1)") + "\n"; -#ifdef USE_SSL strUsage += string() + _("\nSSL options: (see the Bitcoin Wiki for SSL setup instructions)") + "\n" + " -rpcssl \t " + _("Use OpenSSL (https) for JSON-RPC connections") + "\n" + " -rpcsslcertificatechainfile=\t " + _("Server certificate file (default: server.cert)") + "\n" + " -rpcsslprivatekeyfile= \t " + _("Server private key (default: server.pem)") + "\n" + " -rpcsslciphers= \t " + _("Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)") + "\n"; -#endif strUsage += string() + " -? \t\t " + _("This help message") + "\n"; @@ -248,7 +236,7 @@ bool AppInit2(int argc, char* argv[]) 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"); + ThreadSafeMessageBox(strUsage, _("Usage"), wxOK | wxMODAL); #else fprintf(stderr, "%s", strUsage.c_str()); #endif @@ -319,7 +307,7 @@ bool AppInit2(int argc, char* argv[]) if (!fDebug && !pszSetDataDir[0]) ShrinkDebugFile(); printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); - printf("Bitcoin version %s\n", FormatFullVersion().c_str()); + printf("Bitcoin version %s (%s)\n", FormatFullVersion().c_str(), CLIENT_DATE.c_str()); printf("Default data directory %s\n", GetDefaultDataDir().c_str()); if (GetBoolArg("-loadblockindextest")) @@ -337,7 +325,7 @@ bool AppInit2(int argc, char* argv[]) static boost::interprocess::file_lock lock(strLockFile.c_str()); if (!lock.try_lock()) { - wxMessageBox(strprintf(_("Cannot obtain a lock on data directory %s. Bitcoin is probably already running."), GetDataDir().c_str()), "Bitcoin"); + ThreadSafeMessageBox(strprintf(_("Cannot obtain a lock on data directory %s. Bitcoin is probably already running."), GetDataDir().c_str()), _("Bitcoin"), wxOK|wxMODAL); return false; } @@ -379,7 +367,7 @@ bool AppInit2(int argc, char* argv[]) { strErrors << _("Wallet needed to be rewritten: restart Bitcoin to complete") << "\n"; printf("%s", strErrors.str().c_str()); - wxMessageBox(strErrors.str(), "Bitcoin", wxOK | wxICON_ERROR); + ThreadSafeMessageBox(strErrors.str(), _("Bitcoin"), wxOK | wxICON_ERROR | wxMODAL); return false; } else @@ -451,7 +439,7 @@ bool AppInit2(int argc, char* argv[]) if (!strErrors.str().empty()) { - wxMessageBox(strErrors.str(), "Bitcoin", wxOK | wxICON_ERROR); + ThreadSafeMessageBox(strErrors.str(), _("Bitcoin"), wxOK | wxICON_ERROR | wxMODAL); return false; } @@ -507,7 +495,7 @@ bool AppInit2(int argc, char* argv[]) addrProxy = CService(mapArgs["-proxy"], 9050); if (!addrProxy.IsValid()) { - wxMessageBox(_("Invalid -proxy address"), "Bitcoin"); + ThreadSafeMessageBox(_("Invalid -proxy address"), _("Bitcoin"), wxOK | wxMODAL); return false; } } @@ -538,7 +526,7 @@ bool AppInit2(int argc, char* argv[]) std::string strError; if (!BindListenPort(strError)) { - wxMessageBox(strError, "Bitcoin"); + ThreadSafeMessageBox(strError, _("Bitcoin"), wxOK | wxMODAL); return false; } } @@ -558,11 +546,11 @@ bool AppInit2(int argc, char* argv[]) { if (!ParseMoney(mapArgs["-paytxfee"], nTransactionFee)) { - wxMessageBox(_("Invalid amount for -paytxfee="), "Bitcoin"); + ThreadSafeMessageBox(_("Invalid amount for -paytxfee="), _("Bitcoin"), wxOK | wxMODAL); return false; } if (nTransactionFee > 0.25 * COIN) - wxMessageBox(_("Warning: -paytxfee is set very high. This is the transaction fee you will pay if you send a transaction."), "Bitcoin", wxOK | wxICON_EXCLAMATION); + ThreadSafeMessageBox(_("Warning: -paytxfee is set very high. This is the transaction fee you will pay if you send a transaction."), _("Bitcoin"), wxOK | wxICON_EXCLAMATION | wxMODAL); } // @@ -574,7 +562,7 @@ bool AppInit2(int argc, char* argv[]) RandAddSeedPerfmon(); if (!CreateThread(StartNode, NULL)) - wxMessageBox(_("Error: CreateThread(StartNode) failed"), "Bitcoin"); + ThreadSafeMessageBox(_("Error: CreateThread(StartNode) failed"), _("Bitcoin"), wxOK | wxMODAL); if (fServer) CreateThread(ThreadRPCServer, NULL);