Only show most common transaction types by default

This commit is contained in:
crowning- 2015-04-29 23:46:53 +02:00
parent 8223e0d34f
commit 8f505019e9
3 changed files with 5 additions and 2 deletions

View File

@ -21,7 +21,7 @@ TransactionFilterProxy::TransactionFilterProxy(QObject *parent) :
dateFrom(MIN_DATE), dateFrom(MIN_DATE),
dateTo(MAX_DATE), dateTo(MAX_DATE),
addrPrefix(), addrPrefix(),
typeFilter(ALL_TYPES), typeFilter(COMMON_TYPES),
minAmount(0), minAmount(0),
limitRows(-1), limitRows(-1),
showInactive(true) showInactive(true)

View File

@ -22,6 +22,8 @@ public:
static const QDateTime MAX_DATE; static const QDateTime MAX_DATE;
/** Type filter bit field (all types) */ /** Type filter bit field (all types) */
static const quint32 ALL_TYPES = 0xFFFFFFFF; 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<<type; } static quint32 TYPE(int type) { return 1<<type; }

1
src/qt/transactionview.cpp Executable file → Normal file
View File

@ -73,6 +73,7 @@ TransactionView::TransactionView(QWidget *parent) :
typeWidget->setFixedWidth(TYPE_COLUMN_WIDTH); typeWidget->setFixedWidth(TYPE_COLUMN_WIDTH);
#endif #endif
typeWidget->addItem(tr("Most Common"), TransactionFilterProxy::COMMON_TYPES);
typeWidget->addItem(tr("All"), TransactionFilterProxy::ALL_TYPES); typeWidget->addItem(tr("All"), TransactionFilterProxy::ALL_TYPES);
typeWidget->addItem(tr("Received with"), TransactionFilterProxy::TYPE(TransactionRecord::RecvWithAddress) | typeWidget->addItem(tr("Received with"), TransactionFilterProxy::TYPE(TransactionRecord::RecvWithAddress) |
TransactionFilterProxy::TYPE(TransactionRecord::RecvFromOther)); TransactionFilterProxy::TYPE(TransactionRecord::RecvFromOther));