mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-15 19:20:13 +00:00
Fix 182928: Add confirmation for Set As Wallpaper. Patch mainly by Jeff Thieleke (sr=blake).
This commit is contained in:
parent
cdedbbd005
commit
a78e91d15e
@ -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);
|
||||
|
||||
|
@ -212,7 +212,7 @@
|
||||
<!ENTITY viewImageCmd.accesskey "I">
|
||||
<!ENTITY viewBGImageCmd.label "View Background Image">
|
||||
<!ENTITY viewBGImageCmd.accesskey "w">
|
||||
<!ENTITY setWallpaperCmd.label "Set As Wallpaper">
|
||||
<!ENTITY setWallpaperCmd.label "Set As Wallpaper...">
|
||||
<!ENTITY setWallpaperCmd.accesskey "S">
|
||||
<!ENTITY bookmarkPageCmd.label "Bookmark This Page...">
|
||||
<!ENTITY bookmarkPageCmd.accesskey "m">
|
||||
|
@ -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?
|
||||
|
Loading…
Reference in New Issue
Block a user