aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2012-10-09 23:17:49 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2012-10-09 23:17:49 +0000
commit32419357747f9c13c9d934d50f7974387419c0ce (patch)
tree53785410b9b4329f1243c2927b175920366442ce /src
parent3d6adbe71a5504d77e78a8ffad5f91d11a32c065 (diff)
parent4cf9b4c6fad8e2ead715c5fbbfb023e05826a94d (diff)
downloadbitcoin-32419357747f9c13c9d934d50f7974387419c0ce.tar.xz
Merge branch '0.6.0.x' into 0.6.x
Diffstat (limited to 'src')
-rw-r--r--src/bitcoinrpc.cpp2
-rw-r--r--src/init.cpp2
-rw-r--r--src/qt/askpassphrasedialog.cpp11
-rw-r--r--src/qt/bitcoin.cpp5
-rw-r--r--src/qt/bitcoinamountfield.h2
-rw-r--r--src/qt/bitcoingui.h2
-rw-r--r--src/qt/forms/addressbookpage.ui2
-rw-r--r--src/qt/forms/sendcoinsdialog.ui2
-rw-r--r--src/qt/sendcoinsdialog.h2
-rw-r--r--src/qt/sendcoinsentry.h2
-rw-r--r--src/qt/transactiondesc.cpp13
-rw-r--r--src/util.cpp10
12 files changed, 36 insertions, 19 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp
index 15d1a7450c..af011f4437 100644
--- a/src/bitcoinrpc.cpp
+++ b/src/bitcoinrpc.cpp
@@ -1708,7 +1708,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 6b96fc6c94..f4168b1729 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -258,7 +258,7 @@ bool AppInit2(int argc, char* argv[])
// On Windows, show a message box, as there is no stderr
ThreadSafeMessageBox(strUsage, _("Usage"), wxOK | wxMODAL);
#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/bitcoin.cpp b/src/qt/bitcoin.cpp
index 21e766c9e2..5acfd1ca74 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -170,7 +170,10 @@ int main(int argc, char *argv[])
// ... then bitcoin.conf:
if (!boost::filesystem::is_directory(GetDataDir(false)))
{
- fprintf(stderr, "Error: Specified directory does not exist\n");
+ // This message can not be translated, as translation is not initialized yet
+ // (which not yet possible because lang=XX can be overridden in bitcoin.conf in the data directory)
+ QMessageBox::critical(0, "Bitcoin",
+ QString("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(mapArgs["-datadir"])));
return 1;
}
ReadConfigFile(mapArgs, mapMultiArgs);
diff --git a/src/qt/bitcoinamountfield.h b/src/qt/bitcoinamountfield.h
index ca4a888e4e..66792e00a9 100644
--- a/src/qt/bitcoinamountfield.h
+++ b/src/qt/bitcoinamountfield.h
@@ -31,7 +31,7 @@ public:
/** Make field empty and ready for new input. */
void clear();
- /** Qt messes up the tab chain by default in some cases (issue http://bugreports.qt.nokia.com/browse/QTBUG-10907),
+ /** Qt messes up the tab chain by default in some cases (issue https://bugreports.qt-project.org/browse/QTBUG-10907),
in these cases we have to set it up manually.
*/
QWidget *setupTabChain(QWidget *prev);
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index d9e0b4d87b..f66c420d53 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -119,7 +119,7 @@ public slots:
/** Asks the user whether to pay the transaction fee or to cancel the transaction.
It is currently not possible to pass a return value to another thread through
BlockingQueuedConnection, so an indirected pointer is used.
- http://bugreports.qt.nokia.com/browse/QTBUG-10440
+ https://bugreports.qt-project.org/browse/QTBUG-10440
@param[in] nFeeRequired the required fee
@param[out] payFee true to pay the fee, false to not pay the fee
diff --git a/src/qt/forms/addressbookpage.ui b/src/qt/forms/addressbookpage.ui
index e47eb57ff9..15a8f31996 100644
--- a/src/qt/forms/addressbookpage.ui
+++ b/src/qt/forms/addressbookpage.ui
@@ -96,7 +96,7 @@
<string>Sign a message to prove you own this address</string>
</property>
<property name="text">
- <string>&amp;Sign Message</string>
+ <string>Sign &amp;Message</string>
</property>
<property name="icon">
<iconset resource="../bitcoin.qrc">
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/sendcoinsdialog.h b/src/qt/sendcoinsdialog.h
index 2498a9a71e..94fa97d201 100644
--- a/src/qt/sendcoinsdialog.h
+++ b/src/qt/sendcoinsdialog.h
@@ -25,7 +25,7 @@ public:
void setModel(WalletModel *model);
- /** Set up the tab chain manually, as Qt messes up the tab chain by default in some cases (issue http://bugreports.qt.nokia.com/browse/QTBUG-10907).
+ /** Set up the tab chain manually, as Qt messes up the tab chain by default in some cases (issue https://bugreports.qt-project.org/browse/QTBUG-10907).
*/
QWidget *setupTabChain(QWidget *prev);
diff --git a/src/qt/sendcoinsentry.h b/src/qt/sendcoinsentry.h
index db6cba0d80..0ac14c1472 100644
--- a/src/qt/sendcoinsentry.h
+++ b/src/qt/sendcoinsentry.h
@@ -27,7 +27,7 @@ public:
void setValue(const SendCoinsRecipient &value);
- /** Set up the tab chain manually, as Qt messes up the tab chain by default in some cases (issue http://bugreports.qt.nokia.com/browse/QTBUG-10907).
+ /** Set up the tab chain manually, as Qt messes up the tab chain by default in some cases (issue https://bugreports.qt-project.org/browse/QTBUG-10907).
*/
QWidget *setupTabChain(QWidget *prev);
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 286cddf2a9..c6c9a08f04 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -69,11 +69,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
{
@@ -110,7 +109,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"];
@@ -167,7 +166,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;
@@ -216,9 +215,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 7ec2a82c64..8a2e0d65db 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -216,8 +216,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)