aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-02-08 16:30:23 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-02-08 18:41:41 +0200
commitee151d032789fa03daa44ab44dd0fd70e51b145c (patch)
treeb023bc7ff69a2ccb9e7cc3784363e1b6f2ea317e /src/qt
parent78189daac8d13870ab6ed8421b9ed067cf7ebac5 (diff)
downloadbitcoin-ee151d032789fa03daa44ab44dd0fd70e51b145c.tar.xz
qt: Drop BitcoinGUI::toggleHideAction member
Also dropped useless tooltip.
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoingui.cpp8
-rw-r--r--src/qt/bitcoingui.h1
2 files changed, 2 insertions, 7 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 1c497960cb..ea976302ab 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -315,8 +315,6 @@ void BitcoinGUI::createActions()
optionsAction->setStatusTip(tr("Modify configuration options for %1").arg(PACKAGE_NAME));
optionsAction->setMenuRole(QAction::PreferencesRole);
optionsAction->setEnabled(false);
- toggleHideAction = new QAction(tr("&Show / Hide"), this);
- toggleHideAction->setStatusTip(tr("Show or hide the main Window"));
encryptWalletAction = new QAction(tr("&Encrypt Wallet…"), this);
encryptWalletAction->setStatusTip(tr("Encrypt the private keys that belong to your wallet"));
@@ -376,7 +374,6 @@ void BitcoinGUI::createActions()
connect(aboutAction, &QAction::triggered, this, &BitcoinGUI::aboutClicked);
connect(aboutQtAction, &QAction::triggered, qApp, QApplication::aboutQt);
connect(optionsAction, &QAction::triggered, this, &BitcoinGUI::optionsClicked);
- connect(toggleHideAction, &QAction::triggered, this, &BitcoinGUI::toggleHidden);
connect(showHelpMessageAction, &QAction::triggered, this, &BitcoinGUI::showHelpMessageClicked);
connect(openRPCConsoleAction, &QAction::triggered, this, &BitcoinGUI::showDebugWindow);
// prevents an open debug window from becoming stuck/unusable on client shutdown
@@ -627,8 +624,6 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel, interfaces::BlockAndH
trayIcon->setVisible(optionsModel->getShowTrayIcon());
}
} else {
- // Disable possibility to show main window via action
- toggleHideAction->setEnabled(false);
if(trayIconMenu)
{
// Disable context menu on tray icon
@@ -788,9 +783,10 @@ void BitcoinGUI::createTrayIconMenu()
#endif // Q_OS_MAC
// Configuration of the tray icon (or Dock icon) menu.
+ QAction* show_hide_action{nullptr};
#ifndef Q_OS_MAC
// Note: On macOS, the Dock icon's menu already has Show / Hide action.
- trayIconMenu->addAction(toggleHideAction);
+ show_hide_action = trayIconMenu->addAction(tr("Show / &Hide"), this, &BitcoinGUI::toggleHidden);
trayIconMenu->addSeparator();
#endif // Q_OS_MAC
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index 896c4c52c6..887cf3f33d 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -148,7 +148,6 @@ private:
QAction* receiveCoinsAction = nullptr;
QAction* receiveCoinsMenuAction = nullptr;
QAction* optionsAction = nullptr;
- QAction* toggleHideAction = nullptr;
QAction* encryptWalletAction = nullptr;
QAction* backupWalletAction = nullptr;
QAction* changePassphraseAction = nullptr;