[Navigator] Fix Mac UX Issues for Set Desktop Wallpaper

This doesn't make it functional for versions of OS X
Mozilla tracked an issue in Bug #1629313 citing OS X 10.14+. So this busted for those versions on all UXP applications until this is worked around/fixed/mangled.
More data on exact OS Versioning is need as well as a full on Mac developer.
master
Matt A. Tobin 2 years ago committed by Roy Tam
parent 2f60302843
commit eae91c81b1
  1. 23
      navigator/comm/content/nsContextMenu.js
  2. 2
      navigator/comm/jar.mn
  3. 24
      navigator/components/shell/content/setDesktopBackground.xul

@ -948,8 +948,27 @@ nsContextMenu.prototype = {
},
setDesktopBackground: function() {
openDialog("chrome://navigator/content/setDesktopBackground.xul",
"_blank", "chrome,modal,titlebar,centerscreen", this.target);
const kDesktopBackgroundURL = "chrome://navigator/content/setDesktopBackground.xul";
#ifdef XP_MACOSX
// On Mac, the Set Desktop Background window is not modal.
// Don't open more than one Set Desktop Background window.
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator);
var dbWin = wm.getMostRecentWindow("Shell:SetDesktopBackground");
if (dbWin) {
dbWin.gSetBackground.init(this.target);
dbWin.focus();
} else {
openDialog(kDesktopBackgroundURL, "",
"centerscreen,chrome,dialog=no,dependent,resizable=no",
this.target);
}
#else
// On non-Mac platforms, the Set Wallpaper dialog is modal.
openDialog(kDesktopBackgroundURL, "",
"centerscreen,chrome,dialog,modal,dependent",
this.target);
#endif
},
// Save URL of clicked-on frame.

@ -30,7 +30,7 @@ comm.jar:
content/communicator/findUtils.js (content/findUtils.js)
content/communicator/fullscreen-video.xhtml (content/fullscreen-video.xhtml)
content/communicator/gopherAddon.xhtml (content/gopherAddon.xhtml)
content/communicator/nsContextMenu.js (content/nsContextMenu.js)
* content/communicator/nsContextMenu.js (content/nsContextMenu.js)
content/communicator/openLocation.js (content/openLocation.js)
content/communicator/openLocation.xul (content/openLocation.xul)
content/communicator/safeMode.js (content/safeMode.js)

@ -51,17 +51,8 @@
<image id="monitor"/>
</stack>
</vbox>
#ifndef XP_MACOSX
<vbox flex="1">
#ifdef XP_MACOSX
<button id="setDesktopBackground"
label="&setDesktopBackground.title;"
oncommand="gSetBackground.setDesktopBackground();"/>
<button id="showDesktopPreferences"
label="&openDesktopPrefs.label;"
oncommand="gSetBackground.showDesktopPrefs();"
hidden="true"/>
#else
<hbox align="center">
<label value="&color.label;"/>
<spacer class="colorSpacer"/>
@ -84,9 +75,20 @@
</menupopup>
</menulist>
</hbox>
#endif
</vbox>
#endif
</hbox>
<separator class="groove"/>
#ifdef XP_MACOSX
<hbox align="right">
<button id="setDesktopBackground"
label="&setDesktopBackground.title;"
oncommand="gSetBackground.setDesktopBackground();"/>
<button id="showDesktopPreferences"
label="&openDesktopPrefs.label;"
oncommand="gSetBackground.showDesktopPrefs();"
hidden="true"/>
</hbox>
#endif
</dialog>

Loading…
Cancel
Save