diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py index 3125e20c3..a37f25cea 100644 --- a/electrum/gui/qt/main_window.py +++ b/electrum/gui/qt/main_window.py @@ -45,7 +45,8 @@ from PyQt5.QtWidgets import (QMessageBox, QComboBox, QSystemTrayIcon, QTabWidget QVBoxLayout, QGridLayout, QLineEdit, QHBoxLayout, QPushButton, QScrollArea, QTextEdit, QShortcut, QMainWindow, QCompleter, QInputDialog, - QWidget, QSizePolicy, QStatusBar, QToolTip, QDialog) + QWidget, QSizePolicy, QStatusBar, QToolTip, QDialog, + QMenu, QAction) import electrum from electrum import (keystore, ecc, constants, util, bitcoin, commands, @@ -692,10 +693,17 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): add_toggle_action(view_menu, self.contacts_tab) add_toggle_action(view_menu, self.console_tab) - tools_menu = menubar.addMenu(_("&Tools")) + tools_menu = menubar.addMenu(_("&Tools")) # type: QMenu + preferences_action = tools_menu.addAction(_("Preferences"), self.settings_dialog) # type: QAction + if sys.platform == 'darwin': + # "Settings"/"Preferences" are all reserved keywords in macOS. + # preferences_action will get picked up based on name (and put into a standardized location, + # and given a standard reserved hotkey) + # Hence, this menu item will be at a "uniform location re macOS processes" + preferences_action.setMenuRole(QAction.PreferencesRole) # make sure OS recognizes it as preferences + # Add another preferences item, to also have a "uniform location for Electrum between different OSes" + tools_menu.addAction(_("Electrum preferences"), self.settings_dialog) - # Settings / Preferences are all reserved keywords in macOS using this as work around - tools_menu.addAction(_("Electrum preferences") if sys.platform == 'darwin' else _("Preferences"), self.settings_dialog) tools_menu.addAction(_("&Network"), self.gui_object.show_network_dialog).setEnabled(bool(self.network)) tools_menu.addAction(_("&Lightning Network"), self.gui_object.show_lightning_dialog).setEnabled(bool(self.wallet.has_lightning() and self.network)) tools_menu.addAction(_("Local &Watchtower"), self.gui_object.show_watchtower_dialog).setEnabled(bool(self.network and self.network.local_watchtower))