Bug 468881 - Save Frame As… option appears when not necessary in File Menu. r=dao, ui-r=beltzner

This commit is contained in:
Blair McBride 2009-10-02 08:21:48 +02:00
parent 6c52026fb9
commit c4a43f3551
4 changed files with 1 additions and 27 deletions

View File

@ -40,7 +40,7 @@
style="border:0px;padding:0px;margin:0px;-moz-appearance:none">
<menu id="file-menu" label="&fileMenu.label;"
accesskey="&fileMenu.accesskey;">
<menupopup id="menu_FilePopup" onpopupshowing="getContentAreaFrameCount();">
<menupopup id="menu_FilePopup">
<menuitem id="menu_newNavigator"
label="&newNavigatorCmd.label;"
accesskey="&newNavigatorCmd.accesskey;"
@ -78,11 +78,6 @@
accesskey="&savePageCmd.accesskey;"
key="key_savePage"
command="Browser:SavePage"/>
<menuitem id="menu_saveFrame"
label="&saveFrameCmd.label;"
accesskey="&saveFrameCmd.accesskey;"
command="Browser:SaveFrame"
hidden="true"/>
<menuitem id="menu_sendLink"
label="&sendPageCmd.label;"
accesskey="&sendPageCmd.accesskey;"

View File

@ -59,7 +59,6 @@
<command id="cmd_newNavigatorTab" oncommand="BrowserOpenTab();"/>
<command id="Browser:OpenFile" oncommand="BrowserOpenFileWindow();"/>
<command id="Browser:SavePage" oncommand="saveDocument(window.content.document);"/>
<command id="Browser:SaveFrame" oncommand="saveFrameDocument();"/>
<command id="Browser:SendLink"
oncommand="MailIntegration.sendLinkForWindow(window.content);"/>

View File

@ -147,19 +147,6 @@ function pageShowEventHandlers(event) {
}
}
/**
* Determine whether or not the content area is displaying a page with frames,
* and if so, toggle the display of the 'save frame as' menu item.
**/
function getContentAreaFrameCount()
{
var saveFrameItem = document.getElementById("menu_saveFrame");
if (!content || !content.frames.length || !isContentFrame(document.commandDispatcher.focusedWindow))
saveFrameItem.setAttribute("hidden", "true");
else
saveFrameItem.removeAttribute("hidden");
}
function UpdateBackForwardCommands(aWebNavigation) {
var backBroadcaster = document.getElementById("Browser:Back");
var forwardBroadcaster = document.getElementById("Browser:Forward");

View File

@ -154,13 +154,6 @@ function saveImageURL(aURL, aFileName, aFilePickerTitleKey, aShouldBypassCache,
aSkipPrompt, null);
}
function saveFrameDocument()
{
var focusedWindow = document.commandDispatcher.focusedWindow;
if (isContentFrame(focusedWindow))
saveDocument(focusedWindow.document);
}
function saveDocument(aDocument, aSkipPrompt)
{
if (!aDocument)