Skip to content

Commit ee151d0

Browse files
committed
qt: Drop BitcoinGUI::toggleHideAction member
Also dropped useless tooltip.
1 parent 78189da commit ee151d0

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/qt/bitcoingui.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,6 @@ void BitcoinGUI::createActions()
315315
optionsAction->setStatusTip(tr("Modify configuration options for %1").arg(PACKAGE_NAME));
316316
optionsAction->setMenuRole(QAction::PreferencesRole);
317317
optionsAction->setEnabled(false);
318-
toggleHideAction = new QAction(tr("&Show / Hide"), this);
319-
toggleHideAction->setStatusTip(tr("Show or hide the main Window"));
320318

321319
encryptWalletAction = new QAction(tr("&Encrypt Wallet…"), this);
322320
encryptWalletAction->setStatusTip(tr("Encrypt the private keys that belong to your wallet"));
@@ -376,7 +374,6 @@ void BitcoinGUI::createActions()
376374
connect(aboutAction, &QAction::triggered, this, &BitcoinGUI::aboutClicked);
377375
connect(aboutQtAction, &QAction::triggered, qApp, QApplication::aboutQt);
378376
connect(optionsAction, &QAction::triggered, this, &BitcoinGUI::optionsClicked);
379-
connect(toggleHideAction, &QAction::triggered, this, &BitcoinGUI::toggleHidden);
380377
connect(showHelpMessageAction, &QAction::triggered, this, &BitcoinGUI::showHelpMessageClicked);
381378
connect(openRPCConsoleAction, &QAction::triggered, this, &BitcoinGUI::showDebugWindow);
382379
// prevents an open debug window from becoming stuck/unusable on client shutdown
@@ -627,8 +624,6 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel, interfaces::BlockAndH
627624
trayIcon->setVisible(optionsModel->getShowTrayIcon());
628625
}
629626
} else {
630-
// Disable possibility to show main window via action
631-
toggleHideAction->setEnabled(false);
632627
if(trayIconMenu)
633628
{
634629
// Disable context menu on tray icon
@@ -788,9 +783,10 @@ void BitcoinGUI::createTrayIconMenu()
788783
#endif // Q_OS_MAC
789784

790785
// Configuration of the tray icon (or Dock icon) menu.
786+
QAction* show_hide_action{nullptr};
791787
#ifndef Q_OS_MAC
792788
// Note: On macOS, the Dock icon's menu already has Show / Hide action.
793-
trayIconMenu->addAction(toggleHideAction);
789+
show_hide_action = trayIconMenu->addAction(tr("Show / &Hide"), this, &BitcoinGUI::toggleHidden);
794790
trayIconMenu->addSeparator();
795791
#endif // Q_OS_MAC
796792

src/qt/bitcoingui.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ class BitcoinGUI : public QMainWindow
148148
QAction* receiveCoinsAction = nullptr;
149149
QAction* receiveCoinsMenuAction = nullptr;
150150
QAction* optionsAction = nullptr;
151-
QAction* toggleHideAction = nullptr;
152151
QAction* encryptWalletAction = nullptr;
153152
QAction* backupWalletAction = nullptr;
154153
QAction* changePassphraseAction = nullptr;

0 commit comments

Comments
 (0)