Fix 21515: context menu should have filename after `Save Image...'. patch by doron (doronr@naboonline.com). r=blake sr=alecf

This commit is contained in:
blakeross%telocity.com 2001-01-24 05:50:35 +00:00
Родитель 7ef54f8fa6
Коммит 6da5f219a0
6 изменённых файлов: 12 добавлений и 3 удалений

Просмотреть файл

@ -606,7 +606,6 @@ Rights Reserved.
accesskey="&saveLinkCmd.accesskey;"
oncommand="contextMenu.saveLink();"/>
<menuitem id="context-saveimage"
value="&saveImageCmd.label;"
accesskey="&saveImageCmd.accesskey;"
oncommand="contextMenu.saveImage();"/>
<menuitem id="context-bookmarklink"

Просмотреть файл

@ -32,6 +32,7 @@ en-US.jar:
locale/en-US/communicator/tasksOverlay.dtd (resources/locale/en-US/tasksOverlay.dtd)
locale/en-US/communicator/taskbarOverlay.dtd (resources/locale/en-US/taskbarOverlay.dtd)
locale/en-US/communicator/contentAreaCommands.dtd (resources/locale/en-US/contentAreaCommands.dtd)
locale/en-US/communicator/contentAreaCommands.properties (resources/locale/en-US/contentAreaCommands.properties)
locale/en-US/communicator/askViewZoom.dtd (resources/locale/en-US/askViewZoom.dtd)
locale/en-US/communicator/viewZoomOverlay.dtd (resources/locale/en-US/viewZoomOverlay.dtd)
locale/en-US/communicator/viewZoomOverlay.properties (resources/locale/en-US/viewZoomOverlay.properties)

Просмотреть файл

@ -135,7 +135,6 @@
accesskey="&saveLinkCmd.accesskey;"
oncommand="contextMenu.saveLink();"/>
<menuitem id="context-saveimage"
value="&saveImageCmd.label;"
accesskey="&saveImageCmd.accesskey;"
oncommand="contextMenu.saveImage();"/>
<menuitem id="context-savebgimage"

Просмотреть файл

@ -116,6 +116,14 @@ nsContextMenu.prototype = {
// Save image depends on whether there is one.
this.showItem( "context-saveimage", this.onImage );
if (this.onImage){ //if onImage, let's get the imagename into the context menu
var saveImageMenuItem = document.getElementById( 'context-saveimage' );
var imageName = extractFileNameFromUrl(this.imageURL);
var bundle = srGetStrBundle("chrome://communicator/locale/contentAreaCommands.properties");
var caption = bundle.formatStringFromName("saveImageAs",[imageName],1);
saveImageMenuItem.setAttribute( "value", caption );
}
// Remove separator if none of these were shown.
var showSep = !this.inDirList || this.inFrame || this.onSaveableLink || this.hasBGImage || this.onImage;

Просмотреть файл

@ -41,7 +41,6 @@
<!ENTITY saveFrameCmd.accesskey "f">
<!ENTITY saveLinkCmd.label "Save Link As...">
<!ENTITY saveLinkCmd.accesskey "a">
<!ENTITY saveImageCmd.label "Save Image As...">
<!ENTITY saveImageCmd.accesskey "a">
<!ENTITY saveBGImageCmd.label "Save Background Image As...">
<!ENTITY saveBGImageCmd.accesskey "a">

Просмотреть файл

@ -0,0 +1,3 @@
# context menu strings
saveImageAs=Save Image (%S)...