зеркало из https://github.com/mozilla/pjs.git
Fix bug 42817 -- overlay a Page Setup menu item for Mac, which displays the page setup dialog. r=jag/hwaara, sr=sspitzer/blake
This commit is contained in:
Родитель
c1ae2e9f5d
Коммит
d95f91b9c5
|
@ -852,13 +852,18 @@ function BrowserPrintPreview()
|
||||||
// implement me
|
// implement me
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function BrowserPrintSetup()
|
||||||
|
{
|
||||||
|
goPageSetup(); // from utilityOverlay.js
|
||||||
|
}
|
||||||
|
|
||||||
function BrowserPrint()
|
function BrowserPrint()
|
||||||
{
|
{
|
||||||
// using _content.print() until printing becomes scriptable on docShell
|
// using _content.print() until printing becomes scriptable on docShell
|
||||||
try {
|
try {
|
||||||
_content.print();
|
_content.print();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Pressing cancel is expressed as an NS_ERROR_FAILURE return value,
|
// Pressing cancel is expressed as an NS_ERROR_ABORT return value,
|
||||||
// causing an exception to be thrown which we catch here.
|
// causing an exception to be thrown which we catch here.
|
||||||
// Unfortunately this will also consume helpful failures, so add a
|
// Unfortunately this will also consume helpful failures, so add a
|
||||||
// dump(e); // if you need to debug
|
// dump(e); // if you need to debug
|
||||||
|
@ -1065,7 +1070,7 @@ function hiddenWindowStartup()
|
||||||
window.focus();
|
window.focus();
|
||||||
|
|
||||||
// Disable menus which are not appropriate
|
// Disable menus which are not appropriate
|
||||||
var disabledItems = ['cmd_close', 'Browser:SendPage', 'Browser:EditPage', /*'Browser:PrintSetup', 'Browser:PrintPreview',*/
|
var disabledItems = ['cmd_close', 'Browser:SendPage', 'Browser:EditPage', 'Browser:PrintSetup', /*'Browser:PrintPreview',*/
|
||||||
'Browser:Print', 'canGoBack', 'canGoForward', 'Browser:Home', 'Browser:AddBookmark', 'cmd_undo',
|
'Browser:Print', 'canGoBack', 'canGoForward', 'Browser:Home', 'Browser:AddBookmark', 'cmd_undo',
|
||||||
'cmd_redo', 'cmd_cut', 'cmd_copy','cmd_paste', 'cmd_delete', 'cmd_selectAll'];
|
'cmd_redo', 'cmd_cut', 'cmd_copy','cmd_paste', 'cmd_delete', 'cmd_selectAll'];
|
||||||
for (id in disabledItems) {
|
for (id in disabledItems) {
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
<!-- NOT IMPLEMENTED
|
<!-- NOT IMPLEMENTED
|
||||||
<command id="cmd_newEditorTemplate"/>
|
<command id="cmd_newEditorTemplate"/>
|
||||||
<command id="cmd_newEditorDraft"/>
|
<command id="cmd_newEditorDraft"/>
|
||||||
<command id="Browser:PrintSetup" disabled ="true" oncommand=""/>
|
|
||||||
<command id="Browser:PrintPreview" disabled="true" oncommand=""/> -->
|
<command id="Browser:PrintPreview" disabled="true" oncommand=""/> -->
|
||||||
<command id="Browser:OpenFile" oncommand="BrowserOpenFileWindow();"/>
|
<command id="Browser:OpenFile" oncommand="BrowserOpenFileWindow();"/>
|
||||||
<command id="Browser:SavePage" oncommand="savePage();"/>
|
<command id="Browser:SavePage" oncommand="savePage();"/>
|
||||||
<command id="Browser:EditPage" oncommand="editPage(window._content.location.href,window, false);"/>
|
<command id="Browser:EditPage" oncommand="editPage(window._content.location.href,window, false);"/>
|
||||||
<command id="Browser:Open" oncommand="BrowserOpenWindow();"/>
|
<command id="Browser:Open" oncommand="BrowserOpenWindow();"/>
|
||||||
|
<command id="cmd_printSetup" oncommand="goPageSetup();"/>
|
||||||
<command id="Browser:Print" oncommand="BrowserPrint();"/>
|
<command id="Browser:Print" oncommand="BrowserPrint();"/>
|
||||||
<command id="cmd_quit"/>
|
<command id="cmd_quit"/>
|
||||||
<command id="cmd_close" oncommand="BrowserClose()"/>
|
<command id="cmd_close" oncommand="BrowserClose()"/>
|
||||||
|
@ -187,6 +187,7 @@
|
||||||
<menuseparator/>
|
<menuseparator/>
|
||||||
<menuitem label="&editPageCmd.label;" accesskey="&editPageCmd.accesskey;" key="key_editPage" command="Browser:EditPage" />
|
<menuitem label="&editPageCmd.label;" accesskey="&editPageCmd.accesskey;" key="key_editPage" command="Browser:EditPage" />
|
||||||
<menuseparator/>
|
<menuseparator/>
|
||||||
|
<!-- Page setup gets inserted here on some platforms -->
|
||||||
<menuitem id="printMenuItem" label="&printCmd.label;" accesskey="&printCmd.accesskey;" key="printKb" command="Browser:Print"/>
|
<menuitem id="printMenuItem" label="&printCmd.label;" accesskey="&printCmd.accesskey;" key="printKb" command="Browser:Print"/>
|
||||||
<menuseparator />
|
<menuseparator />
|
||||||
<menuitem id="offlineGoOfflineCmd"/>
|
<menuitem id="offlineGoOfflineCmd"/>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче