зеркало из https://github.com/mozilla/gecko-dev.git
Implement a thunderbird version of hiddenWindow.xul on the MAC. This fixes a huge OSX usability issue where
we are DOA when you close all open thunderbird windows. This was contributed by Don Crandall. Many thanks Don!
This commit is contained in:
Родитель
7809adca33
Коммит
4797f90886
|
@ -0,0 +1,64 @@
|
||||||
|
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||||
|
# ***** BEGIN LICENSE BLOCK *****
|
||||||
|
# Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
|
#
|
||||||
|
# The contents of this file are subject to the Netscape Public License
|
||||||
|
# Version 1.1 (the "License"); you may not use this file except in
|
||||||
|
# compliance with the License. You may obtain a copy of the License at
|
||||||
|
# http://www.mozilla.org/NPL/
|
||||||
|
#
|
||||||
|
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
|
# for the specific language governing rights and limitations under the
|
||||||
|
# License.
|
||||||
|
#
|
||||||
|
# The Original Code is Mozilla Communicator client code.
|
||||||
|
#
|
||||||
|
# The Initial Developer of the Original Code is
|
||||||
|
# Netscape Communications Corporation.
|
||||||
|
# Portions created by the Initial Developer are Copyright (C) 1998
|
||||||
|
# the Initial Developer. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Contributor(s):
|
||||||
|
# Don Crandall (macdoc@interx.net)
|
||||||
|
#
|
||||||
|
# Alternatively, the contents of this file may be used under the terms of
|
||||||
|
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
|
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
|
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
|
# of those above. If you wish to allow use of your version of this file only
|
||||||
|
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
|
# use your version of this file under the terms of the NPL, indicate your
|
||||||
|
# decision by deleting the provisions above and replace them with the notice
|
||||||
|
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
|
# the provisions above, a recipient may use your version of this file under
|
||||||
|
# the terms of any one of the NPL, the GPL or the LGPL.
|
||||||
|
#
|
||||||
|
# ***** END LICENSE BLOCK *****
|
||||||
|
|
||||||
|
function hiddenWindowStartup()
|
||||||
|
{
|
||||||
|
// focus the hidden window
|
||||||
|
window.focus();
|
||||||
|
|
||||||
|
// Disable menus which are not appropriate
|
||||||
|
var disabledItems = ['newNewMsgCmd', 'menu_newFolder', 'newAccountMenuItem', 'menu_close',
|
||||||
|
'menu_sendunsentmsgs', 'menu_subscribe', 'menu_renameFolder', 'menu_selectAll',
|
||||||
|
'menu_showMessengerToolbar', 'menu_showSearchToolbar', 'menu_showTaskbar', 'menu_customizeToolbar',
|
||||||
|
'sortByDateMenuitem', 'sortByFlagMenuitem', 'sortByOrderReceivedMenuitem', 'sortByPriorityMenuitem',
|
||||||
|
'messagePaneClassic', 'messagePaneWide', 'messagePaneVertical', 'menu_showMessage',
|
||||||
|
'sortBySenderOrRecipientMenuitem', 'sortBySizeMenuitem', 'sortByStatusMenuitem', 'sortBySubjectMenuitem',
|
||||||
|
'sortByThreadMenuitem', 'sortByUnreadMenuitem', 'sortByLabelMenuitem', 'sortByJunkStatusMenuitem',
|
||||||
|
'sortAscending', 'sortDescending', 'viewThreaded', 'viewAll',
|
||||||
|
'viewUnread', 'viewLabelMenuItem1', 'viewLabelMenuItem2', 'viewLabelMenuItem3',
|
||||||
|
'viewLabelMenuItem4', 'viewLabelMenuItem5', 'viewCreateCustomView', 'viewallheaders',
|
||||||
|
'viewnormalheaders', 'bodyAllowHTML', 'bodySanitized', 'bodyAsPlaintext',
|
||||||
|
'viewAttachmentsInlineMenuitem', 'goStartPage', 'newMsgCmd',
|
||||||
|
'searchMailCmd', 'searchAddressesCmd', 'filtersCmd', 'junkMailCmd'];
|
||||||
|
for (var id in disabledItems)
|
||||||
|
{
|
||||||
|
var broadcaster = document.getElementById(disabledItems[id]);
|
||||||
|
if (broadcaster)
|
||||||
|
broadcaster.setAttribute("disabled", "true");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,108 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
# The contents of this file are subject to the Netscape Public
|
||||||
|
# License Version 1.1 (the "License"); you may not use this file
|
||||||
|
# except in compliance with the License. You may obtain a copy of
|
||||||
|
# the License at http://www.mozilla.org/NPL/
|
||||||
|
#
|
||||||
|
# Software distributed under the License is distributed on an "AS
|
||||||
|
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||||
|
# implied. See the License for the specific language governing
|
||||||
|
# rights and limitations under the License.
|
||||||
|
#
|
||||||
|
# The Original Code is Mozilla Communicator client code, released
|
||||||
|
# March 31, 1998.
|
||||||
|
#
|
||||||
|
# The Initial Developer of the Original Code is Netscape
|
||||||
|
# Communications Corporation. Portions created by Netscape are
|
||||||
|
# Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||||
|
# Rights Reserved.
|
||||||
|
#
|
||||||
|
# Contributor(s):
|
||||||
|
# Don Crandall (macdoc@interx.net)
|
||||||
|
#
|
||||||
|
|
||||||
|
#ifdef XP_MACOSX
|
||||||
|
|
||||||
|
<!-- Overlays from messenger.xul. -->
|
||||||
|
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
|
||||||
|
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
|
||||||
|
<?xul-overlay href="chrome://messenger/content/mailWindowOverlay.xul"?>
|
||||||
|
<?xul-overlay href="chrome://messenger/content/mailOverlay.xul"?>
|
||||||
|
<?xul-overlay href="chrome://global/content/charsetOverlay.xul"?>
|
||||||
|
|
||||||
|
<!DOCTYPE window [
|
||||||
|
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
|
||||||
|
%brandDTD;
|
||||||
|
<!ENTITY % contentAreaCommandsDTD SYSTEM "chrome://communicator/locale/contentAreaCommands.dtd" >
|
||||||
|
%contentAreaCommandsDTD;
|
||||||
|
<!ENTITY % messengerDTD SYSTEM "chrome://messenger/locale/messenger.dtd" >
|
||||||
|
%messengerDTD;
|
||||||
|
]>
|
||||||
|
|
||||||
|
<window id="hidden-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="hiddenWindowStartup();">
|
||||||
|
|
||||||
|
<script type="application/x-javascript" src="chrome://messenger/content/commandglue.js"/>
|
||||||
|
<script type="application/x-javascript" src="chrome://messenger/content/shareglue.js"/>
|
||||||
|
<script type="application/x-javascript" src="chrome://messenger/content/mailWindow.js"/>
|
||||||
|
<script type="application/x-javascript" src="chrome://messenger/content/msgMail3PaneWindow.js"/>
|
||||||
|
<script type="application/x-javascript" src="chrome://messenger/content/mail3PaneWindowCommands.js"/>
|
||||||
|
<script type="application/x-javascript" src="chrome://messenger/content/searchBar.js"/>
|
||||||
|
<script type="application/x-javascript" src="chrome://messenger/content/hiddenWindow.js"/>
|
||||||
|
|
||||||
|
|
||||||
|
<stringbundleset id="stringbundleset">
|
||||||
|
<stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
|
||||||
|
<stringbundle id="bundle_brand" src="chrome://global/locale/brand.properties"/>
|
||||||
|
<stringbundle id="bundle_search" src="chrome://messenger/locale/search.properties"/>
|
||||||
|
</stringbundleset>
|
||||||
|
|
||||||
|
<!-- keys are appended from the overlay -->
|
||||||
|
<keyset id="mailKeys">
|
||||||
|
<keyset id="tasksKeys"/>
|
||||||
|
</keyset>
|
||||||
|
|
||||||
|
<broadcasterset id="mailBroadcasters">
|
||||||
|
<!-- File Menu -->
|
||||||
|
<broadcaster id="Communicator:WorkMode"/>
|
||||||
|
<!-- Edit Menu -->
|
||||||
|
</broadcasterset>
|
||||||
|
|
||||||
|
<commandset id="mailCommands">
|
||||||
|
<commandset id="mailFileMenuItems"/>
|
||||||
|
<commandset id="mailViewMenuItems"/>
|
||||||
|
<commandset id="mailEditMenuItems"/>
|
||||||
|
<commandset id="mailEditContextMenuItems"/>
|
||||||
|
<commandset id="mailSearchMenuItems"/>
|
||||||
|
<commandset id="mailGoMenuItems"/>
|
||||||
|
<commandset id="mailMessageMenuItems"/>
|
||||||
|
<commandset id="mailToolbarItems"/>
|
||||||
|
<commandset id="mailGetMsgMenuItems"/>
|
||||||
|
<commandset id="mailMarkMenuItems"/>
|
||||||
|
<commandset id="mailLabelMenuItems"/>
|
||||||
|
<commandset id="mailToolsMenuItems"/>
|
||||||
|
<commandset id="globalEditMenuItems"/>
|
||||||
|
<commandset id="selectEditMenuItems"/>
|
||||||
|
<commandset id="clipboardEditMenuItems"/>
|
||||||
|
<commandset id="FocusRingUpdate_Mail"
|
||||||
|
commandupdater="true"
|
||||||
|
events="focus"
|
||||||
|
oncommandupdate="FocusRingUpdate_Mail()"/>
|
||||||
|
<commandset id="tasksCommands"/>
|
||||||
|
</commandset>
|
||||||
|
|
||||||
|
<!-- it's the whole mailWindowOverlay.xul menubar! hidden windows need to
|
||||||
|
have a menubar for situations where they're the only window remaining
|
||||||
|
on a platform that wants to leave the app running, like the Mac.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<toolbox id="mail-toolbox" class="toolbox-top"/>
|
||||||
|
|
||||||
|
<hbox id="searchBox"/>
|
||||||
|
|
||||||
|
</window>
|
||||||
|
|
||||||
|
#endif
|
|
@ -1000,7 +1000,7 @@
|
||||||
<menupopup id="menu_FilePopup" onpopupshowing="file_init();">
|
<menupopup id="menu_FilePopup" onpopupshowing="file_init();">
|
||||||
<menu id="menu_New">
|
<menu id="menu_New">
|
||||||
<menupopup id="menu_NewPopup" onpopupshowing="menu_new_init();">
|
<menupopup id="menu_NewPopup" onpopupshowing="menu_new_init();">
|
||||||
<menuitem label="&newNewMsgCmd.label;"
|
<menuitem id="newNewMsgCmd" label="&newNewMsgCmd.label;"
|
||||||
accesskey="&newNewMsgCmd.accesskey;"
|
accesskey="&newNewMsgCmd.accesskey;"
|
||||||
key="key_newMessage"
|
key="key_newMessage"
|
||||||
oncommand="MsgNewMessage(null);"/>
|
oncommand="MsgNewMessage(null);"/>
|
||||||
|
@ -1039,7 +1039,7 @@
|
||||||
<menuitem id="menu_sendunsentmsgs" label="&sendUnsentCmd.label;"
|
<menuitem id="menu_sendunsentmsgs" label="&sendUnsentCmd.label;"
|
||||||
accesskey="&sendUnsentCmd.accesskey;"
|
accesskey="&sendUnsentCmd.accesskey;"
|
||||||
observes="cmd_sendUnsentMsgs"/>
|
observes="cmd_sendUnsentMsgs"/>
|
||||||
<menuitem label="&subscribeCmd.label;"
|
<menuitem id="menu_subscribe" label="&subscribeCmd.label;"
|
||||||
accesskey="&subscribeCmd.accesskey;"
|
accesskey="&subscribeCmd.accesskey;"
|
||||||
oncommand="MsgSubscribe();"/>
|
oncommand="MsgSubscribe();"/>
|
||||||
<menuseparator/>
|
<menuseparator/>
|
||||||
|
@ -1254,7 +1254,7 @@
|
||||||
<!-- Message -->
|
<!-- Message -->
|
||||||
<menu label="&msgMenu.label;" accesskey="&msgMenu.accesskey;">
|
<menu label="&msgMenu.label;" accesskey="&msgMenu.accesskey;">
|
||||||
<menupopup onpopupshowing="InitMessageMenu();">
|
<menupopup onpopupshowing="InitMessageMenu();">
|
||||||
<menuitem label="&newMsgCmd.label;"
|
<menuitem id="newMsgCmd" label="&newMsgCmd.label;"
|
||||||
accesskey="&newMsgCmd.accesskey;"
|
accesskey="&newMsgCmd.accesskey;"
|
||||||
key="key_newMessage"
|
key="key_newMessage"
|
||||||
oncommand="MsgNewMessage(null);"/>
|
oncommand="MsgNewMessage(null);"/>
|
||||||
|
@ -1502,15 +1502,15 @@
|
||||||
<!-- Tasks -->
|
<!-- Tasks -->
|
||||||
<menu id="tasksMenu" label="&tasksMenu.label;" accesskey="&tasksMenu.accesskey;">
|
<menu id="tasksMenu" label="&tasksMenu.label;" accesskey="&tasksMenu.accesskey;">
|
||||||
<menupopup id="taskPopup" onpopupshowing="document.commandDispatcher.updateCommands('create-menu-tasks')">
|
<menupopup id="taskPopup" onpopupshowing="document.commandDispatcher.updateCommands('create-menu-tasks')">
|
||||||
<menuitem label="&searchMailCmd.label;"
|
<menuitem id="searchMailCmd" label="&searchMailCmd.label;"
|
||||||
key="key_searchMail"
|
key="key_searchMail"
|
||||||
accesskey="&searchMailCmd.accesskey;"
|
accesskey="&searchMailCmd.accesskey;"
|
||||||
oncommand="MsgSearchMessages();"/>
|
oncommand="MsgSearchMessages();"/>
|
||||||
<menuitem label="&searchAddressesCmd.label;"
|
<menuitem id="searchAddressesCmd" label="&searchAddressesCmd.label;"
|
||||||
accesskey="&searchAddressesCmd.accesskey;"
|
accesskey="&searchAddressesCmd.accesskey;"
|
||||||
oncommand="MsgSearchAddresses()"/>
|
oncommand="MsgSearchAddresses()"/>
|
||||||
<menuseparator/>
|
<menuseparator/>
|
||||||
<menuitem label="&filtersCmd.label;"
|
<menuitem id="filtersCmd" label="&filtersCmd.label;"
|
||||||
accesskey="&filtersCmd.accesskey;"
|
accesskey="&filtersCmd.accesskey;"
|
||||||
oncommand="MsgFilters(null);"/>
|
oncommand="MsgFilters(null);"/>
|
||||||
<menuitem id="applyFilters"
|
<menuitem id="applyFilters"
|
||||||
|
@ -1518,7 +1518,7 @@
|
||||||
accesskey="&filtersApply.accesskey;"
|
accesskey="&filtersApply.accesskey;"
|
||||||
observes="cmd_applyFilters"/>
|
observes="cmd_applyFilters"/>
|
||||||
<menuseparator/>
|
<menuseparator/>
|
||||||
<menuitem label="&junkMailCmd.label;"
|
<menuitem id="junkMailCmd" label="&junkMailCmd.label;"
|
||||||
accesskey="&junkMailCmd.accesskey;"
|
accesskey="&junkMailCmd.accesskey;"
|
||||||
oncommand="MsgJunkMail()"/>
|
oncommand="MsgJunkMail()"/>
|
||||||
<menuitem id="runJunkControls"
|
<menuitem id="runJunkControls"
|
||||||
|
|
|
@ -9,6 +9,8 @@ messenger.jar:
|
||||||
*+ content/messenger/messageWindow.xul (content/messageWindow.xul)
|
*+ content/messenger/messageWindow.xul (content/messageWindow.xul)
|
||||||
*+ content/messenger/messageWindow.js (content/messageWindow.js)
|
*+ content/messenger/messageWindow.js (content/messageWindow.js)
|
||||||
*+ content/messenger/messenger.xul (content/messenger.xul)
|
*+ content/messenger/messenger.xul (content/messenger.xul)
|
||||||
|
* content/messenger/hiddenWindow.xul (content/hiddenWindow.xul)
|
||||||
|
* content/messenger/hiddenWindow.js (content/hiddenWindow.js)
|
||||||
*+ content/messenger/msgHdrViewOverlay.js (content/msgHdrViewOverlay.js)
|
*+ content/messenger/msgHdrViewOverlay.js (content/msgHdrViewOverlay.js)
|
||||||
*+ content/messenger/msgHdrViewOverlay.xul (content/msgHdrViewOverlay.xul)
|
*+ content/messenger/msgHdrViewOverlay.xul (content/msgHdrViewOverlay.xul)
|
||||||
*+ content/messenger/msgMail3PaneWindow.js (content/msgMail3PaneWindow.js)
|
*+ content/messenger/msgMail3PaneWindow.js (content/msgMail3PaneWindow.js)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче