diff --git a/mozilla/suite/common/contentAreaContextOverlay.xul b/mozilla/suite/common/contentAreaContextOverlay.xul index d7b9282303d..f71d89e0adb 100644 --- a/mozilla/suite/common/contentAreaContextOverlay.xul +++ b/mozilla/suite/common/contentAreaContextOverlay.xul @@ -141,6 +141,9 @@ + diff --git a/mozilla/suite/common/nsContextMenu.js b/mozilla/suite/common/nsContextMenu.js index 3e5cae04558..0bba9f62ffd 100644 --- a/mozilla/suite/common/nsContextMenu.js +++ b/mozilla/suite/common/nsContextMenu.js @@ -145,6 +145,9 @@ nsContextMenu.prototype = { // View Frame Info depends on whether we're in a frame this.showItem( "context-viewframeinfo", this.inFrame ); + // Set As Wallpaper depends on whether an image was clicked on, and only works on Windows. + this.showItem( "context-setWallpaper", this.onImage && navigator.appVersion.indexOf("Windows") != -1); + // View Image depends on whether an image was clicked on. this.showItem( "context-viewimage", this.onImage ); @@ -483,6 +486,12 @@ nsContextMenu.prototype = { viewBGImage : function () { openTopWin( this.bgImageURL ); }, + setWallpaper: function() { + var winhooks = Components.classes[ "@mozilla.org/winhooks;1" ]. + getService(Components.interfaces.nsIWindowsHooks); + + winhooks.setImageAsWallpaper(this.target, false); + }, // Save URL of clicked-on frame. saveFrame : function () { saveDocument( this.target.ownerDocument ); diff --git a/mozilla/suite/locales/en-US/chrome/common/contentAreaCommands.dtd b/mozilla/suite/locales/en-US/chrome/common/contentAreaCommands.dtd index 7990ca18e49..54193410302 100644 --- a/mozilla/suite/locales/en-US/chrome/common/contentAreaCommands.dtd +++ b/mozilla/suite/locales/en-US/chrome/common/contentAreaCommands.dtd @@ -34,6 +34,7 @@ +