Skip to content

Commit

Permalink
Backport Bitcoin Qt/Gui changes up to 0.14.x part 1 (#1614)
Browse files Browse the repository at this point in the history
* Merge pull request bitcoin#7154

a3c3ddb [Qt] add InMempool() info to transaction details (Jonas Schnelli)

* Merge pull request bitcoin#7218

fa5769e [qt] Fix misleading translation (MarcoFalke)
fa8c8d7 torcontrol debug: Change to a blanket message that covers both cases (MarcoFalke)

* Merge pull request bitcoin#7255

6fd0a07 Remove hardcoded fee from CoinControl ToolTip (fanquake)
5fdf32d Replace some instances of formatWithUnit with formatHtmlWithUnit (fanquake)

* Merge pull request bitcoin#7263

a5a0831 Double semicolon cleanup. (21E14)

* Merge pull request bitcoin#7334

fa989fb [qt] coincontrol workaround is still needed in qt5.4 (fixed in qt5.5) (MarcoFalke)

* Merge pull request bitcoin#7329

9d263bd Typo fixes in comments (Chris Wheeler)

* Merge bitcoin#7396: [Qt] Add option to increase/decrease font size in the console window

43abb02 [Qt] Add a new chevron/arrow icon for the console prompt line (Jonas Schnelli)
56c9e66 [Qt] keep scroll position in GUI console after changing font size (Jonas Schnelli)
3a3a927 [Qt] Add option to increase/decrease font size in the console window (Jonas Schnelli)

* Merge bitcoin#7628: QT: Add 'copy full transaction details' option

b51ed40 QT: Add 'copy full transaction details' option (Eric Shaw)

* Merge bitcoin#7668: Fix history deletion bug after font size change

21e45a0 Fix history deletion bug after font change (Andrew C)

* Copy/Move font size related icons into theme folders

* Use formatTxDate for date/time in TxPlainTextRole
  • Loading branch information
codablock authored and UdjinM6 committed Sep 7, 2017
1 parent 8da26da commit 690cb58
Show file tree
Hide file tree
Showing 38 changed files with 292 additions and 69 deletions.
3 changes: 3 additions & 0 deletions contrib/debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ License: GPL-3+

Files: src/qt/res/icons/add.png
src/qt/res/icons/address-book.png
src/qt/res/icons/chevron.png
src/qt/res/icons/configure.png
src/qt/res/icons/debugwindow.png
src/qt/res/icons/edit.png
Expand Down Expand Up @@ -56,6 +57,8 @@ Comment: Inspired by Stephan Hutchings Typicons

Files: src/qt/res/icons/tx_mined.png
src/qt/res/src/mine.svg
src/qt/res/icons/fontbigger.png
src/qt/res/icons/fontsmaller.png
Copyright: Jonas Schnelli
License: Expat
Comment:
Expand Down
2 changes: 1 addition & 1 deletion qa/rpc-tests/merkle_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def run_test(self):
txid_spent = txin_spent["txid"]
txid_unspent = txid1 if txin_spent["txid"] != txid1 else txid2

# We cant find the block from a fully-spent tx
# We can't find the block from a fully-spent tx
# Doesn't apply to Dash Core - we have txindex always on
# assert_raises(JSONRPCException, self.nodes[2].gettxoutproof, [txid_spent])
# ...but we can if we specify the block
Expand Down
11 changes: 10 additions & 1 deletion src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ BITCOIN_QT_H = \
RES_ICONS = \
qt/res/icons/bitcoin.ico \
qt/res/icons/bitcoin.png \
qt/res/icons/chevron.png \
qt/res/icons/drkblue/add.png \
qt/res/icons/drkblue/address-book.png \
qt/res/icons/drkblue/browse.png \
Expand Down Expand Up @@ -217,6 +218,8 @@ RES_ICONS = \
qt/res/icons/drkblue/about.png \
qt/res/icons/drkblue/about_qt.png \
qt/res/icons/drkblue/verify.png \
qt/res/icons/drkblue/fontbigger.png \
qt/res/icons/drkblue/fontsmaller.png \
qt/res/icons/crownium/add.png \
qt/res/icons/crownium/address-book.png \
qt/res/icons/crownium/browse.png \
Expand Down Expand Up @@ -267,6 +270,8 @@ RES_ICONS = \
qt/res/icons/crownium/about.png \
qt/res/icons/crownium/about_qt.png \
qt/res/icons/crownium/verify.png \
qt/res/icons/crownium/fontbigger.png \
qt/res/icons/crownium/fontsmaller.png \
qt/res/icons/light/add.png \
qt/res/icons/light/address-book.png \
qt/res/icons/light/browse.png \
Expand Down Expand Up @@ -317,6 +322,8 @@ RES_ICONS = \
qt/res/icons/light/about.png \
qt/res/icons/light/about_qt.png \
qt/res/icons/light/verify.png \
qt/res/icons/light/fontbigger.png \
qt/res/icons/light/fontsmaller.png \
qt/res/icons/trad/add.png \
qt/res/icons/trad/address-book.png \
qt/res/icons/trad/browse.png \
Expand Down Expand Up @@ -366,7 +373,9 @@ RES_ICONS = \
qt/res/icons/trad/tx_mined.png \
qt/res/icons/trad/about.png \
qt/res/icons/trad/about_qt.png \
qt/res/icons/trad/verify.png
qt/res/icons/trad/verify.png \
qt/res/icons/trad/fontbigger.png \
qt/res/icons/trad/fontsmaller.png

BITCOIN_QT_CPP = \
qt/bantablemodel.cpp \
Expand Down
4 changes: 2 additions & 2 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,7 @@ void ThreadMapPort()
LogPrintf("AddPortMapping(%s, %s, %s) failed with code %d (%s)\n",
port, port, lanaddr, r, strupnperror(r));
else
LogPrintf("UPnP Port Mapping successful.\n");;
LogPrintf("UPnP Port Mapping successful.\n");

MilliSleep(20*60*1000); // Refresh every 20 minutes
}
Expand Down Expand Up @@ -2572,7 +2572,7 @@ bool CConnman::OutboundTargetReached(bool historicalBlockServingLimit)

