diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 546f0275ddab..34c5fdccb739 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -3067,6 +3067,19 @@ nsContextMenu.prototype = { openTopWin( this.bgImageURL ); }, setWallpaper: function() { + // Confirm since it's annoying if you hit this accidentally. + var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService); + var promptTitle = gNavigatorBundle.getString("wallpaperConfirmTitle"); + var promptMsg = gNavigatorBundle.getString("wallpaperConfirmMsg"); + + var buttonPressed = promptService.confirmEx(window, promptTitle, promptMsg, + (promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0) + + (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1), + promptTitle, null, null, null, {value:0}); + + if (buttonPressed != 0) + return; + var winhooks = Components.classes[ "@mozilla.org/winhooks;1" ]. getService(Components.interfaces.nsIWindowsHooks); diff --git a/browser/base/locale/browser.dtd b/browser/base/locale/browser.dtd index 359f4dc01475..3d07da2866fd 100644 --- a/browser/base/locale/browser.dtd +++ b/browser/base/locale/browser.dtd @@ -212,7 +212,7 @@ - + diff --git a/browser/base/locale/browser.properties b/browser/base/locale/browser.properties index a185783c4d87..6fe7b5c68814 100644 --- a/browser/base/locale/browser.properties +++ b/browser/base/locale/browser.properties @@ -47,3 +47,7 @@ addEngines=Add engines... # Default name for the Web Panels sidebar webPanels=Web Panels + +# setWallpaper confirmation dialog +wallpaperConfirmTitle = Set Wallpaper +wallpaperConfirmMsg = Do you want to set this image as your desktop wallpaper?