Backport Bitcoin Qt/Gui changes up to 0.14.x part 1 (#1614)
* Merge pull request #7154a3c3ddb
[Qt] add InMempool() info to transaction details (Jonas Schnelli) * Merge pull request #7218fa5769e
[qt] Fix misleading translation (MarcoFalke)fa8c8d7
torcontrol debug: Change to a blanket message that covers both cases (MarcoFalke) * Merge pull request #72556fd0a07
Remove hardcoded fee from CoinControl ToolTip (fanquake)5fdf32d
Replace some instances of formatWithUnit with formatHtmlWithUnit (fanquake) * Merge pull request #7263a5a0831
Double semicolon cleanup. (21E14) * Merge pull request #7334fa989fb
[qt] coincontrol workaround is still needed in qt5.4 (fixed in qt5.5) (MarcoFalke) * Merge pull request #73299d263bd
Typo fixes in comments (Chris Wheeler) * Merge #7396: [Qt] Add option to increase/decrease font size in the console window43abb02
[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 #7628: QT: Add 'copy full transaction details' optionb51ed40
QT: Add 'copy full transaction details' option (Eric Shaw) * Merge #7668: Fix history deletion bug after font size change21e45a0
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
@ -21,6 +21,7 @@ License: GPL-3+
|
|||||||
|
|
||||||
Files: src/qt/res/icons/add.png
|
Files: src/qt/res/icons/add.png
|
||||||
src/qt/res/icons/address-book.png
|
src/qt/res/icons/address-book.png
|
||||||
|
src/qt/res/icons/chevron.png
|
||||||
src/qt/res/icons/configure.png
|
src/qt/res/icons/configure.png
|
||||||
src/qt/res/icons/debugwindow.png
|
src/qt/res/icons/debugwindow.png
|
||||||
src/qt/res/icons/edit.png
|
src/qt/res/icons/edit.png
|
||||||
@ -56,6 +57,8 @@ Comment: Inspired by Stephan Hutchings Typicons
|
|||||||
|
|
||||||
Files: src/qt/res/icons/tx_mined.png
|
Files: src/qt/res/icons/tx_mined.png
|
||||||
src/qt/res/src/mine.svg
|
src/qt/res/src/mine.svg
|
||||||
|
src/qt/res/icons/fontbigger.png
|
||||||
|
src/qt/res/icons/fontsmaller.png
|
||||||
Copyright: Jonas Schnelli
|
Copyright: Jonas Schnelli
|
||||||
License: Expat
|
License: Expat
|
||||||
Comment:
|
Comment:
|
||||||
|
@ -70,7 +70,7 @@ class MerkleBlockTest(BitcoinTestFramework):
|
|||||||
txid_spent = txin_spent["txid"]
|
txid_spent = txin_spent["txid"]
|
||||||
txid_unspent = txid1 if txin_spent["txid"] != txid1 else txid2
|
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
|
# Doesn't apply to Dash Core - we have txindex always on
|
||||||
# assert_raises(JSONRPCException, self.nodes[2].gettxoutproof, [txid_spent])
|
# assert_raises(JSONRPCException, self.nodes[2].gettxoutproof, [txid_spent])
|
||||||
# ...but we can if we specify the block
|
# ...but we can if we specify the block
|
||||||
|
@ -167,6 +167,7 @@ BITCOIN_QT_H = \
|
|||||||
RES_ICONS = \
|
RES_ICONS = \
|
||||||
qt/res/icons/bitcoin.ico \
|
qt/res/icons/bitcoin.ico \
|
||||||
qt/res/icons/bitcoin.png \
|
qt/res/icons/bitcoin.png \
|
||||||
|
qt/res/icons/chevron.png \
|
||||||
qt/res/icons/drkblue/add.png \
|
qt/res/icons/drkblue/add.png \
|
||||||
qt/res/icons/drkblue/address-book.png \
|
qt/res/icons/drkblue/address-book.png \
|
||||||
qt/res/icons/drkblue/browse.png \
|
qt/res/icons/drkblue/browse.png \
|
||||||
@ -217,6 +218,8 @@ RES_ICONS = \
|
|||||||
qt/res/icons/drkblue/about.png \
|
qt/res/icons/drkblue/about.png \
|
||||||
qt/res/icons/drkblue/about_qt.png \
|
qt/res/icons/drkblue/about_qt.png \
|
||||||
qt/res/icons/drkblue/verify.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/add.png \
|
||||||
qt/res/icons/crownium/address-book.png \
|
qt/res/icons/crownium/address-book.png \
|
||||||
qt/res/icons/crownium/browse.png \
|
qt/res/icons/crownium/browse.png \
|
||||||
@ -267,6 +270,8 @@ RES_ICONS = \
|
|||||||
qt/res/icons/crownium/about.png \
|
qt/res/icons/crownium/about.png \
|
||||||
qt/res/icons/crownium/about_qt.png \
|
qt/res/icons/crownium/about_qt.png \
|
||||||
qt/res/icons/crownium/verify.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/add.png \
|
||||||
qt/res/icons/light/address-book.png \
|
qt/res/icons/light/address-book.png \
|
||||||
qt/res/icons/light/browse.png \
|
qt/res/icons/light/browse.png \
|
||||||
@ -317,6 +322,8 @@ RES_ICONS = \
|
|||||||
qt/res/icons/light/about.png \
|
qt/res/icons/light/about.png \
|
||||||
qt/res/icons/light/about_qt.png \
|
qt/res/icons/light/about_qt.png \
|
||||||
qt/res/icons/light/verify.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/add.png \
|
||||||
qt/res/icons/trad/address-book.png \
|
qt/res/icons/trad/address-book.png \
|
||||||
qt/res/icons/trad/browse.png \
|
qt/res/icons/trad/browse.png \
|
||||||
@ -366,7 +373,9 @@ RES_ICONS = \
|
|||||||
qt/res/icons/trad/tx_mined.png \
|
qt/res/icons/trad/tx_mined.png \
|
||||||
qt/res/icons/trad/about.png \
|
qt/res/icons/trad/about.png \
|
||||||
qt/res/icons/trad/about_qt.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 = \
|
BITCOIN_QT_CPP = \
|
||||||
qt/bantablemodel.cpp \
|
qt/bantablemodel.cpp \
|
||||||
|
@ -1447,7 +1447,7 @@ void ThreadMapPort()
|
|||||||
LogPrintf("AddPortMapping(%s, %s, %s) failed with code %d (%s)\n",
|
LogPrintf("AddPortMapping(%s, %s, %s) failed with code %d (%s)\n",
|
||||||
port, port, lanaddr, r, strupnperror(r));
|
port, port, lanaddr, r, strupnperror(r));
|
||||||
else
|
else
|
||||||
LogPrintf("UPnP Port Mapping successful.\n");;
|
LogPrintf("UPnP Port Mapping successful.\n");
|
||||||
|
|
||||||
MilliSleep(20*60*1000); // Refresh every 20 minutes
|
MilliSleep(20*60*1000); // Refresh every 20 minutes
|
||||||
}
|
}
|
||||||
@ -2572,7 +2572,7 @@ bool CConnman::OutboundTargetReached(bool historicalBlockServingLimit)
|
|||||||
|
|
||||||
if (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 timeLeftInCycle = GetMaxOutboundTimeLeftInCycle();
|
||||||
uint64_t buffer = timeLeftInCycle / 600 * MAX_BLOCK_SIZE;
|
uint64_t buffer = timeLeftInCycle / 600 * MAX_BLOCK_SIZE;
|
||||||
if (buffer >= nMaxOutboundLimit || nMaxOutboundTotalBytesSentInCycle >= nMaxOutboundLimit - buffer)
|
if (buffer >= nMaxOutboundLimit || nMaxOutboundTotalBytesSentInCycle >= nMaxOutboundLimit - buffer)
|
||||||
|
@ -133,7 +133,7 @@ bool static LookupIntern(const char *pszName, std::vector<CNetAddr>& vIP, unsign
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
do {
|
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,
|
// generating unnecessary checking call during the polling loop,
|
||||||
// while it can still response to stop request quick enough.
|
// while it can still response to stop request quick enough.
|
||||||
// 2 seconds looks fine in our situation.
|
// 2 seconds looks fine in our situation.
|
||||||
|
@ -87,7 +87,7 @@ double TxConfirmStats::EstimateMedianVal(int confTarget, double sufficientTxVal,
|
|||||||
int maxbucketindex = buckets.size() - 1;
|
int maxbucketindex = buckets.size() - 1;
|
||||||
|
|
||||||
// requireGreater means we are looking for the lowest fee/priority such that all higher
|
// 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
|
// 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.
|
// fee/priority such that all lower values fail, and we go in the opposite direction.
|
||||||
unsigned int startbucket = requireGreater ? maxbucketindex : 0;
|
unsigned int startbucket = requireGreater ? maxbucketindex : 0;
|
||||||
|
@ -29,7 +29,7 @@ class CTxMemPool;
|
|||||||
* included in blocks before transactions of lower fee/priority. So for
|
* 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
|
* 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
|
* 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
|
* 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
|
* 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
|
* the last bucket to pass the test. The average fee of transactions in this
|
||||||
@ -87,13 +87,13 @@ private:
|
|||||||
// Count the total # of txs in each bucket
|
// Count the total # of txs in each bucket
|
||||||
// Track the historical moving average of this total over blocks
|
// Track the historical moving average of this total over blocks
|
||||||
std::vector<double> txCtAvg;
|
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;
|
std::vector<int> curBlockTxCt;
|
||||||
|
|
||||||
// Count the total # of txs confirmed within Y blocks in each bucket
|
// Count the total # of txs confirmed within Y blocks in each bucket
|
||||||
// Track the historical moving average of theses totals over blocks
|
// Track the historical moving average of theses totals over blocks
|
||||||
std::vector<std::vector<double> > confAvg; // confAvg[Y][X]
|
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]
|
std::vector<std::vector<int> > curBlockConf; // curBlockConf[Y][X]
|
||||||
|
|
||||||
// Sum the total priority/fee of all tx's in each bucket
|
// Sum the total priority/fee of all tx's in each bucket
|
||||||
|
@ -104,7 +104,7 @@ int BanTableModel::rowCount(const QModelIndex &parent) const
|
|||||||
int BanTableModel::columnCount(const QModelIndex &parent) const
|
int BanTableModel::columnCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
Q_UNUSED(parent);
|
||||||
return columns.length();;
|
return columns.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant BanTableModel::data(const QModelIndex &index, int role) const
|
QVariant BanTableModel::data(const QModelIndex &index, int role) const
|
||||||
@ -179,4 +179,4 @@ bool BanTableModel::shouldShow()
|
|||||||
if (priv->size() > 0)
|
if (priv->size() > 0)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,7 @@ double ClientModel::getVerificationProgress(const CBlockIndex *tipIn) const
|
|||||||
void ClientModel::updateTimer()
|
void ClientModel::updateTimer()
|
||||||
{
|
{
|
||||||
// no locking required at this point
|
// 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 mempoolSizeChanged(getMempoolSize(), getMempoolDynamicUsage());
|
||||||
Q_EMIT bytesChanged(getTotalBytesRecv(), getTotalBytesSent());
|
Q_EMIT bytesChanged(getTotalBytesRecv(), getTotalBytesSent());
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,7 @@ CoinControlDialog::CoinControlDialog(const PlatformStyle *platformStyle, QWidget
|
|||||||
ui->treeWidget->setColumnWidth(COLUMN_DATE, 80);
|
ui->treeWidget->setColumnWidth(COLUMN_DATE, 80);
|
||||||
ui->treeWidget->setColumnWidth(COLUMN_CONFIRMATIONS, 100);
|
ui->treeWidget->setColumnWidth(COLUMN_CONFIRMATIONS, 100);
|
||||||
ui->treeWidget->setColumnWidth(COLUMN_PRIORITY, 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_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_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
|
ui->treeWidget->setColumnHidden(COLUMN_PRIORITY_INT64, true); // store priority int64 in this column, but don't show it
|
||||||
@ -464,10 +464,8 @@ void CoinControlDialog::viewItemChanged(QTreeWidgetItem* item, int column)
|
|||||||
CoinControlDialog::updateLabels(model, this);
|
CoinControlDialog::updateLabels(model, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: this is a temporary qt5 fix: when clicking a parent node in tree mode, the parent node
|
// TODO: Remove this temporary qt5 fix after Qt5.3 and Qt5.4 are no longer used.
|
||||||
// including all children are partially selected. But the parent node should be fully selected
|
// Fixed in Qt5.5 and above: https://bugreports.qt.io/browse/QTBUG-43473
|
||||||
// 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.
|
|
||||||
#if QT_VERSION >= 0x050000
|
#if QT_VERSION >= 0x050000
|
||||||
else if (column == COLUMN_CHECKBOX && item->childCount() > 0)
|
else if (column == COLUMN_CHECKBOX && item->childCount() > 0)
|
||||||
{
|
{
|
||||||
@ -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 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)));
|
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
|
// how many satoshis the estimated fee can vary per byte we guess wrong
|
||||||
double dFeeVary;
|
double dFeeVary;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<!DOCTYPE RCC><RCC version="1.0">
|
<!DOCTYPE RCC><RCC version="1.0">
|
||||||
<qresource prefix="/icons">
|
<qresource prefix="/icons">
|
||||||
<file alias="bitcoin">res/icons/bitcoin.png</file>
|
<file alias="bitcoin">res/icons/bitcoin.png</file>
|
||||||
|
<file alias="prompticon">res/icons/chevron.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/icons/drkblue">
|
<qresource prefix="/icons/drkblue">
|
||||||
<file alias="address-book">res/icons/drkblue/address-book.png</file>
|
<file alias="address-book">res/icons/drkblue/address-book.png</file>
|
||||||
@ -53,6 +54,8 @@
|
|||||||
<file alias="verify">res/icons/drkblue/verify.png</file>
|
<file alias="verify">res/icons/drkblue/verify.png</file>
|
||||||
<file alias="hd_enabled">res/icons/drkblue/hd_enabled.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="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>
|
||||||
<qresource prefix="/icons/crownium">
|
<qresource prefix="/icons/crownium">
|
||||||
<file alias="address-book">res/icons/crownium/address-book.png</file>
|
<file alias="address-book">res/icons/crownium/address-book.png</file>
|
||||||
@ -105,6 +108,8 @@
|
|||||||
<file alias="verify">res/icons/crownium/verify.png</file>
|
<file alias="verify">res/icons/crownium/verify.png</file>
|
||||||
<file alias="hd_enabled">res/icons/crownium/hd_enabled.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="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>
|
||||||
<qresource prefix="/icons/light">
|
<qresource prefix="/icons/light">
|
||||||
<file alias="address-book">res/icons/light/address-book.png</file>
|
<file alias="address-book">res/icons/light/address-book.png</file>
|
||||||
@ -157,6 +162,8 @@
|
|||||||
<file alias="verify">res/icons/light/verify.png</file>
|
<file alias="verify">res/icons/light/verify.png</file>
|
||||||
<file alias="hd_enabled">res/icons/light/hd_enabled.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="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>
|
||||||
<qresource prefix="/icons/trad">
|
<qresource prefix="/icons/trad">
|
||||||
<file alias="address-book">res/icons/trad/address-book.png</file>
|
<file alias="address-book">res/icons/trad/address-book.png</file>
|
||||||
@ -209,6 +216,8 @@
|
|||||||
<file alias="verify">res/icons/trad/verify.png</file>
|
<file alias="verify">res/icons/trad/verify.png</file>
|
||||||
<file alias="hd_enabled">res/icons/trad/hd_enabled.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="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>
|
||||||
<qresource prefix="/css">
|
<qresource prefix="/css">
|
||||||
<file alias="drkblue">res/css/drkblue.css</file>
|
<file alias="drkblue">res/css/drkblue.css</file>
|
||||||
|
@ -438,6 +438,125 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="fontSmallerButton">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Decrease font size</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../bitcoin.qrc">
|
||||||
|
<normaloff>:/icons/fontsmaller</normaloff>:/icons/fontsmaller</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="autoDefault">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="fontBiggerButton">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Increase font size</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../bitcoin.qrc">
|
||||||
|
<normaloff>:/icons/fontbigger</normaloff>:/icons/fontbigger</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="autoDefault">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="clearButton">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Clear console</string>
|
||||||
|
</property>
|
||||||
|
<property name="layoutDirection">
|
||||||
|
<enum>Qt::LeftToRight</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../bitcoin.qrc">
|
||||||
|
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string notr="true">Ctrl+L</string>
|
||||||
|
</property>
|
||||||
|
<property name="autoDefault">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextEdit" name="messagesWidget">
|
<widget class="QTextEdit" name="messagesWidget">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
@ -458,44 +577,48 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayoutPrompt">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QPushButton" name="promptIcon">
|
||||||
<property name="text">
|
<property name="enabled">
|
||||||
<string notr="true">></string>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="lineEdit"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="clearButton">
|
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>24</width>
|
<width>16</width>
|
||||||
<height>24</height>
|
<height>24</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
|
||||||
<string>Clear console</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../dash.qrc">
|
<iconset resource="../dash.qrc">
|
||||||
<normaloff>:/icons/drkblue/remove</normaloff>:/icons/drkblue/remove</iconset>
|
<normaloff>:/icons/prompticon</normaloff>
|
||||||
|
<disabledoff>:/icons/prompticon</disabledoff>:/icons/prompticon</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="iconSize">
|
||||||
<string notr="true">Ctrl+L</string>
|
<size>
|
||||||
|
<width>14</width>
|
||||||
|
<height>14</height>
|
||||||
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoDefault">
|
<property name="autoDefault">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="lineEdit">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -235,7 +235,7 @@ QString formatBitcoinURI(const SendCoinsRecipient &info)
|
|||||||
|
|
||||||
if (!info.message.isEmpty())
|
if (!info.message.isEmpty())
|
||||||
{
|
{
|
||||||
QString msg(QUrl::toPercentEncoding(info.message));;
|
QString msg(QUrl::toPercentEncoding(info.message));
|
||||||
ret += QString("%1message=%2").arg(paramCount == 0 ? "?" : "&").arg(msg);
|
ret += QString("%1message=%2").arg(paramCount == 0 ? "?" : "&").arg(msg);
|
||||||
paramCount++;
|
paramCount++;
|
||||||
}
|
}
|
||||||
|
@ -1371,8 +1371,8 @@
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+1"/>
|
<location line="+1"/>
|
||||||
<source>Reset all settings changes made over the GUI</source>
|
<source>Reset all settings changed in the GUI</source>
|
||||||
<translation>Reset all settings changes made over the GUI</translation>
|
<translation>Reset all settings changed in the GUI</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+42"/>
|
<location line="+42"/>
|
||||||
|
@ -147,7 +147,7 @@ int PeerTableModel::rowCount(const QModelIndex &parent) const
|
|||||||
int PeerTableModel::columnCount(const QModelIndex &parent) const
|
int PeerTableModel::columnCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
Q_UNUSED(parent);
|
||||||
return columns.length();;
|
return columns.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant PeerTableModel::data(const QModelIndex &index, int role) const
|
QVariant PeerTableModel::data(const QModelIndex &index, int role) const
|
||||||
|
BIN
src/qt/res/icons/chevron.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
src/qt/res/icons/crownium/fontbigger.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/qt/res/icons/crownium/fontsmaller.png
Normal file
After Width: | Height: | Size: 951 B |
BIN
src/qt/res/icons/drkblue/fontbigger.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/qt/res/icons/drkblue/fontsmaller.png
Normal file
After Width: | Height: | Size: 951 B |
BIN
src/qt/res/icons/light/fontbigger.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/qt/res/icons/light/fontsmaller.png
Normal file
After Width: | Height: | Size: 951 B |
BIN
src/qt/res/icons/trad/fontbigger.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/qt/res/icons/trad/fontsmaller.png
Normal file
After Width: | Height: | Size: 951 B |
@ -29,6 +29,7 @@
|
|||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
|
#include <QSettings>
|
||||||
#include <QSignalMapper>
|
#include <QSignalMapper>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
@ -44,7 +45,8 @@
|
|||||||
// TODO: receive errors and debug messages through ClientModel
|
// TODO: receive errors and debug messages through ClientModel
|
||||||
|
|
||||||
const int CONSOLE_HISTORY = 50;
|
const int CONSOLE_HISTORY = 50;
|
||||||
const QSize ICON_SIZE(24, 24);
|
const QSize FONT_RANGE(4, 40);
|
||||||
|
const char fontSizeSettingsKey[] = "consoleFontSize";
|
||||||
|
|
||||||
const TrafficGraphData::GraphRange INITIAL_TRAFFIC_GRAPH_SETTING = TrafficGraphData::Range_30m;
|
const TrafficGraphData::GraphRange INITIAL_TRAFFIC_GRAPH_SETTING = TrafficGraphData::Range_30m;
|
||||||
|
|
||||||
@ -256,7 +258,8 @@ RPCConsole::RPCConsole(const PlatformStyle *platformStyle, QWidget *parent) :
|
|||||||
cachedNodeid(-1),
|
cachedNodeid(-1),
|
||||||
platformStyle(platformStyle),
|
platformStyle(platformStyle),
|
||||||
peersTableContextMenu(0),
|
peersTableContextMenu(0),
|
||||||
banTableContextMenu(0)
|
banTableContextMenu(0),
|
||||||
|
consoleFontSize(0)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
GUIUtil::restoreWindowGeometry("nRPCConsoleWindow", this->size(), this);
|
GUIUtil::restoreWindowGeometry("nRPCConsoleWindow", this->size(), this);
|
||||||
@ -266,12 +269,16 @@ RPCConsole::RPCConsole(const PlatformStyle *platformStyle, QWidget *parent) :
|
|||||||
}
|
}
|
||||||
// Needed on Mac also
|
// Needed on Mac also
|
||||||
ui->clearButton->setIcon(QIcon(":/icons/" + theme + "/remove"));
|
ui->clearButton->setIcon(QIcon(":/icons/" + theme + "/remove"));
|
||||||
|
ui->fontBiggerButton->setIcon(QIcon(":/icons/" + theme + "/fontbigger"));
|
||||||
|
ui->fontSmallerButton->setIcon(QIcon(":/icons/" + theme + "/fontsmaller"));
|
||||||
|
|
||||||
// Install event filter for up and down arrow
|
// Install event filter for up and down arrow
|
||||||
ui->lineEdit->installEventFilter(this);
|
ui->lineEdit->installEventFilter(this);
|
||||||
ui->messagesWidget->installEventFilter(this);
|
ui->messagesWidget->installEventFilter(this);
|
||||||
|
|
||||||
connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clear()));
|
connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clear()));
|
||||||
|
connect(ui->fontBiggerButton, SIGNAL(clicked()), this, SLOT(fontBigger()));
|
||||||
|
connect(ui->fontSmallerButton, SIGNAL(clicked()), this, SLOT(fontSmaller()));
|
||||||
connect(ui->btnClearTrafficGraph, SIGNAL(clicked()), ui->trafficGraph, SLOT(clear()));
|
connect(ui->btnClearTrafficGraph, SIGNAL(clicked()), ui->trafficGraph, SLOT(clear()));
|
||||||
|
|
||||||
// Wallet Repair Buttons
|
// Wallet Repair Buttons
|
||||||
@ -303,6 +310,8 @@ RPCConsole::RPCConsole(const PlatformStyle *platformStyle, QWidget *parent) :
|
|||||||
|
|
||||||
ui->peerHeading->setText(tr("Select a peer to view detailed information."));
|
ui->peerHeading->setText(tr("Select a peer to view detailed information."));
|
||||||
|
|
||||||
|
QSettings settings;
|
||||||
|
consoleFontSize = settings.value(fontSizeSettingsKey, QFontInfo(QFont()).pointSize()).toInt();
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -491,6 +500,41 @@ static QString categoryClass(int category)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RPCConsole::fontBigger()
|
||||||
|
{
|
||||||
|
setFontSize(consoleFontSize+1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void RPCConsole::fontSmaller()
|
||||||
|
{
|
||||||
|
setFontSize(consoleFontSize-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void RPCConsole::setFontSize(int newSize)
|
||||||
|
{
|
||||||
|
QSettings settings;
|
||||||
|
|
||||||
|
//don't allow a insane font size
|
||||||
|
if (newSize < FONT_RANGE.width() || newSize > FONT_RANGE.height())
|
||||||
|
return;
|
||||||
|
|
||||||
|
// temp. store the console content
|
||||||
|
QString str = ui->messagesWidget->toHtml();
|
||||||
|
|
||||||
|
// replace font tags size in current content
|
||||||
|
str.replace(QString("font-size:%1pt").arg(consoleFontSize), QString("font-size:%1pt").arg(newSize));
|
||||||
|
|
||||||
|
// store the new font size
|
||||||
|
consoleFontSize = newSize;
|
||||||
|
settings.setValue(fontSizeSettingsKey, consoleFontSize);
|
||||||
|
|
||||||
|
// clear console (reset icon sizes, default stylesheet) and re-add the content
|
||||||
|
float oldPosFactor = 1.0 / ui->messagesWidget->verticalScrollBar()->maximum() * ui->messagesWidget->verticalScrollBar()->value();
|
||||||
|
clear(false);
|
||||||
|
ui->messagesWidget->setHtml(str);
|
||||||
|
ui->messagesWidget->verticalScrollBar()->setValue(oldPosFactor * ui->messagesWidget->verticalScrollBar()->maximum());
|
||||||
|
}
|
||||||
|
|
||||||
/** Restart wallet with "-salvagewallet" */
|
/** Restart wallet with "-salvagewallet" */
|
||||||
void RPCConsole::walletSalvage()
|
void RPCConsole::walletSalvage()
|
||||||
{
|
{
|
||||||
@ -549,11 +593,14 @@ void RPCConsole::buildParameterlist(QString arg)
|
|||||||
Q_EMIT handleRestart(args);
|
Q_EMIT handleRestart(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RPCConsole::clear()
|
void RPCConsole::clear(bool clearHistory)
|
||||||
{
|
{
|
||||||
ui->messagesWidget->clear();
|
ui->messagesWidget->clear();
|
||||||
history.clear();
|
if(clearHistory)
|
||||||
historyPtr = 0;
|
{
|
||||||
|
history.clear();
|
||||||
|
historyPtr = 0;
|
||||||
|
}
|
||||||
ui->lineEdit->clear();
|
ui->lineEdit->clear();
|
||||||
ui->lineEdit->setFocus();
|
ui->lineEdit->setFocus();
|
||||||
|
|
||||||
@ -568,26 +615,20 @@ void RPCConsole::clear()
|
|||||||
ui->messagesWidget->document()->addResource(
|
ui->messagesWidget->document()->addResource(
|
||||||
QTextDocument::ImageResource,
|
QTextDocument::ImageResource,
|
||||||
QUrl(ICON_MAPPING[i].url),
|
QUrl(ICON_MAPPING[i].url),
|
||||||
QImage(iconPath + iconName).scaled(ICON_SIZE, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
QImage(iconPath + iconName).scaled(QSize(consoleFontSize*2, consoleFontSize*2), Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set default style sheet
|
// Set default style sheet
|
||||||
QFontInfo fixedFontInfo(GUIUtil::fixedPitchFont());
|
QFontInfo fixedFontInfo(GUIUtil::fixedPitchFont());
|
||||||
// Try to make fixed font adequately large on different OS
|
|
||||||
#ifdef WIN32
|
|
||||||
QString ptSize = QString("%1pt").arg(QFontInfo(QFont()).pointSize() * 10 / 8);
|
|
||||||
#else
|
|
||||||
QString ptSize = QString("%1pt").arg(QFontInfo(QFont()).pointSize() * 8.5 / 9);
|
|
||||||
#endif
|
|
||||||
ui->messagesWidget->document()->setDefaultStyleSheet(
|
ui->messagesWidget->document()->setDefaultStyleSheet(
|
||||||
QString(
|
QString(
|
||||||
"table { }"
|
"table { }"
|
||||||
"td.time { color: #808080; padding-top: 3px; } "
|
"td.time { color: #808080; font-size: %2; padding-top: 3px; } "
|
||||||
"td.message { font-family: %1; font-size: %2; white-space:pre-wrap; } "
|
"td.message { font-family: %1; font-size: %2; white-space:pre-wrap; } "
|
||||||
"td.cmd-request { color: #006060; } "
|
"td.cmd-request { color: #006060; } "
|
||||||
"td.cmd-error { color: red; } "
|
"td.cmd-error { color: red; } "
|
||||||
"b { color: #006060; } "
|
"b { color: #006060; } "
|
||||||
).arg(fixedFontInfo.family(), ptSize)
|
).arg(fixedFontInfo.family(), QString("%1pt").arg(consoleFontSize))
|
||||||
);
|
);
|
||||||
|
|
||||||
message(CMD_REPLY, (tr("Welcome to the Dash Core RPC console.") + "<br>" +
|
message(CMD_REPLY, (tr("Welcome to the Dash Core RPC console.") + "<br>" +
|
||||||
|
@ -80,7 +80,10 @@ private Q_SLOTS:
|
|||||||
void clearSelectedNode();
|
void clearSelectedNode();
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void clear();
|
void clear(bool clearHistory = true);
|
||||||
|
void fontBigger();
|
||||||
|
void fontSmaller();
|
||||||
|
void setFontSize(int newSize);
|
||||||
|
|
||||||
/** Wallet repair options */
|
/** Wallet repair options */
|
||||||
void walletSalvage();
|
void walletSalvage();
|
||||||
@ -152,6 +155,7 @@ private:
|
|||||||
RPCTimerInterface *rpcTimerInterface;
|
RPCTimerInterface *rpcTimerInterface;
|
||||||
QMenu *peersTableContextMenu;
|
QMenu *peersTableContextMenu;
|
||||||
QMenu *banTableContextMenu;
|
QMenu *banTableContextMenu;
|
||||||
|
int consoleFontSize;
|
||||||
QCompleter *autoCompleter;
|
QCompleter *autoCompleter;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -904,7 +904,7 @@ void SendCoinsDialog::coinControlUpdateLabels()
|
|||||||
|
|
||||||
if (model->getOptionsModel()->getCoinControlFeatures())
|
if (model->getOptionsModel()->getCoinControlFeatures())
|
||||||
{
|
{
|
||||||
// enable minium absolute fee UI controls
|
// enable minimum absolute fee UI controls
|
||||||
ui->radioCustomAtLeast->setVisible(true);
|
ui->radioCustomAtLeast->setVisible(true);
|
||||||
|
|
||||||
// only enable the feature if inputs are selected
|
// only enable the feature if inputs are selected
|
||||||
|
@ -44,6 +44,8 @@ QString TransactionDesc::FormatTxStatus(const CWalletTx& wtx)
|
|||||||
|
|
||||||
if (fOffline) {
|
if (fOffline) {
|
||||||
strTxStatus = tr("%1/offline").arg(nDepth);
|
strTxStatus = tr("%1/offline").arg(nDepth);
|
||||||
|
} else if (nDepth == 0) {
|
||||||
|
strTxStatus = tr("0/unconfirmed, %1").arg((wtx.InMempool() ? tr("in memory pool") : tr("not in memory pool")));
|
||||||
} else if (nDepth < 6) {
|
} else if (nDepth < 6) {
|
||||||
strTxStatus = tr("%1/unconfirmed").arg(nDepth);
|
strTxStatus = tr("%1/unconfirmed").arg(nDepth);
|
||||||
} else {
|
} else {
|
||||||
|
@ -634,6 +634,33 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
|
|||||||
return QString::fromStdString(rec->hash.ToString());
|
return QString::fromStdString(rec->hash.ToString());
|
||||||
case TxHexRole:
|
case TxHexRole:
|
||||||
return priv->getTxHex(rec);
|
return priv->getTxHex(rec);
|
||||||
|
case TxPlainTextRole:
|
||||||
|
{
|
||||||
|
QString details;
|
||||||
|
QString txLabel = walletModel->getAddressTableModel()->labelForAddress(QString::fromStdString(rec->address));
|
||||||
|
|
||||||
|
details.append(formatTxDate(rec));
|
||||||
|
details.append(" ");
|
||||||
|
details.append(formatTxStatus(rec));
|
||||||
|
details.append(". ");
|
||||||
|
if(!formatTxType(rec).isEmpty()) {
|
||||||
|
details.append(formatTxType(rec));
|
||||||
|
details.append(" ");
|
||||||
|
}
|
||||||
|
if(!rec->address.empty()) {
|
||||||
|
if(txLabel.isEmpty())
|
||||||
|
details.append(tr("(no label)") + " ");
|
||||||
|
else {
|
||||||
|
details.append("(");
|
||||||
|
details.append(txLabel);
|
||||||
|
details.append(") ");
|
||||||
|
}
|
||||||
|
details.append(QString::fromStdString(rec->address));
|
||||||
|
details.append(" ");
|
||||||
|
}
|
||||||
|
details.append(formatTxAmount(rec, false, BitcoinUnits::separatorNever));
|
||||||
|
return details;
|
||||||
|
}
|
||||||
case ConfirmedRole:
|
case ConfirmedRole:
|
||||||
return rec->status.countsForBalance;
|
return rec->status.countsForBalance;
|
||||||
case FormattedAmountRole:
|
case FormattedAmountRole:
|
||||||
|
@ -62,6 +62,8 @@ public:
|
|||||||
TxHashRole,
|
TxHashRole,
|
||||||
/** Transaction data, hex-encoded */
|
/** Transaction data, hex-encoded */
|
||||||
TxHexRole,
|
TxHexRole,
|
||||||
|
/** Whole transaction as plain text */
|
||||||
|
TxPlainTextRole,
|
||||||
/** Is transaction confirmed? */
|
/** Is transaction confirmed? */
|
||||||
ConfirmedRole,
|
ConfirmedRole,
|
||||||
/** Formatted amount, without brackets when unconfirmed */
|
/** Formatted amount, without brackets when unconfirmed */
|
||||||
|
@ -156,6 +156,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
|
|||||||
QAction *copyAmountAction = new QAction(tr("Copy amount"), this);
|
QAction *copyAmountAction = new QAction(tr("Copy amount"), this);
|
||||||
QAction *copyTxIDAction = new QAction(tr("Copy transaction ID"), this);
|
QAction *copyTxIDAction = new QAction(tr("Copy transaction ID"), this);
|
||||||
QAction *copyTxHexAction = new QAction(tr("Copy raw transaction"), this);
|
QAction *copyTxHexAction = new QAction(tr("Copy raw transaction"), this);
|
||||||
|
QAction *copyTxPlainText = new QAction(tr("Copy full transaction details"), this);
|
||||||
QAction *editLabelAction = new QAction(tr("Edit label"), this);
|
QAction *editLabelAction = new QAction(tr("Edit label"), this);
|
||||||
QAction *showDetailsAction = new QAction(tr("Show transaction details"), this);
|
QAction *showDetailsAction = new QAction(tr("Show transaction details"), this);
|
||||||
|
|
||||||
@ -165,6 +166,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
|
|||||||
contextMenu->addAction(copyAmountAction);
|
contextMenu->addAction(copyAmountAction);
|
||||||
contextMenu->addAction(copyTxIDAction);
|
contextMenu->addAction(copyTxIDAction);
|
||||||
contextMenu->addAction(copyTxHexAction);
|
contextMenu->addAction(copyTxHexAction);
|
||||||
|
contextMenu->addAction(copyTxPlainText);
|
||||||
contextMenu->addAction(editLabelAction);
|
contextMenu->addAction(editLabelAction);
|
||||||
contextMenu->addAction(showDetailsAction);
|
contextMenu->addAction(showDetailsAction);
|
||||||
|
|
||||||
@ -188,6 +190,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
|
|||||||
connect(copyAmountAction, SIGNAL(triggered()), this, SLOT(copyAmount()));
|
connect(copyAmountAction, SIGNAL(triggered()), this, SLOT(copyAmount()));
|
||||||
connect(copyTxIDAction, SIGNAL(triggered()), this, SLOT(copyTxID()));
|
connect(copyTxIDAction, SIGNAL(triggered()), this, SLOT(copyTxID()));
|
||||||
connect(copyTxHexAction, SIGNAL(triggered()), this, SLOT(copyTxHex()));
|
connect(copyTxHexAction, SIGNAL(triggered()), this, SLOT(copyTxHex()));
|
||||||
|
connect(copyTxPlainText, SIGNAL(triggered()), this, SLOT(copyTxPlainText()));
|
||||||
connect(editLabelAction, SIGNAL(triggered()), this, SLOT(editLabel()));
|
connect(editLabelAction, SIGNAL(triggered()), this, SLOT(editLabel()));
|
||||||
connect(showDetailsAction, SIGNAL(triggered()), this, SLOT(showDetails()));
|
connect(showDetailsAction, SIGNAL(triggered()), this, SLOT(showDetails()));
|
||||||
}
|
}
|
||||||
@ -427,6 +430,11 @@ void TransactionView::copyTxHex()
|
|||||||
GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::TxHexRole);
|
GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::TxHexRole);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TransactionView::copyTxPlainText()
|
||||||
|
{
|
||||||
|
GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::TxPlainTextRole);
|
||||||
|
}
|
||||||
|
|
||||||
void TransactionView::editLabel()
|
void TransactionView::editLabel()
|
||||||
{
|
{
|
||||||
if(!transactionView->selectionModel() ||!model)
|
if(!transactionView->selectionModel() ||!model)
|
||||||
@ -597,12 +605,8 @@ bool TransactionView::eventFilter(QObject *obj, QEvent *event)
|
|||||||
QKeyEvent *ke = static_cast<QKeyEvent *>(event);
|
QKeyEvent *ke = static_cast<QKeyEvent *>(event);
|
||||||
if (ke->key() == Qt::Key_C && ke->modifiers().testFlag(Qt::ControlModifier))
|
if (ke->key() == Qt::Key_C && ke->modifiers().testFlag(Qt::ControlModifier))
|
||||||
{
|
{
|
||||||
QModelIndex i = this->transactionView->currentIndex();
|
GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::TxPlainTextRole);
|
||||||
if (i.isValid() && i.column() == TransactionTableModel::Amount)
|
return true;
|
||||||
{
|
|
||||||
GUIUtil::setClipboard(i.data(TransactionTableModel::FormattedAmountRole).toString());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return QWidget::eventFilter(obj, event);
|
return QWidget::eventFilter(obj, event);
|
||||||
|
@ -94,6 +94,7 @@ private Q_SLOTS:
|
|||||||
void copyAmount();
|
void copyAmount();
|
||||||
void copyTxID();
|
void copyTxID();
|
||||||
void copyTxHex();
|
void copyTxHex();
|
||||||
|
void copyTxPlainText();
|
||||||
void openThirdPartyTxUrl(QString url);
|
void openThirdPartyTxUrl(QString url);
|
||||||
void updateWatchOnlyColumn(bool fHaveWatchOnly);
|
void updateWatchOnlyColumn(bool fHaveWatchOnly);
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ HelpMessageDialog::HelpMessageDialog(QWidget *parent, HelpMode helpMode) :
|
|||||||
strUsage += HelpMessageOpt("-min", tr("Start minimized").toStdString());
|
strUsage += HelpMessageOpt("-min", tr("Start minimized").toStdString());
|
||||||
strUsage += HelpMessageOpt("-rootcertificates=<file>", tr("Set SSL root certificates for payment request (default: -system-)").toStdString());
|
strUsage += HelpMessageOpt("-rootcertificates=<file>", tr("Set SSL root certificates for payment request (default: -system-)").toStdString());
|
||||||
strUsage += HelpMessageOpt("-splash", strprintf(tr("Show splash screen on startup (default: %u)").toStdString(), DEFAULT_SPLASHSCREEN));
|
strUsage += HelpMessageOpt("-splash", strprintf(tr("Show splash screen on startup (default: %u)").toStdString(), DEFAULT_SPLASHSCREEN));
|
||||||
strUsage += HelpMessageOpt("-resetguisettings", tr("Reset all settings changes made over the GUI").toStdString());
|
strUsage += HelpMessageOpt("-resetguisettings", tr("Reset all settings changed in the GUI").toStdString());
|
||||||
if (showDebug) {
|
if (showDebug) {
|
||||||
strUsage += HelpMessageOpt("-uiplatform", strprintf("Select platform to customize UI for (one of windows, macosx, other; default: %s)", BitcoinGUI::DEFAULT_UIPLATFORM));
|
strUsage += HelpMessageOpt("-uiplatform", strprintf("Select platform to customize UI for (one of windows, macosx, other; default: %s)", BitcoinGUI::DEFAULT_UIPLATFORM));
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ BOOST_AUTO_TEST_CASE(merkle_test)
|
|||||||
int duplicate2 = mutate >= 2 ? 1 << ctz(ntx1) : 0; // Likewise for the second mutation.
|
int duplicate2 = mutate >= 2 ? 1 << ctz(ntx1) : 0; // Likewise for the second mutation.
|
||||||
if (duplicate2 >= ntx1) break;
|
if (duplicate2 >= ntx1) break;
|
||||||
int ntx2 = ntx1 + duplicate2;
|
int ntx2 = ntx1 + duplicate2;
|
||||||
int duplicate3 = mutate >= 3 ? 1 << ctz(ntx2) : 0; // And for the the third mutation.
|
int duplicate3 = mutate >= 3 ? 1 << ctz(ntx2) : 0; // And for the third mutation.
|
||||||
if (duplicate3 >= ntx2) break;
|
if (duplicate3 >= ntx2) break;
|
||||||
int ntx3 = ntx2 + duplicate3;
|
int ntx3 = ntx2 + duplicate3;
|
||||||
// Build a block with ntx different transactions.
|
// Build a block with ntx different transactions.
|
||||||
|
@ -236,7 +236,7 @@ BOOST_AUTO_TEST_CASE(rpc_ban)
|
|||||||
UniValue o1 = ar[0].get_obj();
|
UniValue o1 = ar[0].get_obj();
|
||||||
UniValue adr = find_value(o1, "address");
|
UniValue adr = find_value(o1, "address");
|
||||||
BOOST_CHECK_EQUAL(adr.get_str(), "127.0.0.0/32");
|
BOOST_CHECK_EQUAL(adr.get_str(), "127.0.0.0/32");
|
||||||
BOOST_CHECK_NO_THROW(CallRPC(string("setban 127.0.0.0 remove")));;
|
BOOST_CHECK_NO_THROW(CallRPC(string("setban 127.0.0.0 remove")));
|
||||||
BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
|
BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
|
||||||
ar = r.get_array();
|
ar = r.get_array();
|
||||||
BOOST_CHECK_EQUAL(ar.size(), 0);
|
BOOST_CHECK_EQUAL(ar.size(), 0);
|
||||||
@ -266,7 +266,7 @@ BOOST_AUTO_TEST_CASE(rpc_ban)
|
|||||||
// must throw an exception because 127.0.0.1 is in already banned suubnet range
|
// must throw an exception because 127.0.0.1 is in already banned suubnet range
|
||||||
BOOST_CHECK_THROW(r = CallRPC(string("setban 127.0.0.1 add")), runtime_error);
|
BOOST_CHECK_THROW(r = CallRPC(string("setban 127.0.0.1 add")), runtime_error);
|
||||||
|
|
||||||
BOOST_CHECK_NO_THROW(CallRPC(string("setban 127.0.0.0/24 remove")));;
|
BOOST_CHECK_NO_THROW(CallRPC(string("setban 127.0.0.0/24 remove")));
|
||||||
BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
|
BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
|
||||||
ar = r.get_array();
|
ar = r.get_array();
|
||||||
BOOST_CHECK_EQUAL(ar.size(), 0);
|
BOOST_CHECK_EQUAL(ar.size(), 0);
|
||||||
|
@ -304,7 +304,7 @@ static std::map<std::string,std::string> ParseTorReplyMapping(const std::string
|
|||||||
|
|
||||||
/** Read full contents of a file and return them in a std::string.
|
/** Read full contents of a file and return them in a std::string.
|
||||||
* Returns a pair <status, string>.
|
* Returns a pair <status, string>.
|
||||||
* If an error occured, status will be false, otherwise status will be true and the data will be returned in string.
|
* If an error occurred, status will be false, otherwise status will be true and the data will be returned in string.
|
||||||
*
|
*
|
||||||
* @param maxsize Puts a maximum size limit on the file that is read. If the file is larger than this, truncated data
|
* @param maxsize Puts a maximum size limit on the file that is read. If the file is larger than this, truncated data
|
||||||
* (with len > maxsize) will be returned.
|
* (with len > maxsize) will be returned.
|
||||||
|
@ -1541,7 +1541,7 @@ UniValue listtransactions(const UniValue& params, bool fHelp)
|
|||||||
" 'send' category of transactions.\n"
|
" 'send' category of transactions.\n"
|
||||||
" \"confirmations\": n, (numeric) The number of confirmations for the transaction. Available for 'send' and \n"
|
" \"confirmations\": n, (numeric) The number of confirmations for the transaction. Available for 'send' and \n"
|
||||||
" 'receive' category of transactions. Negative confirmations indicate the\n"
|
" 'receive' category of transactions. Negative confirmations indicate the\n"
|
||||||
" transation conflicts with the block chain\n"
|
" transaction conflicts with the block chain\n"
|
||||||
" \"bcconfirmations\": n, (numeric) The number of blockchain confirmations for the transaction. Available for 'send' and \n"
|
" \"bcconfirmations\": n, (numeric) The number of blockchain confirmations for the transaction. Available for 'send' and \n"
|
||||||
" 'receive' category of transactions. Negative confirmations indicate the\n"
|
" 'receive' category of transactions. Negative confirmations indicate the\n"
|
||||||
" transation conflicts with the block chain\n"
|
" transation conflicts with the block chain\n"
|
||||||
|
@ -17,7 +17,7 @@ class CScript;
|
|||||||
enum isminetype
|
enum isminetype
|
||||||
{
|
{
|
||||||
ISMINE_NO = 0,
|
ISMINE_NO = 0,
|
||||||
//! Indicates that we dont know how to create a scriptSig that would solve this if we were given the appropriate private keys
|
//! Indicates that we don't know how to create a scriptSig that would solve this if we were given the appropriate private keys
|
||||||
ISMINE_WATCH_UNSOLVABLE = 1,
|
ISMINE_WATCH_UNSOLVABLE = 1,
|
||||||
//! Indicates that we know how to create a scriptSig that would solve this if we were given the appropriate private keys
|
//! Indicates that we know how to create a scriptSig that would solve this if we were given the appropriate private keys
|
||||||
ISMINE_WATCH_SOLVABLE = 2,
|
ISMINE_WATCH_SOLVABLE = 2,
|
||||||
|