2626#include < qt/walletview.h>
2727#endif // ENABLE_WALLET
2828
29- #ifdef Q_OS_MAC
29+ #ifdef Q_OS_MACOS
3030#include < qt/macdockiconhandler.h>
3131#endif
3232
7474
7575
7676const std::string BitcoinGUI::DEFAULT_UIPLATFORM =
77- #if defined(Q_OS_MAC )
77+ #if defined(Q_OS_MACOS )
7878 " macosx"
7979#elif defined(Q_OS_WIN)
8080 " windows"
@@ -228,7 +228,7 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const NetworkStyle* networkStyle,
228228 connect (labelBlocksIcon, &GUIUtil::ClickableLabel::clicked, this , &BitcoinGUI::showModalOverlay);
229229 connect (progressBar, &GUIUtil::ClickableProgressBar::clicked, this , &BitcoinGUI::showModalOverlay);
230230
231- #ifdef Q_OS_MAC
231+ #ifdef Q_OS_MACOS
232232 m_app_nap_inhibitor = new CAppNapInhibitor;
233233#endif
234234
@@ -261,7 +261,7 @@ BitcoinGUI::~BitcoinGUI()
261261 settings.setValue (" MainWindowGeometry" , saveGeometry ());
262262 if (trayIcon) // Hide tray icon, as deleting will let it linger until quit (on Ubuntu)
263263 trayIcon->hide ();
264- #ifdef Q_OS_MAC
264+ #ifdef Q_OS_MACOS
265265 delete m_app_nap_inhibitor;
266266 MacDockIconHandler::cleanup ();
267267#endif
@@ -643,7 +643,7 @@ void BitcoinGUI::createMenuBar()
643643 minimize_action->setEnabled (window != nullptr && (window->flags () & Qt::Dialog) != Qt::Dialog && window->windowState () != Qt::WindowMinimized);
644644 });
645645
646- #ifdef Q_OS_MAC
646+ #ifdef Q_OS_MACOS
647647 QAction* zoom_action = window_menu->addAction (tr (" Zoom" ));
648648 connect (zoom_action, &QAction::triggered, [] {
649649 QWindow* window = qApp->focusWindow ();
@@ -660,7 +660,7 @@ void BitcoinGUI::createMenuBar()
660660#endif
661661
662662 if (walletFrame) {
663- #ifdef Q_OS_MAC
663+ #ifdef Q_OS_MACOS
664664 window_menu->addSeparator ();
665665 QAction* main_window_action = window_menu->addAction (tr (" Main Window" ));
666666 connect (main_window_action, &QAction::triggered, [this ] {
@@ -818,7 +818,7 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel, interfaces::BlockAndH
818818 trayIcon->setContextMenu (trayIconMenu.get ());
819819 createIconMenu (trayIconMenu.get ());
820820
821- #ifndef Q_OS_MAC
821+ #ifndef Q_OS_MACOS
822822 // Show main window on tray icon click
823823 // Note: ignore this on Mac - this is not the way tray should work there
824824 connect (trayIcon, &QSystemTrayIcon::activated, [this ](QSystemTrayIcon::ActivationReason reason) {
@@ -904,7 +904,7 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel, interfaces::BlockAndH
904904#endif // ENABLE_WALLET
905905 unitDisplayControl->setOptionsModel (nullptr );
906906
907- #ifdef Q_OS_MAC
907+ #ifdef Q_OS_MACOS
908908 if (dockIconMenu)
909909 {
910910 // Disable context menu on dock icon
@@ -1070,11 +1070,11 @@ void BitcoinGUI::createIconMenu(QMenu *pmenu)
10701070{
10711071 // Configuration of the tray icon (or dock icon) icon menu
10721072 QAction* show_hide_action{nullptr };
1073- #ifndef Q_OS_MAC
1073+ #ifndef Q_OS_MACOS
10741074 // Note: On macOS, the Dock icon is used to provide the tray's functionality.
10751075 show_hide_action = pmenu->addAction (QString (), this , &BitcoinGUI::toggleHidden);
10761076 pmenu->addSeparator ();
1077- #endif // Q_OS_MAC
1077+ #endif // Q_OS_MACOS
10781078
10791079 QAction* send_action{nullptr };
10801080 QAction* cj_send_action{nullptr };
@@ -1107,11 +1107,11 @@ void BitcoinGUI::createIconMenu(QMenu *pmenu)
11071107 backups_action = pmenu->addAction (showBackupsAction->text (), showBackupsAction, &QAction::trigger);
11081108 }
11091109 QAction* quit_action{nullptr };
1110- #ifndef Q_OS_MAC
1110+ #ifndef Q_OS_MACOS
11111111 // Note: On macOS, the Dock icon's menu already has Quit action.
11121112 pmenu->addSeparator ();
11131113 quit_action = pmenu->addAction (quitAction->text (), quitAction, &QAction::trigger);
1114- #endif // Q_OS_MAC
1114+ #endif // Q_OS_MACOS
11151115
11161116 connect (
11171117 // Using QSystemTrayIcon::Context is not reliable.
@@ -1416,6 +1416,7 @@ void BitcoinGUI::openOptionsDialogWithTab(OptionsDialog::Tab tab)
14161416 auto dlg = new OptionsDialog (this , enableWallet);
14171417 connect (dlg, &OptionsDialog::quitOnReset, this , &BitcoinGUI::quitRequested);
14181418 dlg->setCurrentTab (tab);
1419+ dlg->setClientModel (clientModel);
14191420 dlg->setModel (clientModel->getOptionsModel ());
14201421 connect (dlg, &OptionsDialog::appearanceChanged, [this ]() {
14211422 updateWidth ();
@@ -1489,7 +1490,7 @@ void BitcoinGUI::updateWidth()
14891490
14901491void BitcoinGUI::setNumBlocks (int count, const QDateTime& blockDate, const QString& blockHash, double nVerificationProgress, bool header, SynchronizationState sync_state)
14911492{
1492- #ifdef Q_OS_MAC
1493+ #ifdef Q_OS_MACOS
14931494 // Disabling macOS App Nap on initial sync, disk, reindex operations and mixing.
14941495 bool disableAppNap = !m_node.masternodeSync ().isSynced () || sync_state != SynchronizationState::POST_INIT;
14951496#ifdef ENABLE_WALLET
@@ -1504,7 +1505,7 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, const QStri
15041505 } else {
15051506 m_app_nap_inhibitor->enableAppNap ();
15061507 }
1507- #endif // Q_OS_MAC
1508+ #endif // Q_OS_MACOS
15081509
15091510 if (modalOverlay)
15101511 {
@@ -1719,7 +1720,7 @@ void BitcoinGUI::message(const QString& title, QString message, unsigned int sty
17191720void BitcoinGUI::changeEvent (QEvent *e)
17201721{
17211722 QMainWindow::changeEvent (e);
1722- #ifndef Q_OS_MAC // Ignored on macOS
1723+ #ifndef Q_OS_MACOS // Ignored on macOS
17231724 if (e->type () == QEvent::WindowStateChange)
17241725 {
17251726 if (clientModel && clientModel->getOptionsModel () && clientModel->getOptionsModel ()->getMinimizeToTray ())
@@ -1753,7 +1754,7 @@ void BitcoinGUI::changeEvent(QEvent *e)
17531754
17541755void BitcoinGUI::closeEvent (QCloseEvent *event)
17551756{
1756- #ifndef Q_OS_MAC // Ignored on macOS
1757+ #ifndef Q_OS_MACOS // Ignored on macOS
17571758 if (clientModel && clientModel->getOptionsModel ())
17581759 {
17591760 if (!clientModel->getOptionsModel ()->getMinimizeOnClose ())
0 commit comments