diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro
index 59f7a471..4e09583c 100644
--- a/bitcoin-qt.pro
+++ b/bitcoin-qt.pro
@@ -4,6 +4,7 @@ VERSION = 0.6.0.10
INCLUDEPATH += src src/json src/qt
DEFINES += QT_GUI BOOST_THREAD_USE_LIB
CONFIG += no_include_pwd
+CONFIG += thread
# for boost 1.37, add -mt to the boost libraries
# use: qmake BOOST_LIB_SUFFIX=-mt
@@ -317,6 +318,9 @@ macx:LIBS += -framework Foundation -framework ApplicationServices -framework App
macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0
macx:ICON = src/qt/res/icons/bitcoin.icns
macx:TARGET = "Bitcoin-Qt"
+macx:QMAKE_CFLAGS_THREAD += -pthread
+macx:QMAKE_LFLAGS_THREAD += -pthread
+macx:QMAKE_CXXFLAGS_THREAD += -pthread
# Set libraries and includes at end, to use platform-defined defaults if not overridden
INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp
index 93d4d8fd..6510377f 100644
--- a/src/bitcoinrpc.cpp
+++ b/src/bitcoinrpc.cpp
@@ -1715,7 +1715,7 @@ Value encryptwallet(const Array& params, bool fHelp)
// slack space in .dat files; that is bad if the old data is
// unencrypted private keys. So:
StartShutdown();
- return "wallet encrypted; bitcoin server stopping, restart to run with encrypted wallet";
+ return "wallet encrypted; bitcoin server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup.";
}
diff --git a/src/init.cpp b/src/init.cpp
index 116f3c14..8aac160d 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -260,7 +260,7 @@ bool AppInit2(int argc, char* argv[])
// On Windows, show a message box, as there is no stderr
wxMessageBox(strUsage, "Usage");
#else
- fprintf(stderr, "%s", strUsage.c_str());
+ fprintf(stdout, "%s", strUsage.c_str());
#endif
return false;
}
diff --git a/src/qt/askpassphrasedialog.cpp b/src/qt/askpassphrasedialog.cpp
index 2126edf0..cae021c9 100644
--- a/src/qt/askpassphrasedialog.cpp
+++ b/src/qt/askpassphrasedialog.cpp
@@ -109,7 +109,16 @@ void AskPassphraseDialog::accept()
if(model->setWalletEncrypted(true, newpass1))
{
QMessageBox::warning(this, tr("Wallet encrypted"),
- tr("Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer."));
+ "" +
+ tr("Bitcoin will close now to finish the encryption process. "
+ "Remember that encrypting your wallet cannot fully protect "
+ "your bitcoins from being stolen by malware infecting your computer.") +
+ "
" +
+ tr("IMPORTANT: Any previous backups you have made of your wallet file "
+ "should be replaced with the newly generated, encrypted wallet file. "
+ "For security reasons, previous backups of the unencrypted wallet file "
+ "will become useless as soon as you start using the new, encrypted wallet.") +
+ "");
QApplication::quit();
}
else
diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui
index 04cf404a..7eadec98 100644
--- a/src/qt/forms/sendcoinsdialog.ui
+++ b/src/qt/forms/sendcoinsdialog.ui
@@ -144,7 +144,7 @@
Confirm the send action
- &Send
+ S&end
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 089fe751..a91fc388 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -66,11 +66,10 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
{
strHTML += tr("Source: Generated
");
}
- else if (!wtx.mapValue["from"].empty())
+ else if (wtx.mapValue.count("from") && !wtx.mapValue["from"].empty())
{
// Online transaction
- if (!wtx.mapValue["from"].empty())
- strHTML += tr("From: ") + GUIUtil::HtmlEscape(wtx.mapValue["from"]) + "
";
+ strHTML += tr("From: ") + GUIUtil::HtmlEscape(wtx.mapValue["from"]) + "
";
}
else
{
@@ -107,7 +106,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
// To
//
string strAddress;
- if (!wtx.mapValue["to"].empty())
+ if (wtx.mapValue.count("to") && !wtx.mapValue["to"].empty())
{
// Online transaction
strAddress = wtx.mapValue["to"];
@@ -164,7 +163,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
if (wallet->IsMine(txout))
continue;
- if (wtx.mapValue["to"].empty())
+ if (!wtx.mapValue.count("to") || wtx.mapValue["to"].empty())
{
// Offline transaction
CBitcoinAddress address;
@@ -213,9 +212,9 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
//
// Message
//
- if (!wtx.mapValue["message"].empty())
+ if (wtx.mapValue.count("message") && !wtx.mapValue["message"].empty())
strHTML += QString("
") + tr("Message:") + "
" + GUIUtil::HtmlEscape(wtx.mapValue["message"], true) + "
";
- if (!wtx.mapValue["comment"].empty())
+ if (wtx.mapValue.count("comment") && !wtx.mapValue["comment"].empty())
strHTML += QString("
") + tr("Comment:") + "
" + GUIUtil::HtmlEscape(wtx.mapValue["comment"], true) + "
";
strHTML += QString("") + tr("Transaction ID:") + " " + wtx.GetHash().ToString().c_str() + "
";
diff --git a/src/util.cpp b/src/util.cpp
index b5971ec7..9c12b156 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -195,8 +195,14 @@ inline int OutputDebugStringF(const char* pszFormat, ...)
if (fileout)
{
static bool fStartedNewLine = true;
- static boost::mutex mutexDebugLog;
- boost::mutex::scoped_lock scoped_lock(mutexDebugLog);
+
+ // This routine may be called by global destructors during shutdown.
+ // Since the order of destruction of static/global objects is undefined,
+ // allocate mutexDebugLog on the heap the first time this routine
+ // is called to avoid crashes during shutdown.
+ static boost::mutex* mutexDebugLog = NULL;
+ if (mutexDebugLog == NULL) mutexDebugLog = new boost::mutex();
+ boost::mutex::scoped_lock scoped_lock(*mutexDebugLog);
// Debug print useful for profiling
if (fLogTimestamps && fStartedNewLine)