diff options
46 files changed, 1034 insertions, 602 deletions
diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro index c1f0c452ad..112e8e9389 100644 --- a/bitcoin-qt.pro +++ b/bitcoin-qt.pro @@ -90,7 +90,7 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) { DEFINES += HAVE_BUILD_INFO } -QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-invalid-offsetof -Wno-sign-compare -Wno-unused-parameter +QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter # Input DEPENDPATH += src src/json src/qt diff --git a/src/addrman.cpp b/src/addrman.cpp index 10d005aae9..56ac9ca12c 100644 --- a/src/addrman.cpp +++ b/src/addrman.cpp @@ -102,12 +102,11 @@ CAddrInfo* CAddrMan::Create(const CAddress &addr, const CNetAddr &addrSource, in return &mapInfo[nId]; } -void CAddrMan::SwapRandom(int nRndPos1, int nRndPos2) +void CAddrMan::SwapRandom(unsigned int nRndPos1, unsigned int nRndPos2) { if (nRndPos1 == nRndPos2) return; - assert(nRndPos1 >= 0 && nRndPos2 >= 0); assert(nRndPos1 < vRandom.size() && nRndPos2 < vRandom.size()); int nId1 = vRandom[nRndPos1]; @@ -149,7 +148,7 @@ int CAddrMan::SelectTried(int nKBucket) int CAddrMan::ShrinkNew(int nUBucket) { - assert(nUBucket >= 0 && nUBucket < vvNew.size()); + assert(nUBucket >= 0 && (unsigned int)nUBucket < vvNew.size()); std::set<int> &vNew = vvNew[nUBucket]; // first look for deletable items diff --git a/src/addrman.h b/src/addrman.h index 3768614cfe..43b6d35ed8 100644 --- a/src/addrman.h +++ b/src/addrman.h @@ -204,7 +204,7 @@ protected: CAddrInfo* Create(const CAddress &addr, const CNetAddr &addrSource, int *pnId = NULL); // Swap two elements in vRandom. - void SwapRandom(int nRandomPos1, int nRandomPos2); + void SwapRandom(unsigned int nRandomPos1, unsigned int nRandomPos2); // Return position in given bucket to replace. int SelectTried(int nKBucket); diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index a324f09164..a766c4469a 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -1527,7 +1527,7 @@ Value listtransactions(const Array& params, bool fHelp) if (pacentry != 0) AcentryToJSON(*pacentry, strAccount, ret); - if (ret.size() >= (nCount+nFrom)) break; + if ((int)ret.size() >= (nCount+nFrom)) break; } // ret is newest to oldest diff --git a/src/main.cpp b/src/main.cpp index b337993cc2..98f9b71ef5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -527,7 +527,7 @@ bool CTxMemPool::accept(CTxDB& txdb, CTransaction &tx, bool fCheckInputs, return error("CTxMemPool::accept() : FetchInputs found invalid tx %s", hash.ToString().substr(0,10).c_str()); if (pfMissingInputs) *pfMissingInputs = true; - return error("CTxMemPool::accept() : FetchInputs failed %s", hash.ToString().substr(0,10).c_str()); + return false; } // Check for non-standard pay-to-script-hash in inputs @@ -594,7 +594,9 @@ bool CTxMemPool::accept(CTxDB& txdb, CTransaction &tx, bool fCheckInputs, if (ptxOld) EraseFromWallets(ptxOld->GetHash()); - printf("CTxMemPool::accept() : accepted %s\n", hash.ToString().substr(0,10).c_str()); + printf("CTxMemPool::accept() : accepted %s (poolsz %u)\n", + hash.ToString().substr(0,10).c_str(), + mapTx.size()); return true; } @@ -605,7 +607,6 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi bool CTxMemPool::addUnchecked(CTransaction &tx) { - printf("addUnchecked(): size %lu\n", mapTx.size()); // Add to memory pool without checking anything. Don't call this directly, // call CTxMemPool::accept to properly check the transaction first. { @@ -2060,7 +2061,7 @@ bool LoadExternalBlockFile(FILE* fileIn) try { CAutoFile blkdat(fileIn, SER_DISK, CLIENT_VERSION); unsigned int nPos = 0; - while (nPos != -1 && blkdat.good() && !fRequestShutdown) + while (nPos != (unsigned int)-1 && blkdat.good() && !fRequestShutdown) { unsigned char pchData[65536]; do { @@ -2068,7 +2069,7 @@ bool LoadExternalBlockFile(FILE* fileIn) int nRead = fread(pchData, 1, sizeof(pchData), blkdat); if (nRead <= 8) { - nPos = -1; + nPos = (unsigned int)-1; break; } void* nFind = memchr(pchData, pchMessageStart[0], nRead+1-sizeof(pchMessageStart)); @@ -2084,7 +2085,7 @@ bool LoadExternalBlockFile(FILE* fileIn) else nPos += sizeof(pchData) - sizeof(pchMessageStart) + 1; } while(!fRequestShutdown); - if (nPos == -1) + if (nPos == (unsigned int)-1) break; fseek(blkdat, nPos, SEEK_SET); unsigned int nSize; diff --git a/src/main.h b/src/main.h index 965100d6d4..194d9fdc66 100644 --- a/src/main.h +++ b/src/main.h @@ -36,7 +36,7 @@ static const int64 MAX_MONEY = 21000000 * COIN; inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); } static const int COINBASE_MATURITY = 100; // Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp. -static const int LOCKTIME_THRESHOLD = 500000000; // Tue Nov 5 00:53:20 1985 UTC +static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov 5 00:53:20 1985 UTC #ifdef USE_UPNP static const int fHaveUPnP = true; #else diff --git a/src/makefile.linux-mingw b/src/makefile.linux-mingw index 81934187e2..645f0a16e4 100644 --- a/src/makefile.linux-mingw +++ b/src/makefile.linux-mingw @@ -29,7 +29,7 @@ LIBS= \ DEFS=-D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB DEBUGFLAGS=-g -CFLAGS=-O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) +CFLAGS=-O2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data) diff --git a/src/makefile.mingw b/src/makefile.mingw index 917eb12fcf..bb6466954f 100644 --- a/src/makefile.mingw +++ b/src/makefile.mingw @@ -25,7 +25,7 @@ LIBS= \ DEFS=-DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB DEBUGFLAGS=-g -CFLAGS=-mthreads -O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) +CFLAGS=-mthreads -O2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data) diff --git a/src/makefile.osx b/src/makefile.osx index be95aab446..eb9ae4ba7f 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -65,7 +65,7 @@ CFLAGS = -g endif # ppc doesn't work because we don't support big-endian -CFLAGS += -Wextra -Wno-sign-compare -Wno-invalid-offsetof -Wformat-security \ +CFLAGS += -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \ $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) OBJS= \ diff --git a/src/makefile.unix b/src/makefile.unix index 90be398976..53fb1f0b8d 100644 --- a/src/makefile.unix +++ b/src/makefile.unix @@ -82,9 +82,8 @@ LIBS+= \ DEBUGFLAGS=-g -CXXFLAGS=-O2 -xCXXFLAGS=-pthread -Wall -Wextra -Wno-sign-compare -Wno-invalid-offsetof -Wno-unused-parameter -Wformat -Wformat-security \ - $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS) +CXXFLAGS=-O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \ + $(DEBUGFLAGS) $(DEFS) $(HARDENING) OBJS= \ obj/version.o \ @@ -121,26 +120,26 @@ version.cpp: obj/build.h DEFS += -DHAVE_BUILD_INFO obj/%.o: %.cpp - $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< + $(CXX) -c $(CXXFLAGS) -MMD -o $@ $< @cp $(@:%.o=%.d) $(@:%.o=%.P); \ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ rm -f $(@:%.o=%.d) bitcoind: $(OBJS:obj/%=obj/%) - $(CXX) $(xCXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) + $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) obj-test/%.o: test/%.cpp - $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -o $@ $< + $(CXX) -c $(TESTDEFS) $(CXXFLAGS) -MMD -o $@ $< @cp $(@:%.o=%.d) $(@:%.o=%.P); \ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ rm -f $(@:%.o=%.d) test_bitcoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%)) - $(CXX) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-B$(LMODE) -lboost_unit_test_framework $(LDFLAGS) $(LIBS) + $(CXX) $(CXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-B$(LMODE) -lboost_unit_test_framework $(LDFLAGS) $(LIBS) clean: -rm -f bitcoind test_bitcoin diff --git a/src/net.cpp b/src/net.cpp index 6da256a8cb..a9ac44a08e 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -716,7 +716,7 @@ void ThreadSocketHandler2(void* parg) if (nSelect == SOCKET_ERROR) { int nErr = WSAGetLastError(); - if (hSocketMax > (SOCKET) -1) + if (hSocketMax != INVALID_SOCKET) { printf("socket select error %d\n", nErr); for (unsigned int i = 0; i <= hSocketMax; i++) diff --git a/src/netbase.cpp b/src/netbase.cpp index 4fe3fb61da..48709dc5c6 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -208,9 +208,9 @@ bool static Socks5(string strDest, int port, SOCKET& hSocket) } char pszSocks5Init[] = "\5\1\0"; char *pszSocks5 = pszSocks5Init; - int nSize = sizeof(pszSocks5Init); + ssize_t nSize = sizeof(pszSocks5Init); - int ret = send(hSocket, pszSocks5, nSize, MSG_NOSIGNAL); + ssize_t ret = send(hSocket, pszSocks5, nSize, MSG_NOSIGNAL); if (ret != nSize) { closesocket(hSocket); @@ -234,7 +234,7 @@ bool static Socks5(string strDest, int port, SOCKET& hSocket) strSocks5 += static_cast<char>((port >> 8) & 0xFF); strSocks5 += static_cast<char>((port >> 0) & 0xFF); ret = send(hSocket, strSocks5.c_str(), strSocks5.size(), MSG_NOSIGNAL); - if (ret != strSocks5.size()) + if (ret != (ssize_t)strSocks5.size()) { closesocket(hSocket); return error("Error sending to proxy"); diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp index 3e55c39e04..dfc85c66d6 100644 --- a/src/qt/addressbookpage.cpp +++ b/src/qt/addressbookpage.cpp @@ -58,25 +58,34 @@ AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) : ui->signMessage->setVisible(true); break; } - ui->tableView->setTabKeyNavigation(false); - ui->tableView->setContextMenuPolicy(Qt::CustomContextMenu); // Context menu actions - QAction *copyAddressAction = new QAction(tr("Copy address"), this); - QAction *copyLabelAction = new QAction(tr("Copy label"), this); - QAction *editAction = new QAction(tr("Edit"), this); - deleteAction = new QAction(tr("Delete"), this); - + QAction *copyLabelAction = new QAction(tr("Copy &Label"), this); + QAction *copyAddressAction = new QAction(ui->copyToClipboard->text(), this); + QAction *editAction = new QAction(tr("&Edit"), this); + QAction *showQRCodeAction = new QAction(ui->showQRCode->text(), this); + QAction *signMessageAction = new QAction(ui->signMessage->text(), this); + deleteAction = new QAction(ui->deleteButton->text(), this); + + // Build context menu contextMenu = new QMenu(); contextMenu->addAction(copyAddressAction); contextMenu->addAction(copyLabelAction); contextMenu->addAction(editAction); - contextMenu->addAction(deleteAction); - + if(tab == SendingTab) + contextMenu->addAction(deleteAction); + contextMenu->addSeparator(); + contextMenu->addAction(showQRCodeAction); + if(tab == ReceivingTab) + contextMenu->addAction(signMessageAction); + + // Connect signals for context menu actions connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(on_copyToClipboard_clicked())); connect(copyLabelAction, SIGNAL(triggered()), this, SLOT(onCopyLabelAction())); connect(editAction, SIGNAL(triggered()), this, SLOT(onEditAction())); connect(deleteAction, SIGNAL(triggered()), this, SLOT(on_deleteButton_clicked())); + connect(showQRCodeAction, SIGNAL(triggered()), this, SLOT(on_showQRCode_clicked())); + connect(signMessageAction, SIGNAL(triggered()), this, SLOT(on_signMessage_clicked())); connect(ui->tableView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextualMenu(QPoint))); diff --git a/src/qt/askpassphrasedialog.cpp b/src/qt/askpassphrasedialog.cpp index 31e4040d1d..0a8ace09df 100644 --- a/src/qt/askpassphrasedialog.cpp +++ b/src/qt/askpassphrasedialog.cpp @@ -24,7 +24,6 @@ AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) : ui->passEdit1->installEventFilter(this); ui->passEdit2->installEventFilter(this); ui->passEdit3->installEventFilter(this); - ui->capsLabel->clear(); switch(mode) { @@ -215,7 +214,7 @@ bool AskPassphraseDialog::event(QEvent *event) bool AskPassphraseDialog::eventFilter(QObject *, QEvent *event) { - /* Detect Caps Lock. + /* Detect Caps Lock. * There is no good OS-independent way to check a key state in Qt, but we * can detect Caps Lock by checking for the following condition: * Shift key is down and the result is a lower case character, or diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 4a77bf9b70..91f6a56c82 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -6,6 +6,7 @@ #include "walletmodel.h" #include "optionsmodel.h" #include "guiutil.h" +#include "guiconstants.h" #include "init.h" #include "ui_interface.h" @@ -164,6 +165,9 @@ int main(int argc, char *argv[]) Q_INIT_RESOURCE(bitcoin); QApplication app(argc, argv); + // Install global event filter that makes sure that long tooltips can be word-wrapped + app.installEventFilter(new GUIUtil::ToolTipToRichTextFilter(TOOLTIP_WRAP_THRESHOLD, &app)); + // Command-line options take precedence: ParseParameters(argc, argv); diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 007f185d06..40ab4acc77 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -71,6 +71,7 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): resize(850, 550); setWindowTitle(tr("Bitcoin Wallet")); #ifndef Q_WS_MAC + qApp->setWindowIcon(QIcon(":icons/bitcoin")); setWindowIcon(QIcon(":icons/bitcoin")); #else setUnifiedTitleAndToolBarOnMac(true); @@ -209,7 +210,7 @@ void BitcoinGUI::createActions() sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2)); tabGroup->addAction(sendCoinsAction); - messageAction = new QAction(QIcon(":/icons/edit"), tr("Sign &message"), this); + messageAction = new QAction(QIcon(":/icons/edit"), tr("Sign &message..."), this); messageAction->setToolTip(tr("Prove you control an address")); #ifdef FIRST_CLASS_MESSAGING messageAction->setCheckable(true); @@ -246,12 +247,12 @@ void BitcoinGUI::createActions() toggleHideAction->setToolTip(tr("Show or hide the Bitcoin window")); exportAction = new QAction(QIcon(":/icons/export"), tr("&Export..."), this); exportAction->setToolTip(tr("Export the data in the current tab to a file")); - encryptWalletAction = new QAction(QIcon(":/icons/lock_closed"), tr("&Encrypt Wallet"), this); + encryptWalletAction = new QAction(QIcon(":/icons/lock_closed"), tr("&Encrypt Wallet..."), this); encryptWalletAction->setToolTip(tr("Encrypt or decrypt wallet")); encryptWalletAction->setCheckable(true); - backupWalletAction = new QAction(QIcon(":/icons/filesave"), tr("&Backup Wallet"), this); + backupWalletAction = new QAction(QIcon(":/icons/filesave"), tr("&Backup Wallet..."), this); backupWalletAction->setToolTip(tr("Backup wallet to another location")); - changePassphraseAction = new QAction(QIcon(":/icons/key"), tr("&Change Passphrase"), this); + changePassphraseAction = new QAction(QIcon(":/icons/key"), tr("&Change Passphrase..."), this); changePassphraseAction->setToolTip(tr("Change the passphrase used for wallet encryption")); openRPCConsoleAction = new QAction(tr("&Debug window"), this); openRPCConsoleAction->setToolTip(tr("Open debugging and diagnostic console")); @@ -324,17 +325,18 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel) { if(clientModel->isTestNet()) { - QString title_testnet = windowTitle() + QString(" ") + tr("[testnet]"); - setWindowTitle(title_testnet); + setWindowTitle(windowTitle() + QString(" ") + tr("[testnet]")); #ifndef Q_WS_MAC + qApp->setWindowIcon(QIcon(":icons/bitcoin_testnet")); setWindowIcon(QIcon(":icons/bitcoin_testnet")); #else MacDockIconHandler::instance()->setIcon(QIcon(":icons/bitcoin_testnet")); #endif if(trayIcon) { - trayIcon->setToolTip(title_testnet); + trayIcon->setToolTip(tr("Bitcoin client") + QString(" ") + tr("[testnet]")); trayIcon->setIcon(QIcon(":/icons/toolbar_testnet")); + toggleHideAction->setIcon(QIcon(":/icons/toolbar_testnet")); } } @@ -402,13 +404,14 @@ void BitcoinGUI::createTrayIcon() // Configuration of the tray icon (or dock icon) icon menu trayIconMenu->addAction(toggleHideAction); + trayIconMenu->addAction(openRPCConsoleAction); trayIconMenu->addSeparator(); trayIconMenu->addAction(messageAction); #ifndef FIRST_CLASS_MESSAGING trayIconMenu->addSeparator(); #endif - trayIconMenu->addAction(receiveCoinsAction); trayIconMenu->addAction(sendCoinsAction); + trayIconMenu->addAction(receiveCoinsAction); trayIconMenu->addSeparator(); trayIconMenu->addAction(optionsAction); #ifndef Q_WS_MAC // This is built-in on Mac @@ -562,22 +565,25 @@ void BitcoinGUI::setNumBlocks(int count) // Set icon state: spinning if catching up, tick otherwise if(secs < 90*60 && count >= nTotalBlocks) { - tooltip = tr("Up to date") + QString(".\n") + tooltip; + tooltip = tr("Up to date") + QString(".<br>") + tooltip; labelBlocksIcon->setPixmap(QIcon(":/icons/synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); } else { - tooltip = tr("Catching up...") + QString("\n") + tooltip; + tooltip = tr("Catching up...") + QString("<br>") + tooltip; labelBlocksIcon->setMovie(syncIconMovie); syncIconMovie->start(); } if(!text.isEmpty()) { - tooltip += QString("\n"); + tooltip += QString("<br>"); tooltip += tr("Last received block was generated %1.").arg(text); } + // Don't word-wrap this (fixed-width) tooltip + tooltip = QString("<nobr>") + tooltip + QString("</nobr>"); + labelBlocksIcon->setToolTip(tooltip); progressBarLabel->setToolTip(tooltip); progressBar->setToolTip(tooltip); @@ -636,7 +642,7 @@ void BitcoinGUI::askFee(qint64 nFeeRequired, bool *payFee) "Do you want to pay the fee?").arg( BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, nFeeRequired)); QMessageBox::StandardButton retval = QMessageBox::question( - this, tr("Sending..."), strMessage, + this, tr("Confirm transaction fee"), strMessage, QMessageBox::Yes|QMessageBox::Cancel, QMessageBox::Yes); *payFee = (retval == QMessageBox::Yes); } @@ -724,8 +730,11 @@ void BitcoinGUI::gotoSendCoinsPage() disconnect(exportAction, SIGNAL(triggered()), 0, 0); } -void BitcoinGUI::gotoMessagePage() +void BitcoinGUI::gotoMessagePage(QString addr) { + if(!addr.isEmpty()) + messagePage->setAddress(addr); + #ifdef FIRST_CLASS_MESSAGING messageAction->setChecked(true); centralWidget->setCurrentWidget(messagePage); @@ -734,16 +743,9 @@ void BitcoinGUI::gotoMessagePage() disconnect(exportAction, SIGNAL(triggered()), 0, 0); #else messagePage->show(); - messagePage->setFocus(); #endif } -void BitcoinGUI::gotoMessagePage(QString addr) -{ - gotoMessagePage(); - messagePage->setAddress(addr); -} - void BitcoinGUI::dragEnterEvent(QDragEnterEvent *event) { // Accept only URIs diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h index eb4f883496..bc3c9a1dfc 100644 --- a/src/qt/bitcoingui.h +++ b/src/qt/bitcoingui.h @@ -46,7 +46,7 @@ public: functionality. */ void setWalletModel(WalletModel *walletModel); - + protected: void changeEvent(QEvent *e); void closeEvent(QCloseEvent *event); @@ -130,8 +130,7 @@ public slots: void askFee(qint64 nFeeRequired, bool *payFee); void handleURI(QString strURI); - void gotoMessagePage(); - void gotoMessagePage(QString); + void gotoMessagePage(QString addr = ""); private slots: /** Switch to overview (home) page */ diff --git a/src/qt/forms/addressbookpage.ui b/src/qt/forms/addressbookpage.ui index 3ccebd40d9..bca0a8dcdb 100644 --- a/src/qt/forms/addressbookpage.ui +++ b/src/qt/forms/addressbookpage.ui @@ -29,9 +29,15 @@ </item> <item> <widget class="QTableView" name="tableView"> + <property name="contextMenuPolicy"> + <enum>Qt::CustomContextMenu</enum> + </property> <property name="toolTip"> <string>Double-click to edit address or label</string> </property> + <property name="tabKeyNavigation"> + <bool>false</bool> + </property> <property name="alternatingRowColors"> <bool>true</bool> </property> @@ -57,7 +63,7 @@ <string>Create a new address</string> </property> <property name="text"> - <string>&New Address...</string> + <string>&New Address</string> </property> <property name="icon"> <iconset resource="../bitcoin.qrc"> @@ -71,7 +77,7 @@ <string>Copy the currently selected address to the system clipboard</string> </property> <property name="text"> - <string>&Copy to Clipboard</string> + <string>&Copy Address</string> </property> <property name="icon"> <iconset resource="../bitcoin.qrc"> diff --git a/src/qt/forms/askpassphrasedialog.ui b/src/qt/forms/askpassphrasedialog.ui index 3f6b668e06..1383af7a70 100644 --- a/src/qt/forms/askpassphrasedialog.ui +++ b/src/qt/forms/askpassphrasedialog.ui @@ -23,7 +23,7 @@ </size> </property> <property name="windowTitle"> - <string>Dialog</string> + <string>Passphrase Dialog</string> </property> <layout class="QVBoxLayout" name="verticalLayout"> <item> @@ -88,13 +88,14 @@ </item> <item row="4" column="1"> <widget class="QLabel" name="capsLabel"> - <property name="styleSheet"> - <string notr="true">#capsLabel { - font: bold; -}</string> + <property name="font"> + <font> + <weight>75</weight> + <bold>true</bold> + </font> </property> <property name="text"> - <string>TextLabel</string> + <string/> </property> <property name="alignment"> <set>Qt::AlignCenter</set> diff --git a/src/qt/forms/messagepage.ui b/src/qt/forms/messagepage.ui index 512e47ad6d..7c8f3b5ad6 100644 --- a/src/qt/forms/messagepage.ui +++ b/src/qt/forms/messagepage.ui @@ -11,7 +11,7 @@ </rect> </property> <property name="windowTitle"> - <string>Message</string> + <string>Sign Message Dialog</string> </property> <layout class="QVBoxLayout" name="verticalLayout"> <item> diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui index 3cf7dd0ed3..aeace9f30d 100644 --- a/src/qt/forms/overviewpage.ui +++ b/src/qt/forms/overviewpage.ui @@ -43,8 +43,23 @@ </item> <item row="2" column="1"> <widget class="QLabel" name="labelBalance"> + <property name="font"> + <font> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="cursor"> + <cursorShape>IBeamCursor</cursorShape> + </property> + <property name="toolTip"> + <string>Your current balance</string> + </property> <property name="text"> - <string>123.456 BTC</string> + <string notr="true">123.456 BTC</string> + </property> + <property name="textInteractionFlags"> + <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> </property> </widget> </item> @@ -57,6 +72,9 @@ </item> <item row="4" column="1"> <widget class="QLabel" name="labelNumTransactions"> + <property name="toolTip"> + <string>Total number of transactions in wallet</string> + </property> <property name="text"> <string>0</string> </property> @@ -71,8 +89,23 @@ </item> <item row="3" column="1"> <widget class="QLabel" name="labelUnconfirmed"> + <property name="font"> + <font> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="cursor"> + <cursorShape>IBeamCursor</cursorShape> + </property> + <property name="toolTip"> + <string>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</string> + </property> <property name="text"> - <string>0 BTC</string> + <string notr="true">0 BTC</string> + </property> + <property name="textInteractionFlags"> + <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> </property> </widget> </item> @@ -81,6 +114,7 @@ <property name="font"> <font> <pointsize>11</pointsize> + <weight>75</weight> <bold>true</bold> </font> </property> @@ -127,6 +161,9 @@ </item> <item> <widget class="QListView" name="listTransactions"> + <property name="styleSheet"> + <string notr="true">QListView { background:transparent }</string> + </property> <property name="frameShape"> <enum>QFrame::NoFrame</enum> </property> @@ -136,6 +173,9 @@ <property name="horizontalScrollBarPolicy"> <enum>Qt::ScrollBarAlwaysOff</enum> </property> + <property name="selectionMode"> + <enum>QAbstractItemView::NoSelection</enum> + </property> </widget> </item> </layout> diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui index bde607c527..02164f76b5 100644 --- a/src/qt/forms/rpcconsole.ui +++ b/src/qt/forms/rpcconsole.ui @@ -19,9 +19,9 @@ <property name="currentIndex"> <number>0</number> </property> - <widget class="QWidget" name="tab"> + <widget class="QWidget" name="tab_info"> <attribute name="title"> - <string>Information</string> + <string>&Information</string> </attribute> <layout class="QGridLayout" name="gridLayout" columnstretch="0,1"> <property name="horizontalSpacing"> @@ -204,6 +204,42 @@ </widget> </item> <item row="11" column="0"> + <spacer name="verticalSpacer_2"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="12" column="0"> + <widget class="QLabel" name="labelDebugLogfile"> + <property name="font"> + <font> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="text"> + <string>Debug logfile</string> + </property> + </widget> + </item> + <item row="13" column="0"> + <widget class="QPushButton" name="openDebugLogfileButton"> + <property name="toolTip"> + <string>Open the Bitcoin debug logfile from the current data directory. This can take a few seconds for large logfiles.</string> + </property> + <property name="text"> + <string>&Open</string> + </property> + </widget> + </item> + <item row="14" column="0"> <spacer name="verticalSpacer"> <property name="orientation"> <enum>Qt::Vertical</enum> @@ -232,9 +268,9 @@ </item> </layout> </widget> - <widget class="QWidget" name="tab_2"> + <widget class="QWidget" name="tab_console"> <attribute name="title"> - <string>Console</string> + <string>&Console</string> </attribute> <layout class="QVBoxLayout" name="verticalLayout_3"> <property name="spacing"> diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui index 04cf404ae3..49b4580dcf 100644 --- a/src/qt/forms/sendcoinsdialog.ui +++ b/src/qt/forms/sendcoinsdialog.ui @@ -64,7 +64,7 @@ <string>Send to multiple recipients at once</string> </property> <property name="text"> - <string>&Add recipient...</string> + <string>&Add Recipient</string> </property> <property name="icon"> <iconset resource="../bitcoin.qrc"> diff --git a/src/qt/guiconstants.h b/src/qt/guiconstants.h index 0cb507501a..54e9d644fe 100644 --- a/src/qt/guiconstants.h +++ b/src/qt/guiconstants.h @@ -20,4 +20,9 @@ static const int STATUSBAR_ICONSIZE = 16; /* Transaction list -- bare address (without label) */ #define COLOR_BAREADDRESS QColor(140, 140, 140) +/* Tooltips longer than this (in characters) are converted into rich text, + so that they can be word-wrapped. + */ +static const int TOOLTIP_WRAP_THRESHOLD = 80; + #endif // GUICONSTANTS_H diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index f1e8a5f1bc..67cbc51bd0 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -2,6 +2,7 @@ #include "bitcoinaddressvalidator.h" #include "walletmodel.h" #include "bitcoinunits.h" +#include "util.h" #include <QString> #include <QDateTime> @@ -17,6 +18,24 @@ #include <QDesktopServices> #include <QThread> +#include <boost/filesystem.hpp> + +#ifdef WIN32 +#ifdef _WIN32_WINNT +#undef _WIN32_WINNT +#endif +#define _WIN32_WINNT 0x0501 +#ifdef _WIN32_IE +#undef _WIN32_IE +#endif +#define _WIN32_IE 0x0501 +#define WIN32_LEAN_AND_MEAN 1 +#ifndef NOMINMAX +#define NOMINMAX +#endif +#include "shlwapi.h" +#endif + namespace GUIUtil { QString dateTimeStr(const QDateTime &date) @@ -214,5 +233,40 @@ bool isObscured(QWidget *w) && checkPoint(QPoint(w->width()/2, w->height()/2), w)); } +void openDebugLogfile() +{ + boost::filesystem::path pathDebug = GetDataDir() / "debug.log"; + +#ifdef WIN32 + if (boost::filesystem::exists(pathDebug)) + /* Open debug.log with the associated application */ + ShellExecuteA((HWND)0, (LPCSTR)"open", (LPCSTR)pathDebug.string().c_str(), NULL, NULL, SW_SHOWNORMAL); +#endif +} + +ToolTipToRichTextFilter::ToolTipToRichTextFilter(int size_threshold, QObject *parent) : + QObject(parent), size_threshold(size_threshold) +{ + +} + +bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt) +{ + if(evt->type() == QEvent::ToolTipChange) + { + QWidget *widget = static_cast<QWidget*>(obj); + QString tooltip = widget->toolTip(); + if(!Qt::mightBeRichText(tooltip) && tooltip.size() > size_threshold) + { + // Prefix <qt/> to make sure Qt detects this as rich text + // Escape the current message as HTML and replace \n by <br> + tooltip = "<qt/>" + HtmlEscape(tooltip, true); + widget->setToolTip(tooltip); + return true; + } + } + return QObject::eventFilter(obj, evt); +} + } // namespace GUIUtil diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index ea1a4795c0..8d1a01e07e 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -2,6 +2,7 @@ #define GUIUTIL_H #include <QString> +#include <QObject> QT_BEGIN_NAMESPACE class QFont; @@ -69,6 +70,26 @@ namespace GUIUtil // Determine whether a widget is hidden behind other windows bool isObscured(QWidget *w); + // Open debug.log + void openDebugLogfile(); + + /** Qt event filter that intercepts ToolTipChange events, and replaces the tooltip with a rich text + representation if needed. This assures that Qt can word-wrap long tooltip messages. + Tooltips longer than the provided size threshold (in characters) are wrapped. + */ + class ToolTipToRichTextFilter : public QObject + { + Q_OBJECT + public: + explicit ToolTipToRichTextFilter(int size_threshold, QObject *parent = 0); + + protected: + bool eventFilter(QObject *obj, QEvent *evt); + + private: + int size_threshold; + }; + } // namespace GUIUtil #endif // GUIUTIL_H diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts index 53ba23b11c..c48de170ad 100644 --- a/src/qt/locale/bitcoin_en.ts +++ b/src/qt/locale/bitcoin_en.ts @@ -15,7 +15,7 @@ <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/aboutdialog.ui" line="91"/> + <location filename="../forms/aboutdialog.ui" line="97"/> <source>Copyright © 2009-2012 Bitcoin Developers This is experimental software. @@ -39,92 +39,82 @@ This product includes software developed by the OpenSSL Project for use in the O <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/addressbookpage.ui" line="33"/> + <location filename="../forms/addressbookpage.ui" line="36"/> <source>Double-click to edit address or label</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/addressbookpage.ui" line="57"/> + <location filename="../forms/addressbookpage.ui" line="63"/> <source>Create a new address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/addressbookpage.ui" line="60"/> - <source>&New Address...</source> + <location filename="../forms/addressbookpage.ui" line="77"/> + <source>Copy the currently selected address to the system clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/addressbookpage.ui" line="71"/> - <source>Copy the currently selected address to the system clipboard</source> + <location filename="../forms/addressbookpage.ui" line="66"/> + <source>&New Address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/addressbookpage.ui" line="74"/> - <source>&Copy to Clipboard</source> + <location filename="../forms/addressbookpage.ui" line="80"/> + <source>&Copy Address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/addressbookpage.ui" line="85"/> + <location filename="../forms/addressbookpage.ui" line="91"/> <source>Show &QR Code</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/addressbookpage.ui" line="96"/> + <location filename="../forms/addressbookpage.ui" line="102"/> <source>Sign a message to prove you own this address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/addressbookpage.ui" line="99"/> + <location filename="../forms/addressbookpage.ui" line="105"/> <source>&Sign Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/addressbookpage.ui" line="110"/> + <location filename="../forms/addressbookpage.ui" line="116"/> <source>Delete the currently selected address from the list. Only sending addresses can be deleted.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/addressbookpage.ui" line="113"/> + <location filename="../forms/addressbookpage.ui" line="119"/> <source>&Delete</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addressbookpage.cpp" line="65"/> - <source>Copy address</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../addressbookpage.cpp" line="66"/> - <source>Copy label</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../addressbookpage.cpp" line="67"/> - <source>Edit</source> + <location filename="../addressbookpage.cpp" line="63"/> + <source>Copy &Label</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addressbookpage.cpp" line="68"/> - <source>Delete</source> + <location filename="../addressbookpage.cpp" line="65"/> + <source>&Edit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addressbookpage.cpp" line="288"/> + <location filename="../addressbookpage.cpp" line="297"/> <source>Export Address Book Data</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addressbookpage.cpp" line="289"/> + <location filename="../addressbookpage.cpp" line="298"/> <source>Comma separated file (*.csv)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addressbookpage.cpp" line="302"/> + <location filename="../addressbookpage.cpp" line="311"/> <source>Error exporting</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addressbookpage.cpp" line="302"/> + <location filename="../addressbookpage.cpp" line="311"/> <source>Could not write to file %1.</source> <translation type="unfinished"></translation> </message> @@ -132,17 +122,17 @@ This product includes software developed by the OpenSSL Project for use in the O <context> <name>AddressTableModel</name> <message> - <location filename="../addresstablemodel.cpp" line="77"/> + <location filename="../addresstablemodel.cpp" line="78"/> <source>Label</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addresstablemodel.cpp" line="77"/> + <location filename="../addresstablemodel.cpp" line="78"/> <source>Address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addresstablemodel.cpp" line="113"/> + <location filename="../addresstablemodel.cpp" line="114"/> <source>(no label)</source> <translation type="unfinished"></translation> </message> @@ -288,122 +278,137 @@ Are you sure you wish to encrypt your wallet?</source> <context> <name>BitcoinGUI</name> <message> - <location filename="../bitcoingui.cpp" line="70"/> + <location filename="../bitcoingui.cpp" line="72"/> <source>Bitcoin Wallet</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="243"/> + <location filename="../bitcoingui.cpp" line="212"/> + <source>Sign &message...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../bitcoingui.cpp" line="245"/> <source>Show/Hide &Bitcoin</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="499"/> + <location filename="../bitcoingui.cpp" line="507"/> <source>Synchronizing with network...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="180"/> + <location filename="../bitcoingui.cpp" line="182"/> <source>&Overview</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="181"/> + <location filename="../bitcoingui.cpp" line="183"/> <source>Show general overview of wallet</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="186"/> + <location filename="../bitcoingui.cpp" line="188"/> <source>&Transactions</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="187"/> + <location filename="../bitcoingui.cpp" line="189"/> <source>Browse transaction history</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="192"/> + <location filename="../bitcoingui.cpp" line="194"/> <source>&Address Book</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="193"/> + <location filename="../bitcoingui.cpp" line="195"/> <source>Edit the list of stored addresses and labels</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="198"/> + <location filename="../bitcoingui.cpp" line="200"/> <source>&Receive coins</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="199"/> + <location filename="../bitcoingui.cpp" line="201"/> <source>Show the list of addresses for receiving payments</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="204"/> + <location filename="../bitcoingui.cpp" line="206"/> <source>&Send coins</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="205"/> + <location filename="../bitcoingui.cpp" line="207"/> <source>Send coins to a bitcoin address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="210"/> - <source>Sign &message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../bitcoingui.cpp" line="211"/> + <location filename="../bitcoingui.cpp" line="213"/> <source>Prove you control an address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="230"/> + <location filename="../bitcoingui.cpp" line="232"/> <source>E&xit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="231"/> + <location filename="../bitcoingui.cpp" line="233"/> <source>Quit application</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="234"/> + <location filename="../bitcoingui.cpp" line="236"/> <source>&About %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="235"/> + <location filename="../bitcoingui.cpp" line="237"/> <source>Show information about Bitcoin</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="237"/> + <location filename="../bitcoingui.cpp" line="239"/> <source>About &Qt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="238"/> + <location filename="../bitcoingui.cpp" line="240"/> <source>Show information about Qt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="240"/> + <location filename="../bitcoingui.cpp" line="242"/> <source>&Options...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="241"/> + <location filename="../bitcoingui.cpp" line="243"/> <source>Modify configuration options for bitcoin</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../bitcoingui.cpp" line="249"/> + <source>&Encrypt Wallet...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../bitcoingui.cpp" line="252"/> + <source>&Backup Wallet...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../bitcoingui.cpp" line="254"/> + <source>&Change Passphrase...</source> + <translation type="unfinished"></translation> + </message> <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="501"/> + <location filename="../bitcoingui.cpp" line="509"/> <source>~%n block(s) remaining</source> <translation> <numerusform>~%n block remaining</numerusform> @@ -411,97 +416,92 @@ Are you sure you wish to encrypt your wallet?</source> </translation> </message> <message> - <location filename="../bitcoingui.cpp" line="512"/> + <location filename="../bitcoingui.cpp" line="520"/> <source>Downloaded %1 of %2 blocks of transaction history (%3% done).</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="245"/> + <location filename="../bitcoingui.cpp" line="247"/> <source>&Export...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="244"/> + <location filename="../bitcoingui.cpp" line="246"/> <source>Show or hide the Bitcoin window</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="246"/> + <location filename="../bitcoingui.cpp" line="248"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="247"/> - <source>&Encrypt Wallet</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../bitcoingui.cpp" line="248"/> + <location filename="../bitcoingui.cpp" line="250"/> <source>Encrypt or decrypt wallet</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="250"/> - <source>&Backup Wallet</source> + <location filename="../bitcoingui.cpp" line="253"/> + <source>Backup wallet to another location</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="251"/> - <source>Backup wallet to another location</source> + <location filename="../bitcoingui.cpp" line="255"/> + <source>Change the passphrase used for wallet encryption</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="252"/> - <source>&Change Passphrase</source> + <location filename="../bitcoingui.cpp" line="256"/> + <source>&Debug window</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="253"/> - <source>Change the passphrase used for wallet encryption</source> + <location filename="../bitcoingui.cpp" line="257"/> + <source>Open debugging and diagnostic console</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="276"/> + <location filename="../bitcoingui.cpp" line="280"/> <source>&File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="285"/> + <location filename="../bitcoingui.cpp" line="289"/> <source>&Settings</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="291"/> + <location filename="../bitcoingui.cpp" line="295"/> <source>&Help</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="298"/> + <location filename="../bitcoingui.cpp" line="304"/> <source>Tabs toolbar</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="309"/> + <location filename="../bitcoingui.cpp" line="315"/> <source>Actions toolbar</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="321"/> + <location filename="../bitcoingui.cpp" line="327"/> <source>[testnet]</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="383"/> + <location filename="../bitcoingui.cpp" line="391"/> <source>Bitcoin client</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="411"/> + <location filename="../bitcoingui.cpp" line="419"/> <source>bitcoin-qt</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="475"/> + <location filename="../bitcoingui.cpp" line="483"/> <source>%n active connection(s) to Bitcoin network</source> <translation> <numerusform>%n active connection to Bitcoin network</numerusform> @@ -509,12 +509,12 @@ Are you sure you wish to encrypt your wallet?</source> </translation> </message> <message> - <location filename="../bitcoingui.cpp" line="524"/> + <location filename="../bitcoingui.cpp" line="532"/> <source>Downloaded %1 blocks of transaction history.</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="539"/> + <location filename="../bitcoingui.cpp" line="547"/> <source>%n second(s) ago</source> <translation> <numerusform>%n second ago</numerusform> @@ -522,7 +522,7 @@ Are you sure you wish to encrypt your wallet?</source> </translation> </message> <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="543"/> + <location filename="../bitcoingui.cpp" line="551"/> <source>%n minute(s) ago</source> <translation> <numerusform>%n minute ago</numerusform> @@ -530,7 +530,7 @@ Are you sure you wish to encrypt your wallet?</source> </translation> </message> <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="547"/> + <location filename="../bitcoingui.cpp" line="555"/> <source>%n hour(s) ago</source> <translation> <numerusform>%n hour ago</numerusform> @@ -538,7 +538,7 @@ Are you sure you wish to encrypt your wallet?</source> </translation> </message> <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="551"/> + <location filename="../bitcoingui.cpp" line="559"/> <source>%n day(s) ago</source> <translation> <numerusform>%n day ago</numerusform> @@ -546,42 +546,42 @@ Are you sure you wish to encrypt your wallet?</source> </translation> </message> <message> - <location filename="../bitcoingui.cpp" line="557"/> + <location filename="../bitcoingui.cpp" line="565"/> <source>Up to date</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="562"/> + <location filename="../bitcoingui.cpp" line="570"/> <source>Catching up...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="570"/> + <location filename="../bitcoingui.cpp" line="578"/> <source>Last received block was generated %1.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="626"/> + <location filename="../bitcoingui.cpp" line="634"/> <source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="631"/> - <source>Sending...</source> + <location filename="../bitcoingui.cpp" line="639"/> + <source>Confirm transaction fee</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="658"/> + <location filename="../bitcoingui.cpp" line="666"/> <source>Sent transaction</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="659"/> + <location filename="../bitcoingui.cpp" line="667"/> <source>Incoming transaction</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="660"/> + <location filename="../bitcoingui.cpp" line="668"/> <source>Date: %1 Amount: %2 Type: %3 @@ -590,51 +590,61 @@ Address: %4 <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="785"/> + <location filename="../bitcoingui.cpp" line="793"/> <source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="793"/> + <location filename="../bitcoingui.cpp" line="801"/> <source>Wallet is <b>encrypted</b> and currently <b>locked</b></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="816"/> + <location filename="../bitcoingui.cpp" line="824"/> <source>Backup Wallet</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="816"/> + <location filename="../bitcoingui.cpp" line="824"/> <source>Wallet Data (*.dat)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="819"/> + <location filename="../bitcoingui.cpp" line="827"/> <source>Backup Failed</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="819"/> + <location filename="../bitcoingui.cpp" line="827"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../bitcoin.cpp" line="127"/> + <source>A fatal error occured. Bitcoin can no longer continue safely and will quit.</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>DisplayOptionsPage</name> <message> - <location filename="../optionsdialog.cpp" line="268"/> + <location filename="../optionsdialog.cpp" line="273"/> <source>&Unit to show amounts in: </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="272"/> + <location filename="../optionsdialog.cpp" line="277"/> <source>Choose the default subdivision unit to show in the interface, and when sending coins</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="279"/> - <source>Display addresses in transaction list</source> + <location filename="../optionsdialog.cpp" line="284"/> + <source>&Display addresses in transaction list</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../optionsdialog.cpp" line="285"/> + <source>Whether to show Bitcoin addresses in the transaction list</source> <translation type="unfinished"></translation> </message> </context> @@ -709,87 +719,92 @@ Address: %4 <context> <name>MainOptionsPage</name> <message> - <location filename="../optionsdialog.cpp" line="170"/> + <location filename="../optionsdialog.cpp" line="171"/> <source>&Start Bitcoin on window system startup</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="171"/> + <location filename="../optionsdialog.cpp" line="172"/> <source>Automatically start Bitcoin after the computer is turned on</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="175"/> + <location filename="../optionsdialog.cpp" line="176"/> <source>&Minimize to the tray instead of the taskbar</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="176"/> + <location filename="../optionsdialog.cpp" line="177"/> <source>Show only a tray icon after minimizing the window</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="184"/> + <location filename="../optionsdialog.cpp" line="185"/> <source>Map port using &UPnP</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="185"/> + <location filename="../optionsdialog.cpp" line="186"/> <source>Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="179"/> + <location filename="../optionsdialog.cpp" line="180"/> <source>M&inimize on close</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="180"/> + <location filename="../optionsdialog.cpp" line="181"/> <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="188"/> + <location filename="../optionsdialog.cpp" line="189"/> <source>&Connect through SOCKS4 proxy:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="189"/> + <location filename="../optionsdialog.cpp" line="190"/> <source>Connect to the Bitcon network through a SOCKS4 proxy (e.g. when connecting through Tor)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="194"/> + <location filename="../optionsdialog.cpp" line="195"/> <source>Proxy &IP: </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="200"/> + <location filename="../optionsdialog.cpp" line="201"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="203"/> + <location filename="../optionsdialog.cpp" line="204"/> <source>&Port: </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="209"/> + <location filename="../optionsdialog.cpp" line="210"/> <source>Port of the proxy (e.g. 1234)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="215"/> - <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source> + <location filename="../optionsdialog.cpp" line="232"/> + <source>Detach databases at shutdown</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../optionsdialog.cpp" line="233"/> + <source>Detach block and address databases at shutdown. This means they can be moved to another data directory, but it slows down shutdown. The wallet is always detached.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="221"/> + <location filename="../optionsdialog.cpp" line="222"/> <source>Pay transaction &fee</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="224"/> + <location filename="../optionsdialog.cpp" line="216"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source> <translation type="unfinished"></translation> </message> @@ -837,49 +852,59 @@ Address: %4 <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/messagepage.ui" line="105"/> - <source>Click "Sign Message" to get signature</source> + <location filename="../forms/messagepage.ui" line="128"/> + <source>Copy the current signature to the system clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/messagepage.ui" line="117"/> - <source>Sign a message to prove you own this address</source> + <location filename="../forms/messagepage.ui" line="131"/> + <source>&Copy Signature</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/messagepage.ui" line="120"/> - <source>&Sign Message</source> + <location filename="../forms/messagepage.ui" line="142"/> + <source>Reset all sign message fields</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/messagepage.ui" line="131"/> - <source>Copy the currently selected address to the system clipboard</source> + <location filename="../forms/messagepage.ui" line="145"/> + <source>Clear &All</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../messagepage.cpp" line="30"/> + <source>Click "Sign Message" to get signature</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../forms/messagepage.ui" line="114"/> + <source>Sign a message to prove you own this address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/messagepage.ui" line="134"/> - <source>&Copy to Clipboard</source> + <location filename="../forms/messagepage.ui" line="117"/> + <source>&Sign Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../messagepage.cpp" line="74"/> - <location filename="../messagepage.cpp" line="89"/> - <location filename="../messagepage.cpp" line="101"/> + <location filename="../messagepage.cpp" line="79"/> + <location filename="../messagepage.cpp" line="94"/> + <location filename="../messagepage.cpp" line="106"/> <source>Error signing</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../messagepage.cpp" line="74"/> + <location filename="../messagepage.cpp" line="79"/> <source>%1 is not a valid address.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../messagepage.cpp" line="89"/> + <location filename="../messagepage.cpp" line="94"/> <source>Private key for %1 is not available.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../messagepage.cpp" line="101"/> + <location filename="../messagepage.cpp" line="106"/> <source>Sign failed</source> <translation type="unfinished"></translation> </message> @@ -887,17 +912,17 @@ Address: %4 <context> <name>OptionsDialog</name> <message> - <location filename="../optionsdialog.cpp" line="79"/> + <location filename="../optionsdialog.cpp" line="80"/> <source>Main</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="84"/> + <location filename="../optionsdialog.cpp" line="85"/> <source>Display</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="104"/> + <location filename="../optionsdialog.cpp" line="105"/> <source>Options</source> <translation type="unfinished"></translation> </message> @@ -940,16 +965,12 @@ Address: %4 <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/overviewpage.ui" line="82"/> - <source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Wallet</span></p></body></html></source> + <location filename="../forms/overviewpage.ui" line="88"/> + <source>Wallet</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/overviewpage.ui" line="122"/> + <location filename="../forms/overviewpage.ui" line="124"/> <source><b>Recent transactions</b></source> <translation type="unfinished"></translation> </message> @@ -973,7 +994,7 @@ p, li { white-space: pre-wrap; } <name>QRCodeDialog</name> <message> <location filename="../forms/qrcodedialog.ui" line="14"/> - <source>Dialog</source> + <source>QR-Code Dialog</source> <translation type="unfinished"></translation> </message> <message> @@ -1012,22 +1033,141 @@ p, li { white-space: pre-wrap; } <translation type="unfinished"></translation> </message> <message> - <location filename="../qrcodedialog.cpp" line="59"/> + <location filename="../qrcodedialog.cpp" line="46"/> + <source>Error encoding URI into QR Code.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qrcodedialog.cpp" line="64"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../qrcodedialog.cpp" line="116"/> - <source>Save Image...</source> + <location filename="../qrcodedialog.cpp" line="121"/> + <source>Save QR Code</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../qrcodedialog.cpp" line="116"/> + <location filename="../qrcodedialog.cpp" line="121"/> <source>PNG Images (*.png)</source> <translation type="unfinished"></translation> </message> </context> <context> + <name>RPCConsole</name> + <message> + <location filename="../forms/rpcconsole.ui" line="14"/> + <source>Bitcoin debug window</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../forms/rpcconsole.ui" line="24"/> + <source>Information</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../forms/rpcconsole.ui" line="33"/> + <source>Client name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../forms/rpcconsole.ui" line="40"/> + <location filename="../forms/rpcconsole.ui" line="60"/> + <location filename="../forms/rpcconsole.ui" line="106"/> + <location filename="../forms/rpcconsole.ui" line="156"/> + <location filename="../forms/rpcconsole.ui" line="176"/> + <location filename="../forms/rpcconsole.ui" line="196"/> + <location filename="../forms/rpcconsole.ui" line="229"/> + <source>N/A</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../forms/rpcconsole.ui" line="53"/> + <source>Client version</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../forms/rpcconsole.ui" line="79"/> + <source>Version</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../forms/rpcconsole.ui" line="92"/> + <source>Network</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../forms/rpcconsole.ui" line="99"/> + <source>Number of connections</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../forms/rpcconsole.ui" line="119"/> + <source>On testnet</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../forms/rpcconsole.ui" line="142"/> + <source>Block chain</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../forms/rpcconsole.ui" line="149"/> + <source>Current number of blocks</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../forms/rpcconsole.ui" line="169"/> + <source>Estimated total blocks</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../forms/rpcconsole.ui" line="189"/> + <source>Last block time</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../forms/rpcconsole.ui" line="222"/> + <source>Build date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../forms/rpcconsole.ui" line="237"/> + <source>Console</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../forms/rpcconsole.ui" line="278"/> + <source>></source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../forms/rpcconsole.ui" line="294"/> + <source>Clear console</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../rpcconsole.cpp" line="97"/> + <source>&Copy</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../rpcconsole.cpp" line="195"/> + <source>Welcome to the bitcoin RPC console.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../rpcconsole.cpp" line="196"/> + <source>Use up and down arrows to navigate history, and Ctrl-L to clear screen.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../rpcconsole.cpp" line="197"/> + <source>Type "help" for an overview of available commands.</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="14"/> @@ -1048,7 +1188,7 @@ p, li { white-space: pre-wrap; } </message> <message> <location filename="../forms/sendcoinsdialog.ui" line="67"/> - <source>&Add recipient...</source> + <source>&Add Recipient</source> <translation type="unfinished"></translation> </message> <message> @@ -1156,7 +1296,7 @@ p, li { white-space: pre-wrap; } </message> <message> <location filename="../forms/sendcoinsentry.ui" line="66"/> - <location filename="../sendcoinsentry.cpp" line="26"/> + <location filename="../sendcoinsentry.cpp" line="25"/> <source>Enter a label for this address to add it to your address book</source> <translation type="unfinished"></translation> </message> @@ -1196,7 +1336,7 @@ p, li { white-space: pre-wrap; } <translation type="unfinished"></translation> </message> <message> - <location filename="../sendcoinsentry.cpp" line="25"/> + <location filename="../sendcoinsentry.cpp" line="26"/> <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation type="unfinished"></translation> </message> @@ -1204,140 +1344,140 @@ p, li { white-space: pre-wrap; } <context> <name>TransactionDesc</name> <message> - <location filename="../transactiondesc.cpp" line="18"/> + <location filename="../transactiondesc.cpp" line="20"/> <source>Open for %1 blocks</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="20"/> + <location filename="../transactiondesc.cpp" line="22"/> <source>Open until %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="26"/> + <location filename="../transactiondesc.cpp" line="28"/> <source>%1/offline?</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="28"/> + <location filename="../transactiondesc.cpp" line="30"/> <source>%1/unconfirmed</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="30"/> + <location filename="../transactiondesc.cpp" line="32"/> <source>%1 confirmations</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="48"/> + <location filename="../transactiondesc.cpp" line="50"/> <source><b>Status:</b> </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="53"/> + <location filename="../transactiondesc.cpp" line="55"/> <source>, has not been successfully broadcast yet</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="55"/> + <location filename="../transactiondesc.cpp" line="57"/> <source>, broadcast through %1 node</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="57"/> + <location filename="../transactiondesc.cpp" line="59"/> <source>, broadcast through %1 nodes</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="61"/> + <location filename="../transactiondesc.cpp" line="63"/> <source><b>Date:</b> </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="68"/> + <location filename="../transactiondesc.cpp" line="70"/> <source><b>Source:</b> Generated<br></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="74"/> - <location filename="../transactiondesc.cpp" line="91"/> + <location filename="../transactiondesc.cpp" line="76"/> + <location filename="../transactiondesc.cpp" line="93"/> <source><b>From:</b> </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="91"/> + <location filename="../transactiondesc.cpp" line="93"/> <source>unknown</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="92"/> - <location filename="../transactiondesc.cpp" line="115"/> - <location filename="../transactiondesc.cpp" line="174"/> + <location filename="../transactiondesc.cpp" line="94"/> + <location filename="../transactiondesc.cpp" line="117"/> + <location filename="../transactiondesc.cpp" line="176"/> <source><b>To:</b> </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="95"/> + <location filename="../transactiondesc.cpp" line="97"/> <source> (yours, label: </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="97"/> + <location filename="../transactiondesc.cpp" line="99"/> <source> (yours)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="132"/> - <location filename="../transactiondesc.cpp" line="146"/> - <location filename="../transactiondesc.cpp" line="191"/> - <location filename="../transactiondesc.cpp" line="208"/> + <location filename="../transactiondesc.cpp" line="134"/> + <location filename="../transactiondesc.cpp" line="148"/> + <location filename="../transactiondesc.cpp" line="193"/> + <location filename="../transactiondesc.cpp" line="210"/> <source><b>Credit:</b> </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="134"/> + <location filename="../transactiondesc.cpp" line="136"/> <source>(%1 matures in %2 more blocks)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="138"/> + <location filename="../transactiondesc.cpp" line="140"/> <source>(not accepted)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="182"/> - <location filename="../transactiondesc.cpp" line="190"/> - <location filename="../transactiondesc.cpp" line="205"/> + <location filename="../transactiondesc.cpp" line="184"/> + <location filename="../transactiondesc.cpp" line="192"/> + <location filename="../transactiondesc.cpp" line="207"/> <source><b>Debit:</b> </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="196"/> + <location filename="../transactiondesc.cpp" line="198"/> <source><b>Transaction fee:</b> </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="212"/> + <location filename="../transactiondesc.cpp" line="214"/> <source><b>Net amount:</b> </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="218"/> + <location filename="../transactiondesc.cpp" line="220"/> <source>Message:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="220"/> + <location filename="../transactiondesc.cpp" line="222"/> <source>Comment:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="222"/> + <location filename="../transactiondesc.cpp" line="224"/> <source>Transaction ID:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="225"/> + <location filename="../transactiondesc.cpp" line="227"/> <source>Generated coins must wait 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it will change to "not accepted" and not be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> <translation type="unfinished"></translation> </message> @@ -1358,27 +1498,27 @@ p, li { white-space: pre-wrap; } <context> <name>TransactionTableModel</name> <message> - <location filename="../transactiontablemodel.cpp" line="213"/> + <location filename="../transactiontablemodel.cpp" line="214"/> <source>Date</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="213"/> + <location filename="../transactiontablemodel.cpp" line="214"/> <source>Type</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="213"/> + <location filename="../transactiontablemodel.cpp" line="214"/> <source>Address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="213"/> + <location filename="../transactiontablemodel.cpp" line="214"/> <source>Amount</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="../transactiontablemodel.cpp" line="274"/> + <location filename="../transactiontablemodel.cpp" line="275"/> <source>Open for %n block(s)</source> <translation> <numerusform>Open for %n block</numerusform> @@ -1386,27 +1526,27 @@ p, li { white-space: pre-wrap; } </translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="277"/> + <location filename="../transactiontablemodel.cpp" line="278"/> <source>Open until %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="280"/> + <location filename="../transactiontablemodel.cpp" line="281"/> <source>Offline (%1 confirmations)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="283"/> + <location filename="../transactiontablemodel.cpp" line="284"/> <source>Unconfirmed (%1 of %2 confirmations)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="286"/> + <location filename="../transactiontablemodel.cpp" line="287"/> <source>Confirmed (%1 confirmations)</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="../transactiontablemodel.cpp" line="294"/> + <location filename="../transactiontablemodel.cpp" line="295"/> <source>Mined balance will be available in %n more blocks</source> <translation> <numerusform>Mined balance will be available in %n more block</numerusform> @@ -1414,67 +1554,67 @@ p, li { white-space: pre-wrap; } </translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="300"/> + <location filename="../transactiontablemodel.cpp" line="301"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="303"/> + <location filename="../transactiontablemodel.cpp" line="304"/> <source>Generated but not accepted</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="346"/> + <location filename="../transactiontablemodel.cpp" line="347"/> <source>Received with</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="348"/> + <location filename="../transactiontablemodel.cpp" line="349"/> <source>Received from</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="351"/> + <location filename="../transactiontablemodel.cpp" line="352"/> <source>Sent to</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="353"/> + <location filename="../transactiontablemodel.cpp" line="354"/> <source>Payment to yourself</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="355"/> + <location filename="../transactiontablemodel.cpp" line="356"/> <source>Mined</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="393"/> + <location filename="../transactiontablemodel.cpp" line="394"/> <source>(n/a)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="592"/> + <location filename="../transactiontablemodel.cpp" line="593"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="594"/> + <location filename="../transactiontablemodel.cpp" line="595"/> <source>Date and time that the transaction was received.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="596"/> + <location filename="../transactiontablemodel.cpp" line="597"/> <source>Type of transaction.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="598"/> + <location filename="../transactiontablemodel.cpp" line="599"/> <source>Destination address of transaction.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="600"/> + <location filename="../transactiontablemodel.cpp" line="601"/> <source>Amount removed from or added to balance.</source> <translation type="unfinished"></translation> </message> @@ -1574,7 +1714,7 @@ p, li { white-space: pre-wrap; } </message> <message> <location filename="../transactionview.cpp" line="128"/> - <source>Show details...</source> + <source>Show transaction details</source> <translation type="unfinished"></translation> </message> <message> @@ -1646,7 +1786,7 @@ p, li { white-space: pre-wrap; } <context> <name>WalletModel</name> <message> - <location filename="../walletmodel.cpp" line="143"/> + <location filename="../walletmodel.cpp" line="142"/> <source>Sending...</source> <translation type="unfinished"></translation> </message> @@ -1654,448 +1794,448 @@ p, li { white-space: pre-wrap; } <context> <name>bitcoin-core</name> <message> - <location filename="../bitcoinstrings.cpp" line="7"/> + <location filename="../bitcoinstrings.cpp" line="12"/> <source>Bitcoin version</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="8"/> + <location filename="../bitcoinstrings.cpp" line="13"/> <source>Usage:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="9"/> + <location filename="../bitcoinstrings.cpp" line="14"/> <source>Send command to -server or bitcoind</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="10"/> + <location filename="../bitcoinstrings.cpp" line="15"/> <source>List commands</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="11"/> + <location filename="../bitcoinstrings.cpp" line="16"/> <source>Get help for a command</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="12"/> + <location filename="../bitcoinstrings.cpp" line="17"/> <source>Options:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="13"/> + <location filename="../bitcoinstrings.cpp" line="18"/> <source>Specify configuration file (default: bitcoin.conf)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="14"/> + <location filename="../bitcoinstrings.cpp" line="19"/> <source>Specify pid file (default: bitcoind.pid)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="15"/> + <location filename="../bitcoinstrings.cpp" line="20"/> <source>Generate coins</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="16"/> + <location filename="../bitcoinstrings.cpp" line="21"/> <source>Don't generate coins</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="17"/> + <location filename="../bitcoinstrings.cpp" line="22"/> <source>Start minimized</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="18"/> + <location filename="../bitcoinstrings.cpp" line="23"/> <source>Show splash screen on startup (default: 1)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="19"/> + <location filename="../bitcoinstrings.cpp" line="24"/> <source>Specify data directory</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="20"/> + <location filename="../bitcoinstrings.cpp" line="25"/> <source>Set database cache size in megabytes (default: 25)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="21"/> + <location filename="../bitcoinstrings.cpp" line="26"/> <source>Set database disk log size in megabytes (default: 100)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="22"/> + <location filename="../bitcoinstrings.cpp" line="27"/> <source>Specify connection timeout (in milliseconds)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="23"/> + <location filename="../bitcoinstrings.cpp" line="28"/> <source>Connect through socks4 proxy</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="24"/> + <location filename="../bitcoinstrings.cpp" line="29"/> <source>Allow DNS lookups for addnode and connect</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="25"/> + <location filename="../bitcoinstrings.cpp" line="30"/> <source>Listen for connections on <port> (default: 8333 or testnet: 18333)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="26"/> + <location filename="../bitcoinstrings.cpp" line="31"/> <source>Maintain at most <n> connections to peers (default: 125)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="28"/> + <location filename="../bitcoinstrings.cpp" line="33"/> <source>Connect only to the specified node</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="33"/> + <location filename="../bitcoinstrings.cpp" line="38"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="34"/> + <location filename="../bitcoinstrings.cpp" line="39"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="37"/> + <location filename="../bitcoinstrings.cpp" line="42"/> <source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 10000)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="38"/> + <location filename="../bitcoinstrings.cpp" line="43"/> <source>Maximum per-connection send buffer, <n>*1000 bytes (default: 10000)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="42"/> + <location filename="../bitcoinstrings.cpp" line="47"/> <source>Accept command line and JSON-RPC commands</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="43"/> + <location filename="../bitcoinstrings.cpp" line="48"/> <source>Run in the background as a daemon and accept commands</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="44"/> + <location filename="../bitcoinstrings.cpp" line="49"/> <source>Use the test network</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="45"/> + <location filename="../bitcoinstrings.cpp" line="50"/> <source>Output extra debugging information</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="46"/> + <location filename="../bitcoinstrings.cpp" line="51"/> <source>Prepend debug output with timestamp</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="47"/> + <location filename="../bitcoinstrings.cpp" line="52"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="48"/> + <location filename="../bitcoinstrings.cpp" line="53"/> <source>Send trace/debug info to debugger</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="49"/> + <location filename="../bitcoinstrings.cpp" line="54"/> <source>Username for JSON-RPC connections</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="50"/> + <location filename="../bitcoinstrings.cpp" line="55"/> <source>Password for JSON-RPC connections</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="51"/> + <location filename="../bitcoinstrings.cpp" line="56"/> <source>Listen for JSON-RPC connections on <port> (default: 8332)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="52"/> + <location filename="../bitcoinstrings.cpp" line="57"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="53"/> + <location filename="../bitcoinstrings.cpp" line="58"/> <source>Send commands to node running on <ip> (default: 127.0.0.1)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="54"/> + <location filename="../bitcoinstrings.cpp" line="59"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="57"/> + <location filename="../bitcoinstrings.cpp" line="62"/> <source>Upgrade wallet to latest format</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="58"/> + <location filename="../bitcoinstrings.cpp" line="63"/> <source>Set key pool size to <n> (default: 100)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="59"/> + <location filename="../bitcoinstrings.cpp" line="64"/> <source>Rescan the block chain for missing wallet transactions</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="60"/> + <location filename="../bitcoinstrings.cpp" line="65"/> <source>How many blocks to check at startup (default: 2500, 0 = all)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="61"/> + <location filename="../bitcoinstrings.cpp" line="66"/> <source>How thorough the block verification is (0-6, default: 1)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="62"/> + <location filename="../bitcoinstrings.cpp" line="67"/> <source> SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="65"/> + <location filename="../bitcoinstrings.cpp" line="70"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="66"/> + <location filename="../bitcoinstrings.cpp" line="71"/> <source>Server certificate file (default: server.cert)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="67"/> + <location filename="../bitcoinstrings.cpp" line="72"/> <source>Server private key (default: server.pem)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="68"/> + <location filename="../bitcoinstrings.cpp" line="73"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="71"/> + <location filename="../bitcoinstrings.cpp" line="76"/> <source>This help message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="72"/> + <location filename="../bitcoinstrings.cpp" line="77"/> <source>Usage</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="73"/> + <location filename="../bitcoinstrings.cpp" line="78"/> <source>Cannot obtain a lock on data directory %s. Bitcoin is probably already running.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="76"/> + <location filename="../bitcoinstrings.cpp" line="81"/> <source>Bitcoin</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="77"/> + <location filename="../bitcoinstrings.cpp" line="82"/> <source>Loading addresses...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="78"/> + <location filename="../bitcoinstrings.cpp" line="83"/> <source>Error loading addr.dat</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="80"/> + <location filename="../bitcoinstrings.cpp" line="85"/> <source>Error loading blkindex.dat</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="82"/> + <location filename="../bitcoinstrings.cpp" line="87"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="83"/> + <location filename="../bitcoinstrings.cpp" line="88"/> <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="84"/> + <location filename="../bitcoinstrings.cpp" line="89"/> <source>Wallet needed to be rewritten: restart Bitcoin to complete</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="85"/> + <location filename="../bitcoinstrings.cpp" line="90"/> <source>Error loading wallet.dat</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="117"/> + <location filename="../bitcoinstrings.cpp" line="122"/> <source>Error: Wallet locked, unable to create transaction </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="118"/> + <location filename="../bitcoinstrings.cpp" line="123"/> <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="121"/> + <location filename="../bitcoinstrings.cpp" line="126"/> <source>Error: Transaction creation failed </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="122"/> + <location filename="../bitcoinstrings.cpp" line="127"/> <source>Sending...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="123"/> + <location filename="../bitcoinstrings.cpp" line="128"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="127"/> + <location filename="../bitcoinstrings.cpp" line="132"/> <source>Invalid amount</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="128"/> + <location filename="../bitcoinstrings.cpp" line="133"/> <source>Insufficient funds</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="79"/> + <location filename="../bitcoinstrings.cpp" line="84"/> <source>Loading block index...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="27"/> + <location filename="../bitcoinstrings.cpp" line="32"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="29"/> + <location filename="../bitcoinstrings.cpp" line="34"/> <source>Find peers using internet relay chat (default: 0)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="30"/> + <location filename="../bitcoinstrings.cpp" line="35"/> <source>Accept connections from outside (default: 1)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="31"/> + <location filename="../bitcoinstrings.cpp" line="36"/> <source>Set language, for example "de_DE" (default: system locale)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="32"/> + <location filename="../bitcoinstrings.cpp" line="37"/> <source>Find peers using DNS lookup (default: 1)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="39"/> + <location filename="../bitcoinstrings.cpp" line="44"/> <source>Use Universal Plug and Play to map the listening port (default: 1)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="40"/> + <location filename="../bitcoinstrings.cpp" line="45"/> <source>Use Universal Plug and Play to map the listening port (default: 0)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="41"/> + <location filename="../bitcoinstrings.cpp" line="46"/> <source>Fee per KB to add to transactions you send</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="81"/> + <location filename="../bitcoinstrings.cpp" line="86"/> <source>Loading wallet...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="86"/> + <location filename="../bitcoinstrings.cpp" line="91"/> <source>Cannot downgrade wallet</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="87"/> + <location filename="../bitcoinstrings.cpp" line="92"/> <source>Cannot initialize keypool</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="88"/> + <location filename="../bitcoinstrings.cpp" line="93"/> <source>Cannot write default address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="89"/> + <location filename="../bitcoinstrings.cpp" line="94"/> <source>Rescanning...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="90"/> + <location filename="../bitcoinstrings.cpp" line="95"/> <source>Done loading</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="91"/> + <location filename="../bitcoinstrings.cpp" line="96"/> <source>Invalid -proxy address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="92"/> + <location filename="../bitcoinstrings.cpp" line="97"/> <source>Invalid amount for -paytxfee=<amount></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="93"/> + <location filename="../bitcoinstrings.cpp" line="98"/> <source>Warning: -paytxfee is set very high. This is the transaction fee you will pay if you send a transaction.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="96"/> + <location filename="../bitcoinstrings.cpp" line="101"/> <source>Error: CreateThread(StartNode) failed</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="6"/> + <location filename="../bitcoinstrings.cpp" line="11"/> <source>Warning: Disk space is low </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="3"/> + <location filename="../bitcoinstrings.cpp" line="8"/> <source>Unable to bind to port %d on this computer. Bitcoin is probably already running.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="97"/> + <location filename="../bitcoinstrings.cpp" line="102"/> <source>To use the %s option</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="98"/> + <location filename="../bitcoinstrings.cpp" line="103"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: @@ -2107,24 +2247,24 @@ If the file does not exist, create it with owner-readable-only file permissions. <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="107"/> + <location filename="../bitcoinstrings.cpp" line="112"/> <source>Error</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="108"/> + <location filename="../bitcoinstrings.cpp" line="113"/> <source>An error occured while setting up the RPC port %i for listening: %s</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="109"/> + <location filename="../bitcoinstrings.cpp" line="114"/> <source>You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="114"/> + <location filename="../bitcoinstrings.cpp" line="119"/> <source>Warning: Please check that your computer's date and time are correct. If your clock is wrong Bitcoin will not work properly.</source> <translation type="unfinished"></translation> </message> diff --git a/src/qt/messagepage.cpp b/src/qt/messagepage.cpp index 57ad8292dc..c04d8b2c78 100644 --- a/src/qt/messagepage.cpp +++ b/src/qt/messagepage.cpp @@ -24,13 +24,17 @@ MessagePage::MessagePage(QWidget *parent) : ui(new Ui::MessagePage) { ui->setupUi(this); - + #if (QT_VERSION >= 0x040700) /* Do not move this to the XML file, Qt before 4.7 will choke on it */ + ui->signFrom->setPlaceholderText(tr("Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)")); ui->signature->setPlaceholderText(tr("Click \"Sign Message\" to get signature")); #endif GUIUtil::setupAddressWidget(ui->signFrom, this); + ui->signature->installEventFilter(this); + + ui->signFrom->setFocus(); } MessagePage::~MessagePage() @@ -116,4 +120,17 @@ void MessagePage::on_clearButton_clicked() ui->signFrom->clear(); ui->message->clear(); ui->signature->clear(); + + ui->signFrom->setFocus(); +} + +bool MessagePage::eventFilter(QObject *object, QEvent *event) +{ + if(object == ui->signature && (event->type() == QEvent::MouseButtonPress || + event->type() == QEvent::FocusIn)) + { + ui->signature->selectAll(); + return true; + } + return QDialog::eventFilter(object, event); } diff --git a/src/qt/messagepage.h b/src/qt/messagepage.h index b5a38166da..d668ae98d0 100644 --- a/src/qt/messagepage.h +++ b/src/qt/messagepage.h @@ -23,6 +23,9 @@ public: void setAddress(QString); +protected: + bool eventFilter(QObject *object, QEvent *event); + private: Ui::MessagePage *ui; WalletModel *model; diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp index 416880d462..c3260217bb 100644 --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -19,73 +19,103 @@ #include <QDoubleValidator> #include <QRegExpValidator> #include <QDialogButtonBox> +#include <QDir> +#include <QMessageBox> -/* First page of options */ -class MainOptionsPage : public QWidget +class OptionsPage: public QWidget +{ + Q_OBJECT +public: + explicit OptionsPage(QWidget *parent=0): QWidget(parent) {} + + virtual void setMapper(MonitoredDataMapper *mapper) = 0; +}; + +class MainOptionsPage: public OptionsPage { Q_OBJECT public: explicit MainOptionsPage(QWidget *parent=0); - void setMapper(MonitoredDataMapper *mapper); + virtual void setMapper(MonitoredDataMapper *mapper); private: + BitcoinAmountField *fee_edit; QCheckBox *bitcoin_at_startup; + QCheckBox *detach_database; +}; + +class WindowOptionsPage: public OptionsPage +{ + Q_OBJECT +public: + explicit WindowOptionsPage(QWidget *parent=0); + + virtual void setMapper(MonitoredDataMapper *mapper); +private: #ifndef Q_WS_MAC QCheckBox *minimize_to_tray; -#endif - QCheckBox *map_port_upnp; -#ifndef Q_WS_MAC QCheckBox *minimize_on_close; #endif - QCheckBox *connect_socks4; - QCheckBox *detach_database; - QLineEdit *proxy_ip; - QLineEdit *proxy_port; - BitcoinAmountField *fee_edit; - -signals: - -public slots: - }; -class DisplayOptionsPage : public QWidget +class DisplayOptionsPage: public OptionsPage { Q_OBJECT public: explicit DisplayOptionsPage(QWidget *parent=0); - void setMapper(MonitoredDataMapper *mapper); + virtual void setMapper(MonitoredDataMapper *mapper); private: + QValueComboBox *lang; QValueComboBox *unit; QCheckBox *display_addresses; -signals: + bool restart_warning_displayed; +private slots: + void showRestartWarning(); +}; -public slots: +class NetworkOptionsPage: public OptionsPage +{ + Q_OBJECT +public: + explicit NetworkOptionsPage(QWidget *parent=0); + virtual void setMapper(MonitoredDataMapper *mapper); +private: + QCheckBox *map_port_upnp; + QCheckBox *connect_socks4; + QLineEdit *proxy_ip; + QLineEdit *proxy_port; }; + #include "optionsdialog.moc" OptionsDialog::OptionsDialog(QWidget *parent): QDialog(parent), contents_widget(0), pages_widget(0), - model(0), main_page(0), display_page(0) + model(0) { contents_widget = new QListWidget(); contents_widget->setMaximumWidth(128); pages_widget = new QStackedWidget(); - pages_widget->setMinimumWidth(300); + pages_widget->setMinimumWidth(500); + pages_widget->setMinimumHeight(300); - QListWidgetItem *item_main = new QListWidgetItem(tr("Main")); - contents_widget->addItem(item_main); - main_page = new MainOptionsPage(this); - pages_widget->addWidget(main_page); + pages.append(new MainOptionsPage(this)); + pages.append(new NetworkOptionsPage(this)); +#ifndef Q_WS_MAC + /* Hide Window options on Mac as there are currently none available */ + pages.append(new WindowOptionsPage(this)); +#endif + pages.append(new DisplayOptionsPage(this)); - QListWidgetItem *item_display = new QListWidgetItem(tr("Display")); - contents_widget->addItem(item_display); - display_page = new DisplayOptionsPage(this); - pages_widget->addWidget(display_page); + foreach(OptionsPage *page, pages) + { + QListWidgetItem *item = new QListWidgetItem(page->windowTitle()); + contents_widget->addItem(item); + pages_widget->addWidget(page); + } contents_widget->setCurrentRow(0); @@ -125,8 +155,11 @@ void OptionsDialog::setModel(OptionsModel *model) this->model = model; mapper->setModel(model); - main_page->setMapper(mapper); - display_page->setMapper(mapper); + + foreach(OptionsPage *page, pages) + { + page->setMapper(mapper); + } mapper->toFirst(); } @@ -163,15 +196,122 @@ void OptionsDialog::disableApply() apply_button->setEnabled(false); } +/* Main options */ MainOptionsPage::MainOptionsPage(QWidget *parent): - QWidget(parent) + OptionsPage(parent) { QVBoxLayout *layout = new QVBoxLayout(); + setWindowTitle(tr("Main")); + + QLabel *fee_help = new QLabel(tr("Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.")); + fee_help->setWordWrap(true); + layout->addWidget(fee_help); + + QHBoxLayout *fee_hbox = new QHBoxLayout(); + fee_hbox->addSpacing(18); + QLabel *fee_label = new QLabel(tr("Pay transaction &fee")); + fee_hbox->addWidget(fee_label); + fee_edit = new BitcoinAmountField(); - bitcoin_at_startup = new QCheckBox(tr("&Start Bitcoin on window system startup")); - bitcoin_at_startup->setToolTip(tr("Automatically start Bitcoin after the computer is turned on")); + fee_label->setBuddy(fee_edit); + fee_hbox->addWidget(fee_edit); + fee_hbox->addStretch(1); + + layout->addLayout(fee_hbox); + + bitcoin_at_startup = new QCheckBox(tr("&Start Bitcoin on system login")); + bitcoin_at_startup->setToolTip(tr("Automatically start Bitcoin after logging in to the system")); layout->addWidget(bitcoin_at_startup); + detach_database = new QCheckBox(tr("&Detach databases at shutdown")); + detach_database->setToolTip(tr("Detach block and address databases at shutdown. This means they can be moved to another data directory, but it slows down shutdown. The wallet is always detached.")); + layout->addWidget(detach_database); + + layout->addStretch(1); // Extra space at bottom + setLayout(layout); +} + +void MainOptionsPage::setMapper(MonitoredDataMapper *mapper) +{ + // Map model to widgets + mapper->addMapping(fee_edit, OptionsModel::Fee); + mapper->addMapping(bitcoin_at_startup, OptionsModel::StartAtStartup); + mapper->addMapping(detach_database, OptionsModel::DetachDatabases); +} + +/* Display options */ +DisplayOptionsPage::DisplayOptionsPage(QWidget *parent): + OptionsPage(parent), restart_warning_displayed(false) +{ + setWindowTitle(tr("Display")); + + QVBoxLayout *layout = new QVBoxLayout(); + + QHBoxLayout *lang_hbox = new QHBoxLayout(); + lang_hbox->addSpacing(18); + QLabel *lang_label = new QLabel(tr("User Interface &Language: ")); + lang_hbox->addWidget(lang_label); + lang = new QValueComboBox(this); + // Make list of languages + QDir translations(":translations"); + lang->addItem(QString("(") + tr("default") + QString(")"), QVariant("")); + foreach(const QString &langStr, translations.entryList()) + { + lang->addItem(langStr, QVariant(langStr)); + } + + lang->setToolTip(tr("The user interface language can be set here. This setting will only take effect after restarting Bitcoin.")); + connect(lang, SIGNAL(activated(int)), this, SLOT(showRestartWarning())); + + lang_label->setBuddy(lang); + lang_hbox->addWidget(lang); + + layout->addLayout(lang_hbox); + + QHBoxLayout *unit_hbox = new QHBoxLayout(); + unit_hbox->addSpacing(18); + QLabel *unit_label = new QLabel(tr("&Unit to show amounts in: ")); + unit_hbox->addWidget(unit_label); + unit = new QValueComboBox(this); + unit->setModel(new BitcoinUnits(this)); + unit->setToolTip(tr("Choose the default subdivision unit to show in the interface, and when sending coins")); + + unit_label->setBuddy(unit); + unit_hbox->addWidget(unit); + + layout->addLayout(unit_hbox); + + display_addresses = new QCheckBox(tr("&Display addresses in transaction list"), this); + display_addresses->setToolTip(tr("Whether to show Bitcoin addresses in the transaction list")); + layout->addWidget(display_addresses); + + layout->addStretch(); + setLayout(layout); +} + +void DisplayOptionsPage::setMapper(MonitoredDataMapper *mapper) +{ + mapper->addMapping(lang, OptionsModel::Language); + mapper->addMapping(unit, OptionsModel::DisplayUnit); + mapper->addMapping(display_addresses, OptionsModel::DisplayAddresses); +} + +void DisplayOptionsPage::showRestartWarning() +{ + if(!restart_warning_displayed) + { + QMessageBox::warning(this, tr("Warning"), tr("This setting will take effect after restarting Bitcoin."), QMessageBox::Ok); + restart_warning_displayed = true; + } +} + +/* Window options */ +WindowOptionsPage::WindowOptionsPage(QWidget *parent): + OptionsPage(parent) +{ + QVBoxLayout *layout = new QVBoxLayout(); + setWindowTitle(tr("Window")); + #ifndef Q_WS_MAC minimize_to_tray = new QCheckBox(tr("&Minimize to the tray instead of the taskbar")); minimize_to_tray->setToolTip(tr("Show only a tray icon after minimizing the window")); @@ -182,6 +322,28 @@ MainOptionsPage::MainOptionsPage(QWidget *parent): layout->addWidget(minimize_on_close); #endif + layout->addStretch(1); // Extra space at bottom + setLayout(layout); +} + +void WindowOptionsPage::setMapper(MonitoredDataMapper *mapper) +{ + // Map model to widgets +#ifndef Q_WS_MAC + mapper->addMapping(minimize_to_tray, OptionsModel::MinimizeToTray); +#endif +#ifndef Q_WS_MAC + mapper->addMapping(minimize_on_close, OptionsModel::MinimizeOnClose); +#endif +} + +/* Network options */ +NetworkOptionsPage::NetworkOptionsPage(QWidget *parent): + OptionsPage(parent) +{ + QVBoxLayout *layout = new QVBoxLayout(); + setWindowTitle(tr("Network")); + map_port_upnp = new QCheckBox(tr("Map port using &UPnP")); map_port_upnp->setToolTip(tr("Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled.")); layout->addWidget(map_port_upnp); @@ -211,30 +373,9 @@ MainOptionsPage::MainOptionsPage(QWidget *parent): proxy_port_label->setBuddy(proxy_port); proxy_hbox->addWidget(proxy_port); proxy_hbox->addStretch(1); - layout->addLayout(proxy_hbox); - QLabel *fee_help = new QLabel(tr("Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.")); - fee_help->setWordWrap(true); - layout->addWidget(fee_help); - - QHBoxLayout *fee_hbox = new QHBoxLayout(); - fee_hbox->addSpacing(18); - QLabel *fee_label = new QLabel(tr("Pay transaction &fee")); - fee_hbox->addWidget(fee_label); - fee_edit = new BitcoinAmountField(); - - fee_label->setBuddy(fee_edit); - fee_hbox->addWidget(fee_edit); - fee_hbox->addStretch(1); - - layout->addLayout(fee_hbox); - - detach_database = new QCheckBox(tr("Detach databases at shutdown")); - detach_database->setToolTip(tr("Detach block and address databases at shutdown. This means they can be moved to another data directory, but it slows down shutdown. The wallet is always detached.")); - layout->addWidget(detach_database); layout->addStretch(1); // Extra space at bottom - setLayout(layout); connect(connect_socks4, SIGNAL(toggled(bool)), proxy_ip, SLOT(setEnabled(bool))); @@ -245,53 +386,11 @@ MainOptionsPage::MainOptionsPage(QWidget *parent): #endif } -void MainOptionsPage::setMapper(MonitoredDataMapper *mapper) +void NetworkOptionsPage::setMapper(MonitoredDataMapper *mapper) { // Map model to widgets - mapper->addMapping(bitcoin_at_startup, OptionsModel::StartAtStartup); -#ifndef Q_WS_MAC - mapper->addMapping(minimize_to_tray, OptionsModel::MinimizeToTray); -#endif mapper->addMapping(map_port_upnp, OptionsModel::MapPortUPnP); -#ifndef Q_WS_MAC - mapper->addMapping(minimize_on_close, OptionsModel::MinimizeOnClose); -#endif mapper->addMapping(connect_socks4, OptionsModel::ConnectSOCKS4); mapper->addMapping(proxy_ip, OptionsModel::ProxyIP); mapper->addMapping(proxy_port, OptionsModel::ProxyPort); - mapper->addMapping(fee_edit, OptionsModel::Fee); - mapper->addMapping(detach_database, OptionsModel::DetachDatabases); -} - -DisplayOptionsPage::DisplayOptionsPage(QWidget *parent): - QWidget(parent) -{ - QVBoxLayout *layout = new QVBoxLayout(); - - QHBoxLayout *unit_hbox = new QHBoxLayout(); - unit_hbox->addSpacing(18); - QLabel *unit_label = new QLabel(tr("&Unit to show amounts in: ")); - unit_hbox->addWidget(unit_label); - unit = new QValueComboBox(this); - unit->setModel(new BitcoinUnits(this)); - unit->setToolTip(tr("Choose the default subdivision unit to show in the interface, and when sending coins")); - - unit_label->setBuddy(unit); - unit_hbox->addWidget(unit); - - layout->addLayout(unit_hbox); - - display_addresses = new QCheckBox(tr("&Display addresses in transaction list"), this); - display_addresses->setToolTip(tr("Whether to show Bitcoin addresses in the transaction list")); - layout->addWidget(display_addresses); - - layout->addStretch(); - - setLayout(layout); -} - -void DisplayOptionsPage::setMapper(MonitoredDataMapper *mapper) -{ - mapper->addMapping(unit, OptionsModel::DisplayUnit); - mapper->addMapping(display_addresses, OptionsModel::DisplayAddresses); } diff --git a/src/qt/optionsdialog.h b/src/qt/optionsdialog.h index 9e1f87c646..ea0cbb8bfc 100644 --- a/src/qt/optionsdialog.h +++ b/src/qt/optionsdialog.h @@ -2,6 +2,7 @@ #define OPTIONSDIALOG_H #include <QDialog> +#include <QList> QT_BEGIN_NAMESPACE class QStackedWidget; @@ -10,8 +11,7 @@ class QListWidgetItem; class QPushButton; QT_END_NAMESPACE class OptionsModel; -class MainOptionsPage; -class DisplayOptionsPage; +class OptionsPage; class MonitoredDataMapper; /** Preferences dialog. */ @@ -43,11 +43,7 @@ private: MonitoredDataMapper *mapper; QPushButton *apply_button; - // Pages - MainOptionsPage *main_page; - DisplayOptionsPage *display_page; - - void setupMainPage(); + QList<OptionsPage*> pages; }; #endif // OPTIONSDIALOG_H diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index 5bba308cf2..78448d3ee1 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -21,6 +21,7 @@ void OptionsModel::Init() fMinimizeToTray = settings.value("fMinimizeToTray", false).toBool(); fMinimizeOnClose = settings.value("fMinimizeOnClose", false).toBool(); nTransactionFee = settings.value("nTransactionFee").toLongLong(); + language = settings.value("language", "").toString(); // These are shared with core bitcoin; we want // command-line options to override the GUI settings: @@ -30,6 +31,8 @@ void OptionsModel::Init() SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString()); if (settings.contains("detachDB")) SoftSetBoolArg("-detachdb", settings.value("detachDB").toBool()); + if (!language.isEmpty()) + SoftSetArg("-lang", language.toStdString()); } bool OptionsModel::Upgrade() @@ -125,6 +128,8 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const return QVariant(bDisplayAddresses); case DetachDatabases: return QVariant(fDetachDB); + case Language: + return settings.value("language", ""); default: return QVariant(); } @@ -213,6 +218,10 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in settings.setValue("detachDB", fDetachDB); } break; + case Language: { + settings.setValue("language", value); + } + break; default: break; } diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h index da4e86f104..4315a33f8c 100644 --- a/src/qt/optionsmodel.h +++ b/src/qt/optionsmodel.h @@ -27,6 +27,7 @@ public: DisplayUnit, // BitcoinUnits::Unit DisplayAddresses, // bool DetachDatabases, // bool + Language, // QString OptionIDRowCount, }; @@ -45,11 +46,13 @@ public: bool getMinimizeOnClose(); int getDisplayUnit(); bool getDisplayAddresses(); + QString getLanguage() { return language; } private: int nDisplayUnit; bool bDisplayAddresses; bool fMinimizeToTray; bool fMinimizeOnClose; + QString language; signals: void displayUnitChanged(int unit); diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index 5b5a8f5271..259f819deb 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -98,23 +98,9 @@ OverviewPage::OverviewPage(QWidget *parent) : { ui->setupUi(this); - // Balance: <balance> - ui->labelBalance->setFont(QFont("Monospace", -1, QFont::Bold)); - ui->labelBalance->setToolTip(tr("Your current balance")); - ui->labelBalance->setTextInteractionFlags(Qt::TextSelectableByMouse|Qt::TextSelectableByKeyboard); - - // Unconfirmed balance: <balance> - ui->labelUnconfirmed->setFont(QFont("Monospace", -1, QFont::Bold)); - ui->labelUnconfirmed->setToolTip(tr("Total of transactions that have yet to be confirmed, and do not yet count toward the current balance")); - ui->labelUnconfirmed->setTextInteractionFlags(Qt::TextSelectableByMouse|Qt::TextSelectableByKeyboard); - - ui->labelNumTransactions->setToolTip(tr("Total number of transactions in wallet")); - // Recent transactions - ui->listTransactions->setStyleSheet("QListView { background:transparent }"); ui->listTransactions->setItemDelegate(txdelegate); ui->listTransactions->setIconSize(QSize(DECORATION_SIZE, DECORATION_SIZE)); - ui->listTransactions->setSelectionMode(QAbstractItemView::NoSelection); ui->listTransactions->setMinimumHeight(NUM_ITEMS * (DECORATION_SIZE + 2)); ui->listTransactions->setAttribute(Qt::WA_MacShowFocusRect, false); diff --git a/src/qt/qrcodedialog.cpp b/src/qt/qrcodedialog.cpp index 2a428fb79e..d8e2007a2f 100644 --- a/src/qt/qrcodedialog.cpp +++ b/src/qt/qrcodedialog.cpp @@ -118,7 +118,7 @@ void QRCodeDialog::on_lnMessage_textChanged(const QString &arg1) void QRCodeDialog::on_btnSaveAs_clicked() { - QString fn = GUIUtil::getSaveFileName(this, tr("Save Image..."), QString(), tr("PNG Images (*.png)")); + QString fn = GUIUtil::getSaveFileName(this, tr("Save QR Code"), QString(), tr("PNG Images (*.png)")); if (!fn.isEmpty()) myImage.scaled(EXPORT_IMAGE_SIZE, EXPORT_IMAGE_SIZE).save(fn); } diff --git a/src/qt/qvaluecombobox.cpp b/src/qt/qvaluecombobox.cpp index c0ad8c12e5..d7ce3d0130 100644 --- a/src/qt/qvaluecombobox.cpp +++ b/src/qt/qvaluecombobox.cpp @@ -6,12 +6,12 @@ QValueComboBox::QValueComboBox(QWidget *parent) : connect(this, SIGNAL(currentIndexChanged(int)), this, SLOT(handleSelectionChanged(int))); } -int QValueComboBox::value() const +QVariant QValueComboBox::value() const { - return itemData(currentIndex(), role).toInt(); + return itemData(currentIndex(), role); } -void QValueComboBox::setValue(int value) +void QValueComboBox::setValue(const QVariant &value) { setCurrentIndex(findData(value, role)); } diff --git a/src/qt/qvaluecombobox.h b/src/qt/qvaluecombobox.h index 11f342d71c..1a47bb6565 100644 --- a/src/qt/qvaluecombobox.h +++ b/src/qt/qvaluecombobox.h @@ -2,19 +2,20 @@ #define QVALUECOMBOBOX_H #include <QComboBox> +#include <QVariant> /* QComboBox that can be used with QDataWidgetMapper to select ordinal values from a model. */ class QValueComboBox : public QComboBox { Q_OBJECT - Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged USER true) + Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged USER true) public: explicit QValueComboBox(QWidget *parent = 0); - int value() const; - void setValue(int value); + QVariant value() const; + void setValue(const QVariant &value); - /** Specify model role to use as ordinal value */ + /** Specify model role to use as ordinal value (defaults to Qt::UserRole) */ void setRole(int role); signals: diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index d59f5c6a38..9254fe4cb5 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -90,6 +90,12 @@ RPCConsole::RPCConsole(QWidget *parent) : ui->messagesWidget->horizontalHeader()->setResizeMode(1, QHeaderView::Stretch); ui->messagesWidget->setContextMenuPolicy(Qt::ActionsContextMenu); +#ifndef WIN32 + // Show Debug logfile label and Open button only for Windows + ui->labelDebugLogfile->setVisible(false); + ui->openDebugLogfileButton->setVisible(false); +#endif + // Install event filter for up and down arrow ui->lineEdit->installEventFilter(this); @@ -101,6 +107,7 @@ RPCConsole::RPCConsole(QWidget *parent) : ui->messagesWidget->addAction(copyMessageAction); connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clear())); + connect(ui->openDebugLogfileButton, SIGNAL(clicked()), this, SLOT(on_openDebugLogfileButton_clicked())); startExecutor(); @@ -113,27 +120,6 @@ RPCConsole::~RPCConsole() delete ui; } -bool RPCConsole::event(QEvent *event) -{ - int returnValue = QWidget::event(event); - - if (event->type() == QEvent::LayoutRequest && firstLayout) - { - // Work around QTableWidget issue: - // Call resizeRowsToContents on first Layout request with widget visible, - // to make sure multiline messages that were added before the console was shown - // have the right height. - if(ui->messagesWidget->isVisible()) - { - firstLayout = false; - ui->messagesWidget->resizeRowsToContents(); - } - return true; - } - - return returnValue; -} - bool RPCConsole::eventFilter(QObject* obj, QEvent *event) { if(obj == ui->lineEdit) @@ -246,7 +232,8 @@ void RPCConsole::setNumBlocks(int count) ui->numberOfBlocks->setText(QString::number(count)); if(clientModel) { - ui->totalBlocks->setText(QString::number(clientModel->getNumBlocksOfPeers())); + // If there is no current number available display N/A instead of 0, which can't ever be true + ui->totalBlocks->setText(clientModel->getNumBlocksOfPeers() == 0 ? tr("N/A") : QString::number(clientModel->getNumBlocksOfPeers())); ui->lastBlockTime->setText(clientModel->getLastBlockDate().toString()); } } @@ -314,3 +301,25 @@ void RPCConsole::copyMessage() { GUIUtil::copyEntryData(ui->messagesWidget, 1, Qt::EditRole); } + +void RPCConsole::on_tabWidget_currentChanged(int index) +{ + if(ui->tabWidget->widget(index) == ui->tab_console) + { + if(firstLayout) + { + // Work around QTableWidget issue: + // Call resizeRowsToContents on first Layout request with widget visible, + // to make sure multiline messages that were added before the console was shown + // have the right height. + firstLayout = false; + ui->messagesWidget->resizeRowsToContents(); + } + ui->lineEdit->setFocus(); + } +} + +void RPCConsole::on_openDebugLogfileButton_clicked() +{ + GUIUtil::openDebugLogfile(); +} diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h index a0a73bedd3..30948eaad2 100644 --- a/src/qt/rpcconsole.h +++ b/src/qt/rpcconsole.h @@ -28,11 +28,12 @@ public: }; protected: - virtual bool event(QEvent *event); virtual bool eventFilter(QObject* obj, QEvent *event); private slots: void on_lineEdit_returnPressed(); + void on_tabWidget_currentChanged(int index); + void on_openDebugLogfileButton_clicked(); public slots: void clear(); diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index 90fc5b7da3..53cfb409ff 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -102,7 +102,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet * // int64 nTxFee = nDebit - wtx.GetValueOut(); - for (int nOut = 0; nOut < wtx.vout.size(); nOut++) + for (unsigned int nOut = 0; nOut < wtx.vout.size(); nOut++) { const CTxOut& txout = wtx.vout[nOut]; TransactionRecord sub(hash, nTime); diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index eaed48bfdf..1c427d6fe4 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -81,12 +81,14 @@ TransactionView::TransactionView(QWidget *parent) : addressWidget = new QLineEdit(this); #if QT_VERSION >= 0x040700 + /* Do not move this to the XML file, Qt before 4.7 will choke on it */ addressWidget->setPlaceholderText(tr("Enter address or label to search")); #endif hlayout->addWidget(addressWidget); amountWidget = new QLineEdit(this); #if QT_VERSION >= 0x040700 + /* Do not move this to the XML file, Qt before 4.7 will choke on it */ amountWidget->setPlaceholderText(tr("Min amount")); #endif #ifdef Q_WS_MAC @@ -125,7 +127,7 @@ TransactionView::TransactionView(QWidget *parent) : QAction *copyLabelAction = new QAction(tr("Copy label"), this); QAction *copyAmountAction = new QAction(tr("Copy amount"), this); QAction *editLabelAction = new QAction(tr("Edit label"), this); - QAction *showDetailsAction = new QAction(tr("Show details..."), this); + QAction *showDetailsAction = new QAction(tr("Show transaction details"), this); contextMenu = new QMenu(); contextMenu->addAction(copyAddressAction); diff --git a/src/test/base58_tests.cpp b/src/test/base58_tests.cpp index d52ac74982..de4096cd39 100644 --- a/src/test/base58_tests.cpp +++ b/src/test/base58_tests.cpp @@ -67,7 +67,7 @@ const char *vstrOut[] = { BOOST_AUTO_TEST_CASE(base58_EncodeBase58) { - for (int i=0; i<sizeof(vstrIn)/sizeof(vstrIn[0]); i++) + for (unsigned int i=0; i<sizeof(vstrIn)/sizeof(vstrIn[0]); i++) { BOOST_CHECK_EQUAL(EncodeBase58(vstrIn[i].data, vstrIn[i].data + vstrIn[i].size), vstrOut[i]); } @@ -76,7 +76,7 @@ BOOST_AUTO_TEST_CASE(base58_EncodeBase58) BOOST_AUTO_TEST_CASE(base58_DecodeBase58) { std::vector<unsigned char> result; - for (int i=0; i<sizeof(vstrIn)/sizeof(vstrIn[0]); i++) + for (unsigned int i=0; i<sizeof(vstrIn)/sizeof(vstrIn[0]); i++) { std::vector<unsigned char> expected(vstrIn[i].data, vstrIn[i].data + vstrIn[i].size); BOOST_CHECK(DecodeBase58(vstrOut[i], result)); diff --git a/src/test/base64_tests.cpp b/src/test/base64_tests.cpp index fff30ef5eb..c5a053e2eb 100644 --- a/src/test/base64_tests.cpp +++ b/src/test/base64_tests.cpp @@ -10,7 +10,7 @@ BOOST_AUTO_TEST_CASE(base64_testvectors) { static const std::string vstrIn[] = {"","f","fo","foo","foob","fooba","foobar"}; static const std::string vstrOut[] = {"","Zg==","Zm8=","Zm9v","Zm9vYg==","Zm9vYmE=","Zm9vYmFy"}; - for (int i=0; i<sizeof(vstrIn)/sizeof(vstrIn[0]); i++) + for (unsigned int i=0; i<sizeof(vstrIn)/sizeof(vstrIn[0]); i++) { std::string strEnc = EncodeBase64(vstrIn[i]); BOOST_CHECK(strEnc == vstrOut[i]); diff --git a/src/util.cpp b/src/util.cpp index 3d301d21e3..1a57cc6621 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -53,7 +53,6 @@ namespace boost { #endif using namespace std; -using namespace boost; map<string, string> mapArgs; map<string, vector<string> > mapMultiArgs; @@ -328,7 +327,7 @@ bool error(const char *format, ...) va_end(arg_ptr); if (ret < 0 || ret >= limit) { - buffer[limit-1] = 0; + buffer[limit - 1] = 0; } printf("ERROR: %s\n", buffer); return false; @@ -494,7 +493,7 @@ static void InterpretNegativeSetting(string name, map<string, string>& mapSettin } } -void ParseParameters(int argc, const char*const argv[]) +void ParseParameters(int argc, const char* const argv[]) { mapArgs.clear(); mapMultiArgs.clear(); @@ -761,8 +760,7 @@ bool WildcardMatch(const string& str, const string& mask) void FormatException(char* pszMessage, std::exception* pex, const char* pszThread) { #ifdef WIN32 - char pszModule[MAX_PATH]; - pszModule[0] = '\0'; + char pszModule[MAX_PATH] = ""; GetModuleFileNameA(NULL, pszModule, sizeof(pszModule)); #else const char* pszModule = "bitcoin"; @@ -801,38 +799,16 @@ void PrintExceptionContinue(std::exception* pex, const char* pszThread) strMiscWarning = pszMessage; } -#ifdef WIN32 -boost::filesystem::path MyGetSpecialFolderPath(int nFolder, bool fCreate) -{ - namespace fs = boost::filesystem; - - char pszPath[MAX_PATH] = ""; - if(SHGetSpecialFolderPathA(NULL, pszPath, nFolder, fCreate)) - { - return fs::path(pszPath); - } - else if (nFolder == CSIDL_STARTUP) - { - return fs::path(getenv("USERPROFILE")) / "Start Menu" / "Programs" / "Startup"; - } - else if (nFolder == CSIDL_APPDATA) - { - return fs::path(getenv("APPDATA")); - } - return fs::path(""); -} -#endif - boost::filesystem::path GetDefaultDataDir() { namespace fs = boost::filesystem; - - // Windows: C:\Documents and Settings\username\Application Data\Bitcoin + // Windows < Vista: C:\Documents and Settings\Username\Application Data\Bitcoin + // Windows >= Vista: C:\Users\Username\AppData\Roaming\Bitcoin // Mac: ~/Library/Application Support/Bitcoin // Unix: ~/.bitcoin #ifdef WIN32 // Windows - return MyGetSpecialFolderPath(CSIDL_APPDATA, true) / "Bitcoin"; + return GetSpecialFolderPath(CSIDL_APPDATA) / "Bitcoin"; #else fs::path pathRet; char* pszHome = getenv("HOME"); @@ -843,7 +819,7 @@ boost::filesystem::path GetDefaultDataDir() #ifdef MAC_OSX // Mac pathRet /= "Library/Application Support"; - filesystem::create_directory(pathRet); + fs::create_directory(pathRet); return pathRet / "Bitcoin"; #else // Unix @@ -889,9 +865,7 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific) boost::filesystem::path GetConfigFile() { - namespace fs = boost::filesystem; - - fs::path pathConfigFile(GetArg("-conf", "bitcoin.conf")); + boost::filesystem::path pathConfigFile(GetArg("-conf", "bitcoin.conf")); if (!pathConfigFile.is_complete()) pathConfigFile = GetDataDir(false) / pathConfigFile; return pathConfigFile; } @@ -899,24 +873,21 @@ boost::filesystem::path GetConfigFile() void ReadConfigFile(map<string, string>& mapSettingsRet, map<string, vector<string> >& mapMultiSettingsRet) { - namespace fs = boost::filesystem; - namespace pod = boost::program_options::detail; - - fs::ifstream streamConfig(GetConfigFile()); + boost::filesystem::ifstream streamConfig(GetConfigFile()); if (!streamConfig.good()) return; // No bitcoin.conf file is OK set<string> setOptions; setOptions.insert("*"); - for (pod::config_file_iterator it(streamConfig, setOptions), end; it != end; ++it) + for (boost::program_options::detail::config_file_iterator it(streamConfig, setOptions), end; it != end; ++it) { // Don't overwrite existing settings so command line settings override bitcoin.conf string strKey = string("-") + it->string_key; if (mapSettingsRet.count(strKey) == 0) { mapSettingsRet[strKey] = it->value[0]; - // interpret nofoo=1 as foo=0 (and nofoo=0 as foo=1) as long as foo not set) + // interpret nofoo=1 as foo=0 (and nofoo=0 as foo=1) as long as foo not set) InterpretNegativeSetting(strKey, mapSettingsRet); } mapMultiSettingsRet[strKey].push_back(it->value[0]); @@ -925,9 +896,7 @@ void ReadConfigFile(map<string, string>& mapSettingsRet, boost::filesystem::path GetPidFile() { - namespace fs = boost::filesystem; - - fs::path pathPidFile(GetArg("-pid", "bitcoind.pid")); + boost::filesystem::path pathPidFile(GetArg("-pid", "bitcoind.pid")); if (!pathPidFile.is_complete()) pathPidFile = GetDataDir() / pathPidFile; return pathPidFile; } @@ -1095,14 +1064,30 @@ std::string FormatSubVersion(const std::string& name, int nClientVersion, const } #ifdef WIN32 +boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate) +{ + namespace fs = boost::filesystem; + + char pszPath[MAX_PATH] = ""; + + if(SHGetSpecialFolderPathA(NULL, pszPath, nFolder, fCreate)) + { + return fs::path(pszPath); + } + + printf("SHGetSpecialFolderPathA() failed, could not obtain requested path.\n"); + return fs::path(""); +} + boost::filesystem::path static StartupShortcutPath() { - return MyGetSpecialFolderPath(CSIDL_STARTUP, true) / "Bitcoin.lnk"; + return GetSpecialFolderPath(CSIDL_STARTUP) / "Bitcoin.lnk"; } bool GetStartOnSystemStartup() { - return filesystem::exists(StartupShortcutPath()); + // check for Bitcoin.lnk + return boost::filesystem::exists(StartupShortcutPath()); } bool SetStartOnSystemStartup(bool fAutoStart) diff --git a/src/util.h b/src/util.h index 5f8d0375da..ebd574f896 100644 --- a/src/util.h +++ b/src/util.h @@ -163,6 +163,9 @@ boost::filesystem::path GetConfigFile(); boost::filesystem::path GetPidFile(); void CreatePidFile(const boost::filesystem::path &path, pid_t pid); void ReadConfigFile(std::map<std::string, std::string>& mapSettingsRet, std::map<std::string, std::vector<std::string> >& mapMultiSettingsRet); +#ifdef WIN32 +boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate = true); +#endif bool GetStartOnSystemStartup(); bool SetStartOnSystemStartup(bool fAutoStart); void ShrinkDebugFile(); @@ -217,9 +220,11 @@ public: { printf("LOCKCONTENTION: %s\n", pszName); printf("Locker: %s:%d\n", pszFile, nLine); - } #endif lock.lock(); +#ifdef DEBUG_LOCKCONTENTION + } +#endif } } diff --git a/src/version.h b/src/version.h index 423e885f93..7859fb2dcd 100644 --- a/src/version.h +++ b/src/version.h @@ -10,10 +10,11 @@ // client versioning // -static const int CLIENT_VERSION_MAJOR = 0; -static const int CLIENT_VERSION_MINOR = 6; -static const int CLIENT_VERSION_REVISION = 99; -static const int CLIENT_VERSION_BUILD = 0; +// These need to be macro's, as version.cpp's voodoo requires it +#define CLIENT_VERSION_MAJOR 0 +#define CLIENT_VERSION_MINOR 6 +#define CLIENT_VERSION_REVISION 99 +#define CLIENT_VERSION_BUILD 0 static const int CLIENT_VERSION = 1000000 * CLIENT_VERSION_MAJOR |