From 2c02be6dda984f538beb1a33c02bcea612906fa8 Mon Sep 17 00:00:00 2001 From: crowning- Date: Sat, 25 Apr 2015 22:05:37 +0200 Subject: [PATCH 01/11] samba.org redirects to www.samba.org now. Gitian does not like that. --- depends/packages/native_ccache.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/native_ccache.mk b/depends/packages/native_ccache.mk index 3226e89a6..c5c23f7a7 100644 --- a/depends/packages/native_ccache.mk +++ b/depends/packages/native_ccache.mk @@ -1,6 +1,6 @@ package=native_ccache $(package)_version=3.1.9 -$(package)_download_path=http://samba.org/ftp/ccache +$(package)_download_path=http://www.samba.org/ftp/ccache $(package)_file_name=ccache-$($(package)_version).tar.bz2 $(package)_sha256_hash=04d3e2e438ac8d4cc4b110b68cdd61bd59226c6588739a4a386869467f5ced7c From cf7e9886f5f4a3637c19d21288e6463b204e0587 Mon Sep 17 00:00:00 2001 From: crowning- Date: Sat, 25 Apr 2015 23:53:58 +0200 Subject: [PATCH 02/11] Enable dynamic CSS temporarily for debugging --- src/qt/guiutil.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 3832c770b..aa53ec908 100755 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -788,7 +788,8 @@ QString loadStyleSheet() settings.setValue("theme", "drkblue"); } - QFile qFile(cssName); +// QFile qFile(cssName); + QFile qFile("drkblue.css"); if (qFile.open(QFile::ReadOnly)) { styleSheet = QLatin1String(qFile.readAll()); } From 8223e0d34fb0858235a1b080629e1e37db499acf Mon Sep 17 00:00:00 2001 From: crowning- Date: Sun, 26 Apr 2015 00:58:50 +0200 Subject: [PATCH 03/11] Fix for addressbook label problem on Windows --- src/qt/guiutil.cpp | 3 +-- src/qt/res/css/drkblue.css | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index aa53ec908..3832c770b 100755 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -788,8 +788,7 @@ QString loadStyleSheet() settings.setValue("theme", "drkblue"); } -// QFile qFile(cssName); - QFile qFile("drkblue.css"); + QFile qFile(cssName); if (qFile.open(QFile::ReadOnly)) { styleSheet = QLatin1String(qFile.readAll()); } diff --git a/src/qt/res/css/drkblue.css b/src/qt/res/css/drkblue.css index 4e9d8d231..98962498a 100755 --- a/src/qt/res/css/drkblue.css +++ b/src/qt/res/css/drkblue.css @@ -581,6 +581,10 @@ QWidget#AddressBookPage QTableView { /* Address Listing */ font-size:12px; } +QWidget#AddressBookPage QHeaderView::section { /* Min width for Windows fix */ +min-width:260px; +} + /* SETTINGS MENU */ /* Encrypt Wallet and Change Passphrase Dialog */ From 8f505019e931752b6ba22c99331125e8f97176a4 Mon Sep 17 00:00:00 2001 From: crowning- Date: Wed, 29 Apr 2015 23:46:53 +0200 Subject: [PATCH 04/11] Only show most common transaction types by default --- src/qt/transactionfilterproxy.cpp | 2 +- src/qt/transactionfilterproxy.h | 4 +++- src/qt/transactionview.cpp | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) mode change 100755 => 100644 src/qt/transactionview.cpp diff --git a/src/qt/transactionfilterproxy.cpp b/src/qt/transactionfilterproxy.cpp index f9546fddb..359d0f9d4 100644 --- a/src/qt/transactionfilterproxy.cpp +++ b/src/qt/transactionfilterproxy.cpp @@ -21,7 +21,7 @@ TransactionFilterProxy::TransactionFilterProxy(QObject *parent) : dateFrom(MIN_DATE), dateTo(MAX_DATE), addrPrefix(), - typeFilter(ALL_TYPES), + typeFilter(COMMON_TYPES), minAmount(0), limitRows(-1), showInactive(true) diff --git a/src/qt/transactionfilterproxy.h b/src/qt/transactionfilterproxy.h index 9919bc3fd..27122539f 100644 --- a/src/qt/transactionfilterproxy.h +++ b/src/qt/transactionfilterproxy.h @@ -22,7 +22,9 @@ public: static const QDateTime MAX_DATE; /** Type filter bit field (all types) */ static const quint32 ALL_TYPES = 0xFFFFFFFF; - + /** Type filter bit field (all types but Darksend-SPAM) */ + static const quint32 COMMON_TYPES = 4223; + static quint32 TYPE(int type) { return 1<setFixedWidth(TYPE_COLUMN_WIDTH); #endif + typeWidget->addItem(tr("Most Common"), TransactionFilterProxy::COMMON_TYPES); typeWidget->addItem(tr("All"), TransactionFilterProxy::ALL_TYPES); typeWidget->addItem(tr("Received with"), TransactionFilterProxy::TYPE(TransactionRecord::RecvWithAddress) | TransactionFilterProxy::TYPE(TransactionRecord::RecvFromOther)); From e7557f2bafe95b1731d3d8f55e8b57827e9979e9 Mon Sep 17 00:00:00 2001 From: Evan Duffield Date: Wed, 6 May 2015 13:15:44 -0700 Subject: [PATCH 05/11] make masternode votes last 30 days --- configure.ac | 2 +- src/clientversion.h | 2 +- src/rpcdarksend.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index ee0abcef4..624bef4ae 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 0) define(_CLIENT_VERSION_MINOR, 11) define(_CLIENT_VERSION_REVISION, 2) -define(_CLIENT_VERSION_BUILD, 22) +define(_CLIENT_VERSION_BUILD, 23) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2015) AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash]) diff --git a/src/clientversion.h b/src/clientversion.h index 0528571c7..d09c6dc5c 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -12,7 +12,7 @@ #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 11 #define CLIENT_VERSION_REVISION 2 -#define CLIENT_VERSION_BUILD 22 +#define CLIENT_VERSION_BUILD 23 diff --git a/src/rpcdarksend.cpp b/src/rpcdarksend.cpp index 2758134bd..70fa9fa6d 100644 --- a/src/rpcdarksend.cpp +++ b/src/rpcdarksend.cpp @@ -606,7 +606,7 @@ Value masternode(const Array& params, bool fHelp) failed++; continue; } - + CMasternode* pmn = mnodeman.Find(pubKeyMasternode); if(pmn == NULL) { @@ -802,8 +802,8 @@ Value masternodelist(const Array& params, bool fHelp) } else if(strMode == "votes"){ std::string strStatus = "ABSTAIN"; - //voting lasts 7 days, ignore the last vote if it was older than that - if((GetAdjustedTime() - mn.lastVote) < (60*60*8)) + //voting lasts 30 days, ignore the last vote if it was older than that + if((GetAdjustedTime() - mn.lastVote) < (60*60*30*24)) { if(mn.nVote == -1) strStatus = "NAY"; if(mn.nVote == 1) strStatus = "YEA"; From 9646c5ffcb4efb9634ae04ee55a817293dc20154 Mon Sep 17 00:00:00 2001 From: Evan Duffield Date: Wed, 6 May 2015 13:49:49 -0700 Subject: [PATCH 06/11] update github url --- contrib/gitian-descriptors/gitian-linux.yml | 6 +++--- contrib/gitian-descriptors/gitian-osx-dash.yml | 2 +- contrib/gitian-descriptors/gitian-win.yml | 2 +- doc/build-osx.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index 53b0663f8..28e795a58 100755 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -5,7 +5,7 @@ suites: architectures: - "i386" - "amd64" -packages: +packages: - "g++" - "git-core" - "unzip" @@ -22,7 +22,7 @@ packages: - "libqt4-test" reference_datetime: "2014-01-10 00:00:00" remotes: -- "url": "https://github.com/darkcoin/darkcoin.git" +- "url": "https://github.com/dashpay/dash.git" "dir": "dash" files: - "bitcoin-deps-linux32-gitian-r9.zip" @@ -73,7 +73,7 @@ script: | mkdir -p distsrc cd distsrc tar --strip-components=1 -xf ../$DISTNAME - do_configure --bindir=$BINDIR + do_configure --bindir=$BINDIR make $MAKEOPTS make $MAKEOPTS install-strip make $MAKEOPTS clean diff --git a/contrib/gitian-descriptors/gitian-osx-dash.yml b/contrib/gitian-descriptors/gitian-osx-dash.yml index 6228b6a8d..78e6c4d07 100755 --- a/contrib/gitian-descriptors/gitian-osx-dash.yml +++ b/contrib/gitian-descriptors/gitian-osx-dash.yml @@ -14,7 +14,7 @@ packages: reference_datetime: "2014-01-10 00:00:00" remotes: -- "url": "https://github.com/darkcoin/darkcoin.git" +- "url": "https://github.com/dashpay/dash.git" "dir": "dash" files: - "osx-native-depends-r3.tar.gz" diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml index e34447f34..19adfb413 100755 --- a/contrib/gitian-descriptors/gitian-win.yml +++ b/contrib/gitian-descriptors/gitian-win.yml @@ -19,7 +19,7 @@ packages: reference_datetime: "2014-01-10 00:00:00" remotes: -- "url": "https://github.com/darkcoin/darkcoin.git" +- "url": "https://github.com/dashpay/dash.git" "dir": "dash" files: - "qt-win32-5.2.0-gitian-r3.zip" diff --git a/doc/build-osx.md b/doc/build-osx.md index b46e5190e..c79837ca0 100644 --- a/doc/build-osx.md +++ b/doc/build-osx.md @@ -82,7 +82,7 @@ After exiting, you'll get a warning that the install is keg-only, which means it 1. Clone the github tree to get the source code and go into the directory. - git clone https://github.com/darkcoin/darkcoin.git + git clone https://github.com/dashpay/dash.git cd dash 2. Build dashd: From 4a107035c78bc7851729033deb4f549b7f5896bf Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Sat, 9 May 2015 00:06:07 +0300 Subject: [PATCH 07/11] fix boost::get build error --- src/rpcrawtransaction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp index 3db59ae02..b662efec1 100644 --- a/src/rpcrawtransaction.cpp +++ b/src/rpcrawtransaction.cpp @@ -297,7 +297,7 @@ Value listunspent(const Array& params, bool fHelp) CTxDestination address; if (ExtractDestination(pk, address)) { - const CScriptID& hash = boost::get(address); + const CScriptID& hash = boost::get(address); CScript redeemScript; if (pwalletMain->GetCScript(hash, redeemScript)) entry.push_back(Pair("redeemScript", HexStr(redeemScript.begin(), redeemScript.end()))); From 3a6466bced9c900ab7aa693647bf916b34639be4 Mon Sep 17 00:00:00 2001 From: crowning- Date: Sun, 10 May 2015 01:22:35 +0200 Subject: [PATCH 08/11] Show sum of all selected transactions in 'Transactions' tab. --- src/qt/transactionview.cpp | 22 ++++++++++++++++++++++ src/qt/transactionview.h | 7 ++++++- src/qt/walletview.cpp | 23 +++++++++++++++++++++++ src/qt/walletview.h | 5 +++++ 4 files changed, 56 insertions(+), 1 deletion(-) mode change 100644 => 100755 src/qt/transactionview.cpp mode change 100644 => 100755 src/qt/walletview.cpp mode change 100644 => 100755 src/qt/walletview.h diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp old mode 100644 new mode 100755 index eda3ffe96..fa6f6f8e5 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -158,6 +158,7 @@ TransactionView::TransactionView(QWidget *parent) : connect(amountWidget, SIGNAL(textChanged(QString)), this, SLOT(changedAmount(QString))); connect(view, SIGNAL(doubleClicked(QModelIndex)), this, SIGNAL(doubleClicked(QModelIndex))); + connect(view, SIGNAL(clicked(QModelIndex)), this, SLOT(computeSum())); connect(view, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextualMenu(QPoint))); connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(copyAddress())); @@ -415,6 +416,25 @@ void TransactionView::showDetails() } } +/** Compute sum of all selected transactions */ +void TransactionView::computeSum() +{ + QString amountText; + qint64 amount = 0; + int nDisplayUnit = model->getOptionsModel()->getDisplayUnit(); + if(!transactionView->selectionModel()) + return; + QModelIndexList selection = transactionView->selectionModel()->selectedRows(); + + if(!selection.isEmpty()){ + foreach (QModelIndex index, selection){ + amount += index.data(TransactionTableModel::AmountRole).toLongLong(); + } + QString strAmount(BitcoinUnits::formatWithUnit(nDisplayUnit, amount, true)); + emit trxAmount(strAmount); + } +} + void TransactionView::openThirdPartyTxUrl(QString url) { if(!transactionView || !transactionView->selectionModel()) @@ -474,6 +494,8 @@ void TransactionView::focusTransaction(const QModelIndex &idx) if(!transactionProxyModel) return; QModelIndex targetIdx = transactionProxyModel->mapFromSource(idx); + transactionView->selectRow(targetIdx.row()); + computeSum(); transactionView->scrollTo(targetIdx); transactionView->setCurrentIndex(targetIdx); transactionView->setFocus(); diff --git a/src/qt/transactionview.h b/src/qt/transactionview.h index 565a5de6e..9a36c9587 100755 --- a/src/qt/transactionview.h +++ b/src/qt/transactionview.h @@ -94,6 +94,11 @@ signals: /** Fired when a message should be reported to the user */ void message(const QString &title, const QString &message, unsigned int style); + + /** Mark transactions and compute the sum */ + void clicked(QModelIndex); + /** Send computes sum back to wallet-view */ + void trxAmount(QString amount); // TKS public slots: void chooseDate(int idx); @@ -102,7 +107,7 @@ public slots: void changedAmount(const QString &amount); void exportClicked(); void focusTransaction(const QModelIndex&); - + void computeSum(); }; #endif // TRANSACTIONVIEW_H diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp old mode 100644 new mode 100755 index 2c1d73fa7..b18061338 --- a/src/qt/walletview.cpp +++ b/src/qt/walletview.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -47,6 +48,17 @@ WalletView::WalletView(QWidget *parent): exportButton->setIcon(QIcon(":/icons/export")); #endif hbox_buttons->addStretch(); + + // Sum of selected transactions + QLabel *transactionSumLabel = new QLabel(); // Label + transactionSumLabel->setText("Selected amount: "); + hbox_buttons->addWidget(transactionSumLabel); + + transactionSum = new QLabel(); // Amount + transactionSum->setMinimumSize(200, 8); + transactionSum->setTextInteractionFlags(Qt::TextSelectableByMouse); + hbox_buttons->addWidget(transactionSum); + hbox_buttons->addWidget(exportButton); vbox->addLayout(hbox_buttons); transactionsPage->setLayout(vbox); @@ -65,6 +77,11 @@ WalletView::WalletView(QWidget *parent): // Double-clicking on a transaction on the transaction history page shows details connect(transactionView, SIGNAL(doubleClicked(QModelIndex)), transactionView, SLOT(showDetails())); + // Compute sum of selected transactions + connect(transactionView, SIGNAL(clicked(QModelIndex)), transactionView, SLOT(computeSum())); + // Update wallet with sum of selected transactions + connect(transactionView, SIGNAL(trxAmount(QString)), this, SLOT(trxAmount(QString))); + // Clicking on "Export" allows to export the transaction list connect(exportButton, SIGNAL(clicked()), transactionView, SLOT(exportClicked())); @@ -315,3 +332,9 @@ void WalletView::showProgress(const QString &title, int nProgress) else if (progressDialog) progressDialog->setValue(nProgress); } + +/** Update wallet with the sum of the selected transactions */ +void WalletView::trxAmount(QString amount) +{ + transactionSum->setText(amount); +} diff --git a/src/qt/walletview.h b/src/qt/walletview.h old mode 100644 new mode 100755 index 87c583e9c..345b3e3e8 --- a/src/qt/walletview.h +++ b/src/qt/walletview.h @@ -17,6 +17,7 @@ class TransactionView; class WalletModel; QT_BEGIN_NAMESPACE +class QLabel; class QModelIndex; class QProgressDialog; QT_END_NAMESPACE @@ -62,6 +63,7 @@ private: TransactionView *transactionView; QProgressDialog *progressDialog; + QLabel *transactionSum; public slots: /** Switch to overview (home) page */ @@ -104,6 +106,9 @@ public slots: /** Show progress dialog e.g. for rescan */ void showProgress(const QString &title, int nProgress); + + /** Update selected DASH amount from transactionview */ + void trxAmount(QString amount); signals: /** Signal that we want to show the main window */ From 40f742c6be8c987c213a0a44c2df903a55f78497 Mon Sep 17 00:00:00 2001 From: crowning- Date: Sun, 10 May 2015 01:28:03 +0200 Subject: [PATCH 09/11] Show sum of all selected transactions in 'Transactions' tab. (typo + file permission fix) --- src/qt/transactionview.cpp | 0 src/qt/transactionview.h | 2 +- src/qt/walletview.cpp | 0 src/qt/walletview.h | 0 4 files changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 src/qt/transactionview.cpp mode change 100755 => 100644 src/qt/transactionview.h mode change 100755 => 100644 src/qt/walletview.cpp mode change 100755 => 100644 src/qt/walletview.h diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp old mode 100755 new mode 100644 diff --git a/src/qt/transactionview.h b/src/qt/transactionview.h old mode 100755 new mode 100644 index 9a36c9587..59f808c3c --- a/src/qt/transactionview.h +++ b/src/qt/transactionview.h @@ -97,7 +97,7 @@ signals: /** Mark transactions and compute the sum */ void clicked(QModelIndex); - /** Send computes sum back to wallet-view */ + /** Send computed sum back to wallet-view */ void trxAmount(QString amount); // TKS public slots: diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp old mode 100755 new mode 100644 diff --git a/src/qt/walletview.h b/src/qt/walletview.h old mode 100755 new mode 100644 From 575ddb3ecaa8f3285466327a07e4a63dec61e6ef Mon Sep 17 00:00:00 2001 From: crowning- Date: Sun, 10 May 2015 01:30:45 +0200 Subject: [PATCH 10/11] Show sum of all selected transactions in 'Transactions' tab. (Own ToDo marker removed) --- src/qt/transactionview.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/transactionview.h b/src/qt/transactionview.h index 59f808c3c..c46b94116 100644 --- a/src/qt/transactionview.h +++ b/src/qt/transactionview.h @@ -98,7 +98,7 @@ signals: /** Mark transactions and compute the sum */ void clicked(QModelIndex); /** Send computed sum back to wallet-view */ - void trxAmount(QString amount); // TKS + void trxAmount(QString amount); public slots: void chooseDate(int idx); From e9a8b99694856e0e52b3a243dde6941ce1f891b5 Mon Sep 17 00:00:00 2001 From: crowning- Date: Thu, 14 May 2015 08:31:40 +0200 Subject: [PATCH 11/11] Show sum of selected transactions: mouse + key selection added, some general cleanup --- src/qt/transactionview.cpp | 3 +++ src/qt/transactionview.h | 6 ++---- src/qt/walletview.cpp | 2 -- 3 files changed, 5 insertions(+), 6 deletions(-) mode change 100644 => 100755 src/qt/transactionview.cpp diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp old mode 100644 new mode 100755 index fa6f6f8e5..5e8ca0abb --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -196,6 +196,9 @@ void TransactionView::setModel(WalletModel *model) transactionView->setColumnWidth(TransactionTableModel::Type, TYPE_COLUMN_WIDTH); transactionView->setColumnWidth(TransactionTableModel::Amount, AMOUNT_MINIMUM_COLUMN_WIDTH); + // Note: it's a good idea to connect this signal AFTER the model is set + connect(transactionView->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this, SLOT(computeSum())); + columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer(transactionView, AMOUNT_MINIMUM_COLUMN_WIDTH, MINIMUM_COLUMN_WIDTH); if (model->getOptionsModel()) diff --git a/src/qt/transactionview.h b/src/qt/transactionview.h index c46b94116..02873e9e3 100644 --- a/src/qt/transactionview.h +++ b/src/qt/transactionview.h @@ -16,6 +16,7 @@ QT_BEGIN_NAMESPACE class QComboBox; class QDateTimeEdit; class QFrame; +class QItemSelectionModel; class QLineEdit; class QMenu; class QModelIndex; @@ -59,7 +60,6 @@ private: WalletModel *model; TransactionFilterProxy *transactionProxyModel; QTableView *transactionView; - QComboBox *dateWidget; QComboBox *typeWidget; QLineEdit *addressWidget; @@ -94,9 +94,7 @@ signals: /** Fired when a message should be reported to the user */ void message(const QString &title, const QString &message, unsigned int style); - - /** Mark transactions and compute the sum */ - void clicked(QModelIndex); + /** Send computed sum back to wallet-view */ void trxAmount(QString amount); diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp index b18061338..b8ed64242 100644 --- a/src/qt/walletview.cpp +++ b/src/qt/walletview.cpp @@ -77,8 +77,6 @@ WalletView::WalletView(QWidget *parent): // Double-clicking on a transaction on the transaction history page shows details connect(transactionView, SIGNAL(doubleClicked(QModelIndex)), transactionView, SLOT(showDetails())); - // Compute sum of selected transactions - connect(transactionView, SIGNAL(clicked(QModelIndex)), transactionView, SLOT(computeSum())); // Update wallet with sum of selected transactions connect(transactionView, SIGNAL(trxAmount(QString)), this, SLOT(trxAmount(QString)));