Some context menu tweaks.

git-svn-id: svn://10.0.0.236/trunk@128595 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
blakeross%telocity.com 2002-08-30 23:42:12 +00:00
parent 10bc1a61c0
commit 2024f4a8ba
4 changed files with 6 additions and 8 deletions

View File

@ -283,7 +283,6 @@ Contributor(s):
label="&setWallpaperCmd.label;"
accesskey="&setWallpaperCmd.accesskey;"
oncommand="gContextMenu.setWallpaper();"/>
<menuseparator id="context-sep-image"/>
<menuitem id="context-back"
label="&backCmd.label;"
accesskey="&backCmd.accesskey;"

View File

@ -206,8 +206,8 @@
<!ENTITY savePageCmd.commandkey "s">
<!ENTITY saveFrameCmd.label "Save Frame As...">
<!ENTITY saveFrameCmd.accesskey "F">
<!ENTITY saveLinkCmd.label "Save Link Target As...">
<!ENTITY saveLinkCmd.accesskey "r">
<!ENTITY saveLinkCmd.label "Save Link As...">
<!ENTITY saveLinkCmd.accesskey "k">
<!ENTITY saveImageCmd.label "Save Image As...">
<!ENTITY saveImageCmd.accesskey "v">
<!ENTITY copyLinkCmd.label "Copy Link Location">

View File

@ -60,6 +60,7 @@
window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul","_blank",
"chrome,resizable=yes", "cookieManager");
}
function clearCacheOfType(aType)
{
var classID = Components.classes["@mozilla.org/network/cache-service;1"];

View File

@ -106,7 +106,7 @@ 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.onLink ));
// Save link depends on whether we're in a link.
this.showItem( "context-savelink", this.onSaveableLink );
@ -128,8 +128,6 @@ nsContextMenu.prototype = {
var isWin = navigator.appVersion.indexOf("Windows") != -1;
this.showItem( "context-setWallpaper", isWin && this.onImage );
this.showItem( "context-sep-image", this.onImage );
if( isWin && this.onImage )
// Disable the Set As Wallpaper menu item if we're still trying to load the image
this.setItemAttr( "context-setWallpaper", "disabled", (("complete" in this.target) && !this.target.complete) ? "true" : null );
@ -144,7 +142,7 @@ nsContextMenu.prototype = {
},
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.onLink ) );
this.showItem( "context-bookmarklink", this.onLink && !this.onMailtoLink );
this.showItem( "context-searchselect", this.isTextSelected );
this.showItem( "frame", this.inFrame );
@ -179,7 +177,7 @@ nsContextMenu.prototype = {
// Copy link location depends on whether we're on a link.
this.showItem( "context-copylink", this.onLink );
this.showItem( "context-sep-copylink", this.onLink );
this.showItem( "context-sep-copylink", this.onLink && this.onImage);
// Copy image location depends on whether we're on an image.
this.showItem( "context-copyimage", this.onImage );