commit a8ba2fac334a504e88b929dab8aea0d3293aa3c0 parent ee0b4f5d0d84eddaf658b87fdbf819f6e93a5ea0 Author: Dan Stillman <dstillman@zotero.org> Date: Sun, 30 Jul 2017 07:42:43 -0400 Don't rely on last browser window to open prefs from menu Diffstat:
| M | chrome/content/zotero-platform/mac/standalone/menuOverlay.xul | | | 10 | +++++++++- |
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero-platform/mac/standalone/menuOverlay.xul b/chrome/content/zotero-platform/mac/standalone/menuOverlay.xul @@ -42,6 +42,14 @@ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript" src="chrome://global/content/macWindowMenu.js"/> + <script> + function openPrefs() { + var Zotero = Components.classes['@zotero.org/Zotero;1'] + .getService(Components.interfaces.nsISupports) + .wrappedJSObject; + Zotero.Utilities.Internal.openPreferences(); + } + </script> <commandset id="mainCommandSet"> <command id="minimizeWindow" @@ -83,7 +91,7 @@ <menuitem id="menu_preferences" label="&preferencesCmdMac.label;" key="key_preferencesCmdMac" - oncommand="Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(Components.interfaces.nsIWindowMediator).getMostRecentWindow('navigator:browser').Zotero.Utilities.Internal.openPreferences();"/> + oncommand="openPrefs()"/> <menuitem id="menu_mac_services" label="&servicesMenuMac.label;"/> <menuitem id="menu_mac_hide_app"