diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2023-09-12 11:15:41 -0300 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-10-03 15:59:17 +0100 |
commit | f31899d19a0333e87c3690b3d3c2b574abb357fa (patch) | |
tree | 8189a870423422e4d9dfd41838a33ce29245d5f0 | |
parent | 64ffa9423197c2dad2f5c5d812e1b17d6b9030f0 (diff) |
gui: macOS, make appMenuBar part of the main app window
By moving the appMenuBar destruction responsibility to the QT
framework, we ensure the disconnection of the submenus signals
prior to the destruction of the main app window.
The standalone menu bar may have served a purpose in earlier
versions when it didn't contain actions that directly open
specific screens within the main application window. However,
at present, all the actions within the appMenuBar lead to the
opening of screens within the main app window. So, the absence
of a main app window makes these actions essentially pointless.
Github-Pull: gui#751
Rebased-From: bae209e3879fa099302d3b211362c49bbbfbdd14
-rw-r--r-- | src/qt/bitcoingui.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index dc78fcbce1..a8452e815f 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -238,7 +238,6 @@ BitcoinGUI::~BitcoinGUI() trayIcon->hide(); #ifdef Q_OS_MACOS delete m_app_nap_inhibitor; - delete appMenuBar; MacDockIconHandler::cleanup(); #endif @@ -466,13 +465,7 @@ void BitcoinGUI::createActions() void BitcoinGUI::createMenuBar() { -#ifdef Q_OS_MACOS - // Create a decoupled menu bar on Mac which stays even if the window is closed - appMenuBar = new QMenuBar(); -#else - // Get the main window's menu bar on other platforms appMenuBar = menuBar(); -#endif // Configure the menus QMenu *file = appMenuBar->addMenu(tr("&File")); |