Merge branch 'v0.12.0.x' of https://github.com/dashpay/dash into v0.12.0.x

This commit is contained in:
Evan Duffield 2015-07-12 14:04:00 -07:00
commit 8e7c4e7491
6 changed files with 27 additions and 22 deletions

View File

@ -129,7 +129,7 @@ CoinControlDialog::CoinControlDialog(QWidget *parent) :
ui->treeWidget->setColumnWidth(COLUMN_AMOUNT, 100); ui->treeWidget->setColumnWidth(COLUMN_AMOUNT, 100);
ui->treeWidget->setColumnWidth(COLUMN_LABEL, 170); ui->treeWidget->setColumnWidth(COLUMN_LABEL, 170);
ui->treeWidget->setColumnWidth(COLUMN_ADDRESS, 190); ui->treeWidget->setColumnWidth(COLUMN_ADDRESS, 190);
ui->treeWidget->setColumnWidth(COLUMN_DARKSEND_ROUNDS, 120); ui->treeWidget->setColumnWidth(COLUMN_DARKSEND_ROUNDS, 88);
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);
@ -778,6 +778,7 @@ void CoinControlDialog::updateView()
// amount // amount
itemOutput->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, out.tx->vout[out.i].nValue)); itemOutput->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, out.tx->vout[out.i].nValue));
itemOutput->setToolTip(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, out.tx->vout[out.i].nValue));
itemOutput->setText(COLUMN_AMOUNT_INT64, strPad(QString::number(out.tx->vout[out.i].nValue), 15, " ")); // padding so that sorting works correctly itemOutput->setText(COLUMN_AMOUNT_INT64, strPad(QString::number(out.tx->vout[out.i].nValue), 15, " ")); // padding so that sorting works correctly
// date // date
@ -790,8 +791,8 @@ void CoinControlDialog::updateView()
CTxIn vin = CTxIn(out.tx->GetHash(), out.i); CTxIn vin = CTxIn(out.tx->GetHash(), out.i);
int rounds = GetInputDarksendRounds(vin); int rounds = GetInputDarksendRounds(vin);
if(rounds >= 0) itemOutput->setText(COLUMN_DARKSEND_ROUNDS, strPad(QString::number(rounds), 15, " ")); if(rounds >= 0) itemOutput->setText(COLUMN_DARKSEND_ROUNDS, strPad(QString::number(rounds), 11, " "));
else itemOutput->setText(COLUMN_DARKSEND_ROUNDS, strPad(QString(tr("n/a")), 15, " ")); else itemOutput->setText(COLUMN_DARKSEND_ROUNDS, strPad(QString(tr("n/a")), 11, " "));
// confirmations // confirmations
@ -831,6 +832,7 @@ void CoinControlDialog::updateView()
dPrioritySum = dPrioritySum / (nInputSum + 78); dPrioritySum = dPrioritySum / (nInputSum + 78);
itemWalletAddress->setText(COLUMN_CHECKBOX, "(" + QString::number(nChildren) + ")"); itemWalletAddress->setText(COLUMN_CHECKBOX, "(" + QString::number(nChildren) + ")");
itemWalletAddress->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, nSum)); itemWalletAddress->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, nSum));
itemWalletAddress->setToolTip(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, nSum));
itemWalletAddress->setText(COLUMN_AMOUNT_INT64, strPad(QString::number(nSum), 15, " ")); itemWalletAddress->setText(COLUMN_AMOUNT_INT64, strPad(QString::number(nSum), 15, " "));
itemWalletAddress->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(dPrioritySum, mempoolEstimatePriority)); itemWalletAddress->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(dPrioritySum, mempoolEstimatePriority));
itemWalletAddress->setText(COLUMN_PRIORITY_INT64, strPad(QString::number((int64_t)dPrioritySum), 20, " ")); itemWalletAddress->setText(COLUMN_PRIORITY_INT64, strPad(QString::number((int64_t)dPrioritySum), 20, " "));

View File

@ -6,7 +6,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1000</width> <width>954</width>
<height>500</height> <height>500</height>
</rect> </rect>
</property> </property>
@ -431,7 +431,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="columnCount"> <property name="columnCount">
<number>12</number> <number>13</number>
</property> </property>
<attribute name="headerShowSortIndicator" stdset="0"> <attribute name="headerShowSortIndicator" stdset="0">
<bool>true</bool> <bool>true</bool>
@ -461,7 +461,7 @@
</column> </column>
<column> <column>
<property name="text"> <property name="text">
<string>Darksend Rounds</string> <string>DS Rounds</string>
</property> </property>
</column> </column>
<column> <column>

2
src/qt/forms/optionsdialog.ui Executable file → Normal file
View File

