Ensure that window closing that would cause the app to quit goes through the same codepath as an actual application quit.

This commit is contained in:
ben%bengoodger.com 2003-12-01 05:40:07 +00:00
Родитель 079f51fc95
Коммит f3ec7eea72
4 изменённых файлов: 8 добавлений и 6 удалений

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

@ -929,7 +929,7 @@ function BrowserCloseWindow()
win.setAttribute( "height", h );
win.setAttribute( "width", w );
window.close();
closeWindow(true);
}
function loadURI(uri, referrer)

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

@ -40,7 +40,7 @@
<window id="main-window"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="Startup()" onunload="Shutdown()"
onload="Startup()" onunload="Shutdown()" onclose="return closeWindow(false);"
contenttitlesetting="true"
title="&mainWindow.title;"
titlemodifier="&mainWindow.title;"

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

@ -33,17 +33,18 @@
<window id="main-window"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
windowtype="Browser:page-info"
onload="onLoadPageInfo()"
onload="onLoadPageInfo()" onclose="return closeWindow(false);"
align="stretch" class="dialog"
screenX="10" screenY="10"
width="&pageInfoWindow.width;" height="&pageInfoWindow.height;"
persist="screenX screenY width height sizemode">
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
<script type="application/x-javascript" src="chrome://browser/content/contentAreaUtils.js"/>
<script type="application/x-javascript" src="chrome://browser/content/pageInfo.js"/>
<keyset>
<key id="closeWindow" key="&closeWindow;" modifiers="accel" oncommand="window.close();"/>
<key id="closeWindow" key="&closeWindow;" modifiers="accel" oncommand="closeWindow(true);"/>
<key keycode="VK_ESCAPE" oncommand="window.close();"/>
<key id="copy" key="c" modifiers="accel" oncommand="doCopy(event);"/>
</keyset>

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

@ -36,7 +36,8 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
width="630" height="400" screenX="20" screenY="20"
persist="width height screenX screenY sizemode"
onload="Startup();" onunload="Shutdown();">
onload="Startup();" onunload="Shutdown();"
onclose="return closeWindow(false);">
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
@ -51,7 +52,7 @@
oncommandupdate="document.getElementById('bookmarks-view').onCommandUpdate();">
</commandset>
<command id="cmd_close" oncommand="window.close()"/>
<command id="cmd_close" oncommand="closeWindow(true);"/>
<command id="cmd_bm_open" oncommand="goDoCommand('cmd_bm_open');"/>
<command id="cmd_bm_openinnewwindow" oncommand="goDoCommand('cmd_bm_openinnewwindow');"/>
<command id="cmd_bm_openinnewtab" oncommand="goDoCommand('cmd_bm_openinnewtab');"/>