aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-08-04 04:41:01 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2011-08-04 04:41:01 +0200
commit1b392019664239e68d7f529465abe2bdef230989 (patch)
tree8a1d8f9c0059a2fd9bf604e9909a3bad8dd71607
parent186f3e2f0c21dc1cef68cb4b36e4bf65e2e7d7de (diff)
when clicking a transaction on the overview page, send the user to the transactions page
-rw-r--r--src/qt/bitcoingui.cpp5
-rw-r--r--src/qt/overviewpage.cpp7
-rw-r--r--src/qt/overviewpage.h7
3 files changed, 15 insertions, 4 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 655ae5ca77..6e7606549a 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -154,7 +154,10 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
syncIconMovie = new QMovie(":/movies/update_spinner", "mng", this);
- gotoOverviewPage();
+ // Clicking on a transaction simply sends you to transaction history page
+ connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), this, SLOT(gotoHistoryPage()));
+
+ gotoOverviewPage();
}
void BitcoinGUI::createActions()
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 8aa3bb860c..778ee037af 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -103,9 +103,9 @@ OverviewPage::OverviewPage(QWidget *parent) :
ui->labelBalance->setToolTip(tr("Your current balance"));
ui->labelBalance->setTextInteractionFlags(Qt::TextSelectableByMouse|Qt::TextSelectableByKeyboard);
- // Balance: <balance>
+ // Unconfirmed balance: <balance>
ui->labelUnconfirmed->setFont(QFont("Monospace", -1, QFont::Bold));
- ui->labelUnconfirmed->setToolTip(tr("Balance of transactions that have yet to be confirmed"));
+ ui->labelUnconfirmed->setToolTip(tr("Total of transactions that have yet to be confirmed, and do not yet count toward the current balance"));
ui->labelUnconfirmed->setTextInteractionFlags(Qt::TextSelectableByMouse|Qt::TextSelectableByKeyboard);
ui->labelNumTransactions->setToolTip(tr("Total number of transactions in wallet"));
@@ -116,6 +116,8 @@ OverviewPage::OverviewPage(QWidget *parent) :
ui->listTransactions->setIconSize(QSize(DECORATION_SIZE, DECORATION_SIZE));
ui->listTransactions->setSelectionMode(QAbstractItemView::NoSelection);
ui->listTransactions->setMinimumHeight(NUM_ITEMS * (DECORATION_SIZE + 2));
+
+ connect(ui->listTransactions, SIGNAL(clicked(QModelIndex)), this, SIGNAL(transactionClicked(QModelIndex)));
}
OverviewPage::~OverviewPage()
@@ -142,7 +144,6 @@ void OverviewPage::setModel(WalletModel *model)
this->model = model;
// Set up transaction list
-
TransactionFilterProxy *filter = new TransactionFilterProxy();
filter->setSourceModel(model->getTransactionTableModel());
filter->setLimit(NUM_ITEMS);
diff --git a/src/qt/overviewpage.h b/src/qt/overviewpage.h
index 2abddf16a6..4b4cc922ca 100644
--- a/src/qt/overviewpage.h
+++ b/src/qt/overviewpage.h
@@ -3,6 +3,10 @@
#include <QWidget>
+QT_BEGIN_NAMESPACE
+class QModelIndex;
+QT_END_NAMESPACE
+
namespace Ui {
class OverviewPage;
}
@@ -23,6 +27,9 @@ public slots:
void setBalance(qint64 balance, qint64 unconfirmedBalance);
void setNumTransactions(int count);
+signals:
+ void transactionClicked(const QModelIndex &index);
+
private:
Ui::OverviewPage *ui;
WalletModel *model;