if (historicalBlockServingLimit)
{
// keep a large enought buffer to at least relay each block once
// keep a large enough buffer to at least relay each block once
uint64_t timeLeftInCycle = GetMaxOutboundTimeLeftInCycle();
uint64_t buffer = timeLeftInCycle / 600 * MAX_BLOCK_SIZE;
if (buffer >= nMaxOutboundLimit || nMaxOutboundTotalBytesSentInCycle >= nMaxOutboundLimit - buffer)
Expand Down
2 changes: 1 addition & 1 deletion src/netbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ bool static LookupIntern(const char *pszName, std::vector<CNetAddr>& vIP, unsign
return false;

do {
// Should set the timeout limit to a resonable value to avoid
// Should set the timeout limit to a reasonable value to avoid
// generating unnecessary checking call during the polling loop,
// while it can still response to stop request quick enough.
// 2 seconds looks fine in our situation.
Expand Down
2 changes: 1 addition & 1 deletion src/policy/fees.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ double TxConfirmStats::EstimateMedianVal(int confTarget, double sufficientTxVal,
int maxbucketindex = buckets.size() - 1;

// requireGreater means we are looking for the lowest fee/priority such that all higher
// values pass, so we start at maxbucketindex (highest fee) and look at succesively
// values pass, so we start at maxbucketindex (highest fee) and look at successively
// smaller buckets until we reach failure. Otherwise, we are looking for the highest
// fee/priority such that all lower values fail, and we go in the opposite direction.
unsigned int startbucket = requireGreater ? maxbucketindex : 0;
Expand Down
6 changes: 3 additions & 3 deletions src/policy/fees.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class CTxMemPool;
* included in blocks before transactions of lower fee/priority. So for
* example if you wanted to know what fee you should put on a transaction to
* be included in a block within the next 5 blocks, you would start by looking
* at the bucket with with the highest fee transactions and verifying that a
* at the bucket with the highest fee transactions and verifying that a
* sufficiently high percentage of them were confirmed within 5 blocks and
* then you would look at the next highest fee bucket, and so on, stopping at
* the last bucket to pass the test. The average fee of transactions in this
Expand Down Expand Up @@ -87,13 +87,13 @@ class TxConfirmStats
// Count the total # of txs in each bucket
// Track the historical moving average of this total over blocks
std::vector<double> txCtAvg;
// and calcuate the total for the current block to update the moving average
// and calculate the total for the current block to update the moving average
std::vector<int> curBlockTxCt;

// Count the total # of txs confirmed within Y blocks in each bucket
// Track the historical moving average of theses totals over blocks
std::vector<std::vector<double> > confAvg; // confAvg[Y][X]
// and calcuate the totals for the current block to update the moving averages
// and calculate the totals for the current block to update the moving averages
std::vector<std::vector<int> > curBlockConf; // curBlockConf[Y][X]

// Sum the total priority/fee of all tx's in each bucket
Expand Down
4 changes: 2 additions & 2 deletions src/qt/bantablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ int BanTableModel::rowCount(const QModelIndex &parent) const
int BanTableModel::columnCount(const QModelIndex &parent) const
{
Q_UNUSED(parent);
return columns.length();;
return columns.length();
}

QVariant BanTableModel::data(const QModelIndex &index, int role) const
Expand Down Expand Up @@ -179,4 +179,4 @@ bool BanTableModel::shouldShow()
if (priv->size() > 0)
return true;
return false;
}
}
2 changes: 1 addition & 1 deletion src/qt/clientmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ double ClientModel::getVerificationProgress(const CBlockIndex *tipIn) const
void ClientModel::updateTimer()
{
// no locking required at this point
// the following calls will aquire the required lock
// the following calls will acquire the required lock
Q_EMIT mempoolSizeChanged(getMempoolSize(), getMempoolDynamicUsage());
Q_EMIT bytesChanged(getTotalBytesRecv(), getTotalBytesSent());
}
Expand Down
10 changes: 4 additions & 6 deletions src/qt/coincontroldialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ CoinControlDialog::CoinControlDialog(const PlatformStyle *platformStyle, QWidget
ui->treeWidget->setColumnWidth(COLUMN_DATE, 80);
ui->treeWidget->setColumnWidth(COLUMN_CONFIRMATIONS, 100);
ui->treeWidget->setColumnWidth(COLUMN_PRIORITY, 100);
ui->treeWidget->setColumnHidden(COLUMN_TXHASH, true); // store transacton hash in this column, but don't show it
ui->treeWidget->setColumnHidden(COLUMN_TXHASH, true); // store transaction hash in this column, but don't show it
ui->treeWidget->setColumnHidden(COLUMN_VOUT_INDEX, true); // store vout index in this column, but don't show it
ui->treeWidget->setColumnHidden(COLUMN_AMOUNT_INT64, true); // store amount int64 in this column, but don't show it
ui->treeWidget->setColumnHidden(COLUMN_PRIORITY_INT64, true); // store priority int64 in this column, but don't show it
Expand Down Expand Up @@ -464,10 +464,8 @@ void CoinControlDialog::viewItemChanged(QTreeWidgetItem* item, int column)
CoinControlDialog::updateLabels(model, this);
}

// todo: this is a temporary qt5 fix: when clicking a parent node in tree mode, the parent node
// including all children are partially selected. But the parent node should be fully selected
// as well as the children. Children should never be partially selected in the first place.
// Please remove this ugly fix, once the bug is solved upstream.
// TODO: Remove this temporary qt5 fix after Qt5.3 and Qt5.4 are no longer used.
// Fixed in Qt5.5 and above: https://bugreports.qt.io/browse/QTBUG-43473
#if QT_VERSION >= 0x050000
else if (column == COLUMN_CHECKBOX && item->childCount() > 0)
{
Expand Down Expand Up @@ -712,7 +710,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
toolTip2 += tr("This label turns red if the priority is smaller than \"medium\".") + "<br /><br />";
toolTip2 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatHtmlWithUnit(nDisplayUnit, CWallet::GetRequiredFee(1000)));

QString toolTip3 = tr("This label turns red if any recipient receives an amount smaller than %1.").arg(BitcoinUnits::formatHtmlWithUnit(nDisplayUnit, ::minRelayTxFee.GetFee(546)));
QString toolTip3 = tr("This label turns red if any recipient receives an amount smaller than the current dust threshold.");

// how many satoshis the estimated fee can vary per byte we guess wrong
double dFeeVary;
Expand Down
9 changes: 9 additions & 0 deletions src/qt/dash.qrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/icons">
<file alias="bitcoin">res/icons/bitcoin.png</file>
<file alias="prompticon">res/icons/chevron.png</file>
</qresource>
<qresource prefix="/icons/drkblue">
<file alias="address-book">res/icons/drkblue/address-book.png</file>
Expand Down Expand Up @@ -53,6 +54,8 @@
<file alias="verify">res/icons/drkblue/verify.png</file>
<file alias="hd_enabled">res/icons/drkblue/hd_enabled.png</file>
<file alias="hd_disabled">res/icons/drkblue/hd_disabled.png</file>
<file alias="fontbigger">res/icons/drkblue/fontbigger.png</file>
<file alias="fontsmaller">res/icons/drkblue/fontsmaller.png</file>
</qresource>
<qresource prefix="/icons/crownium">
<file alias="address-book">res/icons/crownium/address-book.png</file>
Expand Down Expand Up @@ -105,6 +108,8 @@
<file alias="verify">res/icons/crownium/verify.png</file>
<file alias="hd_enabled">res/icons/crownium/hd_enabled.png</file>
<file alias="hd_disabled">res/icons/crownium/hd_disabled.png</file>
<file alias="fontbigger">res/icons/crownium/fontbigger.png</file>
<file alias="fontsmaller">res/icons/crownium/fontsmaller.png</file>
</qresource>
<qresource prefix="/icons/light">
<file alias="address-book">res/icons/light/address-book.png</file>
Expand Down Expand Up @@ -157,6 +162,8 @@
<file alias="verify">res/icons/light/verify.png</file>
<file alias="hd_enabled">res/icons/light/hd_enabled.png</file>
<file alias="hd_disabled">res/icons/light/hd_disabled.png</file>
<file alias="fontbigger">res/icons/light/fontbigger.png</file>
<file alias="fontsmaller">res/icons/light/fontsmaller.png</file>
</qresource>
<qresource prefix="/icons/trad">
<file alias="address-book">res/icons/trad/address-book.png</file>
Expand Down Expand Up @@ -209,6 +216,8 @@
<file alias="verify">res/icons/trad/verify.png</file>
<file alias="hd_enabled">res/icons/trad/hd_enabled.png</file>
<file alias="hd_disabled">res/icons/trad/hd_disabled.png</file>
<file alias="fontbigger">res/icons/trad/fontbigger.png</file>
<file alias="fontsmaller">res/icons/trad/fontsmaller.png</file>
</qresource>
<qresource prefix="/css">
<file alias="drkblue">res/css/drkblue.css</file>
Expand Down
Loading

0 comments on commit 690cb58

Please sign in to comment.