зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
752be879db
Коммит
009ca07c53
|
@ -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)...
|
Загрузка…
Ссылка в новой задаче