From 9769d14f037450316a54e2b4e89aa2b10ef6a5e9 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Fri, 21 Sep 2012 19:31:53 +0200 Subject: Change hotkey for "Send" button to "e" since "S" is already used for "Settings" menu Partial of upstream da9413d9134a7534369a55422cadc3fdd91ba608 --- src/qt/forms/sendcoinsdialog.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 @@ Confirm the send action - &Send + S&end -- cgit v1.2.3 From 599ec1e1153dc7ff393ebbf029d0669a6207bcbe Mon Sep 17 00:00:00 2001 From: fanquake Date: Sat, 22 Sep 2012 13:32:28 +0800 Subject: Update Bugreport Links Update Qt Links Revert Qt source link Update Qt links PARTIAL of e1eb3d4 --- src/qt/bitcoinamountfield.h | 2 +- src/qt/bitcoingui.h | 2 +- src/qt/sendcoinsdialog.h | 2 +- src/qt/sendcoinsentry.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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 313aa06c58..65340775cd 100644 --- a/src/qt/bitcoingui.h +++ b/src/qt/bitcoingui.h @@ -117,7 +117,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/sendcoinsdialog.h b/src/qt/sendcoinsdialog.h index ed56214191..d26491c517 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); -- cgit v1.2.3 From e25f0f0e53acc42e5c9611a646a3683eaad6cc39 Mon Sep 17 00:00:00 2001 From: fanquake Date: Sat, 22 Sep 2012 13:32:28 +0800 Subject: Update Bugreport Links Update Qt Links Revert Qt source link Update Qt links PARTIAL of e1eb3d4 --- src/qt/bitcoinamountfield.h | 2 +- src/qt/bitcoingui.h | 2 +- src/qt/sendcoinsdialog.h | 2 +- src/qt/sendcoinsentry.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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 8bc30d3405..d22b8b2471 100644 --- a/src/qt/bitcoingui.h +++ b/src/qt/bitcoingui.h @@ -121,7 +121,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/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); -- cgit v1.2.3 From 207ef3008c28be30fb8ef2b50999d885f7c329c4 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Sat, 22 Sep 2012 12:15:41 +0200 Subject: additional fix for #1843 - a shortcut on "receive coins" was used twice --- src/qt/forms/addressbookpage.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 @@ Sign a message to prove you own this address - &Sign Message + Sign &Message -- cgit v1.2.3 From cc57473222b8647d091b6aa9da4a000a11e5a221 Mon Sep 17 00:00:00 2001 From: xanatos Date: Fri, 28 Sep 2012 14:57:07 +0300 Subject: toHTML won't add empty wtx.mapValue elements As the code was before, toHTML added empty elements to mapValue to check for their existance. Now first it check for their existance and then for their non-emptiness. Removed a duplicated identical if There are two equal ifs, one inside another. If the first one is true, then the second one is true. --- src/qt/transactiondesc.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp index 6ca3ac8c4b..529a9d6ca1 100644 --- a/src/qt/transactiondesc.cpp +++ b/src/qt/transactiondesc.cpp @@ -82,11 +82,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: ") + HtmlEscape(wtx.mapValue["from"]) + "
"; + strHTML += tr("From: ") + HtmlEscape(wtx.mapValue["from"]) + "
"; } else { @@ -123,7 +122,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"]; @@ -180,7 +179,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; @@ -229,9 +228,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:") + "
" + HtmlEscape(wtx.mapValue["message"], true) + "
"; - if (!wtx.mapValue["comment"].empty()) + if (wtx.mapValue.count("comment") && !wtx.mapValue["comment"].empty()) strHTML += QString("
") + tr("Comment:") + "
" + HtmlEscape(wtx.mapValue["comment"], true) + "
"; if (wtx.IsCoinBase()) -- cgit v1.2.3 From bced903ae52b63c59ffde51e5c6d5e16dad9aaf5 Mon Sep 17 00:00:00 2001 From: kjj2 Date: Sun, 30 Sep 2012 08:50:59 -0500 Subject: Add a backup warning to the encryptwallet RPC command --- src/rpc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/rpc.cpp b/src/rpc.cpp index c77c505572..67bd88c920 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -1479,7 +1479,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: CreateThread(Shutdown, NULL); - 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."; } -- cgit v1.2.3 From a7642282f6465f2d9e2091ec6279fa1db1241cf3 Mon Sep 17 00:00:00 2001 From: "Rune K. Svendsen" Date: Sun, 30 Sep 2012 11:37:45 +0200 Subject: When encrypting the wallet, warn user that old backups will become useless. Don't include HTML in translation strings. Do split the huge message over several lines. Prettier lines --- src/qt/askpassphrasedialog.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') 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.")); + "" + + 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 -- cgit v1.2.3 From 638cecee77dba4bcffb225627f63658b247709ea Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 4 Oct 2012 07:47:10 +0200 Subject: When datadir missing, show messagebox instead of printing error to stderr --- src/qt/bitcoin.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 0a48b55951..836b9f6034 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -184,7 +184,10 @@ int main(int argc, char *argv[]) // ... then bitcoin.conf: if (!ReadConfigFile(mapArgs, mapMultiArgs)) { - 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; } -- cgit v1.2.3 From d37a2fd8080cffde4ffbcb9927a66258e9fef39e Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 4 Oct 2012 07:56:57 +0200 Subject: Send --help message to stdout i.s.o stderr This allows fun stuff such as `bitcoin --help | less`, and more easy piping to files. Looking at other tools such as bash, gcc, they all send their help text to stdout. --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/init.cpp b/src/init.cpp index c6712fa715..5faa604394 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -232,7 +232,7 @@ bool AppInit2(int argc, char* argv[]) #else // Remove tabs strUsage.erase(std::remove(strUsage.begin(), strUsage.end(), '\t'), strUsage.end()); - fprintf(stderr, "%s", strUsage.c_str()); + fprintf(stdout, "%s", strUsage.c_str()); #endif return false; } -- cgit v1.2.3 From b3f8f6ab9409d3e901d22c09b0346a5a47779496 Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Thu, 4 Oct 2012 16:35:08 -0400 Subject: Avoid crashes at shutdown due to printf() in global destructors. --- src/util.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/util.cpp b/src/util.cpp index 49415fc3b7..62fa4c0575 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -194,8 +194,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) -- cgit v1.2.3