Rename "History" tab to more logical "Transactions", move "Number of transactions" from status bar to overview page
This commit is contained in:
parent
fac047480d
commit
d52a0f3bca
5 changed files with 29 additions and 10 deletions
|
@ -104,11 +104,6 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
|
||||||
labelBlocks->setMinimumWidth(130);
|
labelBlocks->setMinimumWidth(130);
|
||||||
labelBlocks->setToolTip(tr("Number of blocks in the block chain"));
|
labelBlocks->setToolTip(tr("Number of blocks in the block chain"));
|
||||||
|
|
||||||
labelTransactions = new QLabel();
|
|
||||||
labelTransactions->setFrameStyle(QFrame::Panel | QFrame::Sunken);
|
|
||||||
labelTransactions->setMinimumWidth(130);
|
|
||||||
labelTransactions->setToolTip(tr("Number of transactions in your wallet"));
|
|
||||||
|
|
||||||
// Progress bar for blocks download
|
// Progress bar for blocks download
|
||||||
progressBarLabel = new QLabel(tr("Synchronizing with network..."));
|
progressBarLabel = new QLabel(tr("Synchronizing with network..."));
|
||||||
progressBarLabel->setVisible(false);
|
progressBarLabel->setVisible(false);
|
||||||
|
@ -120,7 +115,6 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
|
||||||
statusBar()->addWidget(progressBar);
|
statusBar()->addWidget(progressBar);
|
||||||
statusBar()->addPermanentWidget(labelConnections);
|
statusBar()->addPermanentWidget(labelConnections);
|
||||||
statusBar()->addPermanentWidget(labelBlocks);
|
statusBar()->addPermanentWidget(labelBlocks);
|
||||||
statusBar()->addPermanentWidget(labelTransactions);
|
|
||||||
|
|
||||||
createTrayIcon();
|
createTrayIcon();
|
||||||
|
|
||||||
|
@ -133,7 +127,7 @@ void BitcoinGUI::createActions()
|
||||||
overviewAction = new QAction(QIcon(":/icons/overview"), tr("&Overview"), this);
|
overviewAction = new QAction(QIcon(":/icons/overview"), tr("&Overview"), this);
|
||||||
overviewAction->setCheckable(true);
|
overviewAction->setCheckable(true);
|
||||||
tabGroup->addAction(overviewAction);
|
tabGroup->addAction(overviewAction);
|
||||||
historyAction = new QAction(QIcon(":/icons/history"), tr("&History"), this);
|
historyAction = new QAction(QIcon(":/icons/history"), tr("&Transactions"), this);
|
||||||
historyAction->setCheckable(true);
|
historyAction->setCheckable(true);
|
||||||
tabGroup->addAction(historyAction);
|
tabGroup->addAction(historyAction);
|
||||||
|
|
||||||
|
@ -318,7 +312,7 @@ void BitcoinGUI::setNumBlocks(int count)
|
||||||
|
|
||||||
void BitcoinGUI::setNumTransactions(int count)
|
void BitcoinGUI::setNumTransactions(int count)
|
||||||
{
|
{
|
||||||
labelTransactions->setText(tr("%n transaction(s)", "", count));
|
overviewPage->setNumTransactions(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitcoinGUI::error(const QString &title, const QString &message)
|
void BitcoinGUI::error(const QString &title, const QString &message)
|
||||||
|
|
|
@ -51,7 +51,6 @@ private:
|
||||||
QLabel *labelConnections;
|
QLabel *labelConnections;
|
||||||
QLabel *labelConnectionsIcon;
|
QLabel *labelConnectionsIcon;
|
||||||
QLabel *labelBlocks;
|
QLabel *labelBlocks;
|
||||||
QLabel *labelTransactions;
|
|
||||||
QLabel *progressBarLabel;
|
QLabel *progressBarLabel;
|
||||||
QProgressBar *progressBar;
|
QProgressBar *progressBar;
|
||||||
|
|
||||||
|
|
|
@ -26,10 +26,16 @@
|
||||||
<property name="fieldGrowthPolicy">
|
<property name="fieldGrowthPolicy">
|
||||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="horizontalSpacing">
|
||||||
|
<number>12</number>
|
||||||
|
</property>
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>12</number>
|
||||||
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Balance</string>
|
<string>Balance:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -40,6 +46,20 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Number of transactions:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLabel" name="labelNumTransactions">
|
||||||
|
<property name="text">
|
||||||
|
<string>0</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -30,3 +30,8 @@ void OverviewPage::setBalance(qint64 balance)
|
||||||
{
|
{
|
||||||
ui->labelBalance->setText(GUIUtil::formatMoney(balance) + QString(" BTC"));
|
ui->labelBalance->setText(GUIUtil::formatMoney(balance) + QString(" BTC"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OverviewPage::setNumTransactions(int count)
|
||||||
|
{
|
||||||
|
ui->labelNumTransactions->setText(QLocale::system().toString(count));
|
||||||
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ public:
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setBalance(qint64 balance);
|
void setBalance(qint64 balance);
|
||||||
|
void setNumTransactions(int count);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::OverviewPage *ui;
|
Ui::OverviewPage *ui;
|
||||||
|
|
Loading…
Reference in a new issue