diff --git a/src/historywidget.cpp b/src/historywidget.cpp
index 0511ed0..f84934b 100644
--- a/src/historywidget.cpp
+++ b/src/historywidget.cpp
@@ -84,6 +84,11 @@ void HistoryWidget::setModel(TransactionHistoryProxyModel *model, Wallet *wallet
ui->history->hideColumn(TransactionHistoryModel::TxID);
}
+void HistoryWidget::resetModel()
+{
+ ui->history->setModel(nullptr);
+}
+
void HistoryWidget::showTxDetails() {
QModelIndex index = ui->history->currentIndex();
diff --git a/src/historywidget.h b/src/historywidget.h
index d0298c9..20a6a82 100644
--- a/src/historywidget.h
+++ b/src/historywidget.h
@@ -27,6 +27,7 @@ public:
public slots:
void setSearchText(const QString &text);
+ void resetModel();
signals:
void viewOnBlockExplorer(QString txid);
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 86dc636..e5d7d46 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -327,7 +327,12 @@ MainWindow::MainWindow(AppContext *ctx, QWidget *parent) :
connect(ui->coinsWidget, &CoinsWidget::sweepOutput, m_ctx, &AppContext::onSweepOutput);
connect(m_ctx, &AppContext::walletClosing, [=]{
- ui->tabWidget->setCurrentIndex(Tabs::HOME);
+ if (!config()->get(Config::showTabHome).toBool())
+ ui->tabWidget->setCurrentIndex(Tabs::HISTORY);
+ else
+ ui->tabWidget->setCurrentIndex(Tabs::HOME);
+
+ ui->historyWidget->resetModel();
});
// window title
@@ -389,6 +394,10 @@ void MainWindow::initMenu() {
// hide/show tabs
m_tabShowHideSignalMapper = new QSignalMapper(this);
+ connect(ui->actionShow_Home, &QAction::triggered, m_tabShowHideSignalMapper, QOverload<>::of(&QSignalMapper::map));
+ m_tabShowHideMapper["Home"] = new ToggleTab(ui->tabHome, "Home", "Home", ui->actionShow_Home, Config::showTabHome);
+ m_tabShowHideSignalMapper->setMapping(ui->actionShow_Home, "Home");
+
connect(ui->actionShow_Coins, &QAction::triggered, m_tabShowHideSignalMapper, QOverload<>::of(&QSignalMapper::map));
m_tabShowHideMapper["Coins"] = new ToggleTab(ui->tabCoins, "Coins", "Coins", ui->actionShow_Coins, Config::showTabCoins);
m_tabShowHideSignalMapper->setMapping(ui->actionShow_Coins, "Coins");
diff --git a/src/mainwindow.ui b/src/mainwindow.ui
index 460f1f2..1b06402 100644
--- a/src/mainwindow.ui
+++ b/src/mainwindow.ui
@@ -463,6 +463,7 @@
View
+
@@ -714,6 +715,11 @@
Rescan spent
+
+
+ Show Home
+
+
diff --git a/src/utils/config.cpp b/src/utils/config.cpp
index 6938a46..0541eb4 100644
--- a/src/utils/config.cpp
+++ b/src/utils/config.cpp
@@ -36,6 +36,7 @@ static const QHash configStrings = {
{Config::websocketEnabled,{QS("websocketEnabled"), true}},
{Config::nodeSource,{QS("nodeSource"), 0}},
{Config::useOnionNodes,{QS("useOnionNodes"), false}},
+ {Config::showTabHome,{QS("showTabHome"), true}},
{Config::showTabCoins,{QS("showTabCoins"), false}},
{Config::showTabExchange, {QS("showTabExchange"), true}},
{Config::showTabXMRig,{QS("showTabXMRig"), false}},
diff --git a/src/utils/config.h b/src/utils/config.h
index eb8e9cb..460a8b8 100644
--- a/src/utils/config.h
+++ b/src/utils/config.h
@@ -38,6 +38,7 @@ public:
websocketEnabled,
nodeSource,
useOnionNodes,
+ showTabHome,
showTabCoins,
showTabExchange,
showTabCalc,