diff --git a/xpfe/communicator/resources/content/nsContextMenu.js b/xpfe/communicator/resources/content/nsContextMenu.js index e2d77b84a26..38cbe1b5bfc 100644 --- a/xpfe/communicator/resources/content/nsContextMenu.js +++ b/xpfe/communicator/resources/content/nsContextMenu.js @@ -113,15 +113,17 @@ nsContextMenu.prototype = { //this.setItemAttrFromNode( "context-stop", "disabled", "canStop" ); }, initSaveItems : function () { - this.showItem( "context-savepage", !( this.inDirList || this.isTextSelected || this.onTextInput ) && !( this.onLink && this.onImage ) ); + this.showItem( "context-savepage", + !( this.inDirList || this.isTextSelected || this.onTextInput || this.onStandaloneImage || + (this.onLink && this.onImage))); // Save link depends on whether we're in a link. this.showItem( "context-savelink", this.onSaveableLink ); // Save image depends on whether there is one. - this.showItem( "context-saveimage", this.onImage ); + this.showItem( "context-saveimage", this.onImage || this.onStandaloneImage); - this.showItem( "context-sendimage", this.onImage ); + this.showItem( "context-sendimage", this.onImage || this.onStandaloneImage); }, initViewItems : function () { // View source is always OK, unless in directory listing. @@ -136,9 +138,9 @@ nsContextMenu.prototype = { this.showItem( "context-sep-properties", !( this.inDirList || this.isTextSelected || this.onTextInput ) ); // Set As Wallpaper depends on whether an image was clicked on, and only works on Windows. var isWin = navigator.appVersion.indexOf("Windows") != -1; - this.showItem( "context-setWallpaper", isWin && this.onImage ); + this.showItem( "context-setWallpaper", isWin && (this.onImage || this.onStandaloneImage)); - this.showItem( "context-sep-image", this.onImage ); + this.showItem( "context-sep-image", this.onImage || this.onStandaloneImage); if( isWin && this.onImage ) // Disable the Set As Wallpaper menu item if we're still trying to load the image @@ -154,13 +156,13 @@ nsContextMenu.prototype = { this.showItem( "context-viewimage", this.onImage && !this.onStandaloneImage); // View background image depends on whether there is one. - this.showItem( "context-viewbgimage", showView ); - this.showItem( "context-sep-viewbgimage", showView ); + this.showItem( "context-viewbgimage", showView && !this.onStandaloneImage); + this.showItem( "context-sep-viewbgimage", showView && !this.onStandaloneImage); this.setItemAttr( "context-viewbgimage", "disabled", this.hasBGImage ? null : "true"); }, initMiscItems : function () { // Use "Bookmark This Link" if on a link. - this.showItem( "context-bookmarkpage", !( this.isTextSelected || this.onTextInput ) ); + this.showItem( "context-bookmarkpage", !( this.isTextSelected || this.onTextInput || this.onStandaloneImage ) ); this.showItem( "context-bookmarklink", this.onLink && !this.onMailtoLink ); this.showItem( "context-searchselect", this.isTextSelected && !this.onTextInput ); this.showItem( "frame", this.inFrame );