@ -225,7 +225,7 @@
<item> <item>
<widget class="QCheckBox" name="spendZeroConfChange"> <widget class="QCheckBox" name="spendZeroConfChange">
<property name="toolTip"> <property name="toolTip">
<string>If you disable the spending of unconfirmed change, the change from a transaction cannot be used until that transaction has at least one confirmation. This also affects how your balance is computed.</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If you disable the spending of unconfirmed change, the change from a transaction&lt;/p&gt;&lt;p&gt;cannot be used until that transaction has at least one confirmation.&lt;/p&gt;&lt;p&gt;This also affects how your balance is computed.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="text"> <property name="text">
<string>&amp;Spend unconfirmed change</string> <string>&amp;Spend unconfirmed change</string>

0
src/qt/forms/rpcconsole.ui Executable file → Normal file
View File

View File

@ -359,26 +359,31 @@ void OverviewPage::updateDarksendProgress()
// progress of denominating // progress of denominating
float denomPart = 0; float denomPart = 0;
// mixing progress of denominated balance // mixing progress of denominated balance
float anonPart = 0; float anonNormPart = 0;
// completeness of full amount anonimization
float anonFullPart = 0;
int64_t denominatedBalance = pwalletMain->GetDenominatedBalance() + nDenominatedUnconfirmedBalance; int64_t denominatedBalance = pwalletMain->GetDenominatedBalance() + nDenominatedUnconfirmedBalance;
denomPart = (float)denominatedBalance / nMaxToAnonymize; denomPart = (float)denominatedBalance / nMaxToAnonymize;
denomPart = denomPart > 1 ? 1 : denomPart; denomPart = denomPart > 1 ? 1 : denomPart;
anonPart = (float)pwalletMain->GetNormalizedAnonymizedBalance() / nMaxToAnonymize; anonNormPart = (float)pwalletMain->GetNormalizedAnonymizedBalance() / nMaxToAnonymize;
// if anonPart is > 1 then we are done, make denomPart equal 1 too anonNormPart = anonNormPart > 1 ? 1 : anonNormPart;
anonPart = anonPart > 1 ? (denomPart = 1, 1) : anonPart;
anonFullPart = (float)pwalletMain->GetAnonymizedBalance() / nMaxToAnonymize;
anonFullPart = anonFullPart > 1 ? 1 : anonFullPart;
// apply some weights to them (sum should be <=100) and calculate the whole progress // apply some weights to them (sum should be <=100) and calculate the whole progress
denomPart = ceilf((denomPart * 20) * 100) / 100; denomPart = ceilf((denomPart * 20) * 100) / 100;
anonPart = ceilf((anonPart * 80) * 100) / 100; anonNormPart = ceilf((anonNormPart * 50) * 100) / 100;
float progress = denomPart + anonPart; anonFullPart = ceilf((anonFullPart * 30) * 100) / 100;
float progress = denomPart + anonNormPart + anonFullPart;
if(progress >= 100) progress = 100; if(progress >= 100) progress = 100;
ui->darksendProgress->setValue(progress); ui->darksendProgress->setValue(progress);
QString strToolPip = tr("Progress: %1% (%2% + %3%; denominated inputs have %4 of %n rounds on average)", "", nDarksendRounds) QString strToolPip = tr("Progress: %1% (%2% + %3% + %4%; denominated inputs have %5 of %n rounds on average)", "", nDarksendRounds)
.arg(progress).arg(denomPart).arg(anonPart).arg(pwalletMain->GetAverageAnonymizedRounds()); .arg(progress).arg(denomPart).arg(anonNormPart).arg(anonFullPart).arg(pwalletMain->GetAverageAnonymizedRounds());
ui->darksendProgress->setToolTip(strToolPip); ui->darksendProgress->setToolTip(strToolPip);
} }

View File

@ -472,14 +472,12 @@ void TransactionView::computeSum()
return; return;
QModelIndexList selection = transactionView->selectionModel()->selectedRows(); QModelIndexList selection = transactionView->selectionModel()->selectedRows();
if(!selection.isEmpty()){ foreach (QModelIndex index, selection){
foreach (QModelIndex index, selection){ amount += index.data(TransactionTableModel::AmountRole).toLongLong();
amount += index.data(TransactionTableModel::AmountRole).toLongLong();
}
QString strAmount(BitcoinUnits::formatWithUnit(nDisplayUnit, amount, true, BitcoinUnits::separatorAlways));
if (amount < 0) strAmount = "<span style='color:red;'>" + strAmount + "</span>";
emit trxAmount(strAmount);
} }
QString strAmount(BitcoinUnits::formatWithUnit(nDisplayUnit, amount, true, BitcoinUnits::separatorAlways));
if (amount < 0) strAmount = "<span style='color:red;'>" + strAmount + "</span>";
emit trxAmount(strAmount);
} }
void TransactionView::openThirdPartyTxUrl(QString url) void TransactionView::openThirdPartyTxUrl(QString url)