aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2012-10-09 23:17:43 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2012-10-09 23:17:43 +0000
commit4cf9b4c6fad8e2ead715c5fbbfb023e05826a94d (patch)
treecf8d0b8d7abef0be531d4788b0653b1286136971
parent638cecee77dba4bcffb225627f63658b247709ea (diff)
parentcef36fad891fba0fd8f5aec73bb17135b7fb133a (diff)
downloadbitcoin-4cf9b4c6fad8e2ead715c5fbbfb023e05826a94d.tar.xz
Merge branch '0.5.x' into 0.6.0.x
Conflicts: src/qt/transactiondesc.cpp
-rw-r--r--bitcoin-qt.pro4
-rw-r--r--src/bitcoinrpc.cpp2
-rw-r--r--src/init.cpp2
-rw-r--r--src/qt/askpassphrasedialog.cpp11
-rw-r--r--src/qt/forms/sendcoinsdialog.ui2
-rw-r--r--src/qt/transactiondesc.cpp13
-rw-r--r--src/util.cpp10
7 files changed, 31 insertions, 13 deletions
diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro
index 59f7a4718c..4e09583c7e 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 93d4d8fd64..6510377fdf 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 116f3c1475..8aac160dda 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 2126edf0b2..cae021c982 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."));
+ "<qt>" +
+ 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.") +
+ "<br><br><b>" +
+ 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.") +
+ "</b></qt>");
QApplication::quit();
}
else
diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui
index 04cf404ae3..7eadec98b2 100644
--- a/src/qt/forms/sendcoinsdialog.ui
+++ b/src/qt/forms/sendcoinsdialog.ui
@@ -144,7 +144,7 @@
<string>Confirm the send action</string>
</property>
<property name="text">
- <string>&amp;Send</string>
+ <string>S&amp;end</string>
</property>
<property name="icon">
<iconset resource="../bitcoin.qrc">
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 089fe751b8..a91fc3880e 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -66,11 +66,10 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
{
strHTML += tr("<b>Source:</b> Generated<br>");
}
- 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("<b>From:</b> ") + GUIUtil::HtmlEscape(wtx.mapValue["from"]) + "<br>";
+ strHTML += tr("<b>From:</b> ") + GUIUtil::HtmlEscape(wtx.mapValue["from"]) + "<br>";
}
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("<br><b>") + tr("Message:") + "</b><br>" + GUIUtil::HtmlEscape(wtx.mapValue["message"], true) + "<br>";
- if (!wtx.mapValue["comment"].empty())
+ if (wtx.mapValue.count("comment") && !wtx.mapValue["comment"].empty())
strHTML += QString("<br><b>") + tr("Comment:") + "</b><br>" + GUIUtil::HtmlEscape(wtx.mapValue["comment"], true) + "<br>";
strHTML += QString("<b>") + tr("Transaction ID:") + "</b> " + wtx.GetHash().ToString().c_str() + "<br>";
diff --git a/src/util.cpp b/src/util.cpp
index b5971ec724..9c12b15677 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)