Overlay reduction work. Collapse New address book card menu overlay directly into the compose window. Thanks to Stephen Walker for the patch.

This commit is contained in:
scott%scott-macgregor.org 2003-07-15 06:00:15 +00:00
Родитель 42ad698159
Коммит e743f6c887
4 изменённых файлов: 36 добавлений и 25 удалений

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

@ -25,7 +25,6 @@
<RDF:li resource="chrome://cookie/content/pref-images.xul"/>
<RDF:li resource="chrome://messenger/content/messenger.xul"/>
<RDF:li resource="chrome://messenger/content/mail3PaneWindowVertLayout.xul"/>
<RDF:li resource="chrome://messenger/content/messengercompose/messengercompose.xul"/>
<RDF:li resource="chrome://messenger/content/addressbook/abSelectAddressesDialog.xul"/>
</RDF:Seq>
@ -57,11 +56,6 @@
<RDF:Seq about="chrome://messenger/content/mail3PaneWindowVertLayout.xul">
<RDF:li>chrome://messenger/content/mailMessengerOverlay.xul</RDF:li>
</RDF:Seq>
<!-- messenger items for Mail Compose -->
<RDF:Seq about="chrome://messenger/content/messengercompose/messengercompose.xul">
<RDF:li>chrome://messenger/content/mailMessengerComposeOverlay.xul</RDF:li>
</RDF:Seq>
<!-- messenger items for Select Addresses dialog -->
<RDF:Seq about="chrome://messenger/content/addressbook/abSelectAddressesDialog.xul">

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

@ -376,7 +376,6 @@ var defaultController =
case "cmd_delete":
case "cmd_selectAll":
case "cmd_account":
case "cmd_preferences":
//View Menu
case "cmd_showComposeToolbar":
@ -424,8 +423,6 @@ var defaultController =
case "cmd_selectAll":
return MessageHasAttachments();
case "cmd_account":
case "cmd_preferences":
return true;
//View Menu
case "cmd_showComposeToolbar":
@ -481,7 +478,6 @@ var defaultController =
case "cmd_delete" : if (MessageHasSelectedAttachments()) RemoveSelectedAttachment(); break;
case "cmd_selectAll" : if (MessageHasAttachments()) SelectAllAttachments(); break;
case "cmd_account" : MsgAccountManager(null); break;
case "cmd_preferences" : DoCommandPreferences(); break;
//View Menu
case "cmd_showComposeToolbar" : goToggleToolbar('composeToolbar', 'menu_showComposeToolbar'); break;
@ -502,6 +498,25 @@ var defaultController =
}
}
function goOpenNewMessage()
{
// if there is a MsgNewMessage function in scope
// and we should use it, so that we choose the proper
// identity, based on the selected message or folder
// if not, bring up the compose window to the default identity
if ("MsgNewMessage" in window) {
MsgNewMessage(null);
return;
}
var msgComposeService = Components.classes["@mozilla.org/messengercompose;1"].getService();
msgComposeService = msgComposeService.QueryInterface(Components.interfaces.nsIMsgComposeService);
msgComposeService.OpenComposeWindow(null, null,
Components.interfaces.nsIMsgCompType.New,
Components.interfaces.nsIMsgCompFormat.Default,
null, null);
}
function QuoteSelectedMessage()
{
var selectedURIs = GetSelectedMessages();
@ -1011,11 +1026,6 @@ function DoCommandPrint()
} catch(ex) {dump("#PRINT ERROR: " + ex + "\n");}
}
function DoCommandPreferences()
{
goPreferences('mailnews', 'chrome://messenger/content/messengercompose/pref-composing_messages.xul', 'mailcomposepref');
}
function ToggleWindowLock()
{
gWindowLocked = !gWindowLocked;

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

@ -1,5 +1,4 @@
<?xml version="1.0"?>
<?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
@ -113,7 +112,6 @@
<command id="cmd_sendLater" oncommand="goDoCommand('cmd_sendLater')"/>
<command id="cmd_printSetup" oncommand="goDoCommand('cmd_printSetup')"/>
<command id="cmd_print" oncommand="goDoCommand('cmd_print')"/>
<command id="cmd_quit" oncommand="goQuitApplication()"/>
<!-- Edit Menu -->
<!--command id="cmd_pasteQuote"/ DO NOT INCLUDE THOSE PBROCASTER ESLE THE EDIT MENU WILL BE BROKEN! -->
@ -134,8 +132,6 @@
<command id="cmd_showFormatToolbar" oncommand="goDoCommand('cmd_showFormatToolbar')"/>
<!-- Options Menu -->
<command id="cmd_selectAddress" oncommand="toggleAddressPicker();"/>
<command id="cmd_outputFormat" oncommand="OutputFormatMenuSelect(event.target)"/>
<command id="cmd_quoteMessage" oncommand="goDoCommand('cmd_quoteMessage')"/>
<command id="cmd_insert"/>
</commandset>
@ -149,6 +145,11 @@
<keyset id="tasksKeys">
<!-- File Menu -->
#ifdef XP_MACOSX
<key id="key_newMessage" key="&newMessage.key;" modifiers="accel,shift"/>
#else
<key id="key_newMessage" key="&newMessage.key;" modifiers="accel"/>
#endif
<key id="key_close" key="&closeCmd.key;" modifiers="accel"/>
<key id="key_save" key="&saveCmd.key;" command="cmd_saveDefault" modifiers="accel"/>
<key id="key_send" keycode="&sendCmd.keycode;" observes="cmd_sendWithCheck" modifiers="accel"/>
@ -230,6 +231,8 @@
<menupopup id="menu_NewPopup">
<menuitem label="&newMessage.label;" accesskey="&newMessage.accesskey;" key="key_newMessage" oncommand="goOpenNewMessage();"/>
<menuseparator/>
<menuitem label="&newCard.label;" accesskey="&newCard.accesskey;"
oncommand="window.openDialog('chrome://messenger/content/addressbook/abNewCardDialog.xul', '', 'chrome,resizable=no,titlebar,modal');"/>
</menupopup>
</menu>
<menuitem label="&attachFileCmd.label;" accesskey="&attachFileCmd.accesskey;" command="cmd_attachFile"/>
@ -253,7 +256,7 @@
<menuitem id="printSetupMenuItem" label="&printSetupCmd.label;" accesskey="&printSetupCmd.accesskey;" command="cmd_printSetup"/>
<menuitem id="printMenuItem" label="&printCmd.label;" accesskey="&printCmd.accesskey;" key="key_print" command="cmd_print"/>
<menuseparator id="menu_FileQuitSeparator"/>
<menuitem label="&quitApplicationCmd.label;" id="menu_FileQuitItem" key="key_quit" accesskey="&quitApplicationCmd.accesskey;" command="cmd_quit"/>
<menuitem label="&quitApplicationCmd.label;" id="menu_FileQuitItem" key="key_quit" accesskey="&quitApplicationCmd.accesskey;" oncommand="goQuitApplication();"/>
</menupopup>
</menu>
@ -304,7 +307,7 @@
</menupopup>
</menu>
<menuitem id="menu_AddressSidebar" type="checkbox" checked="false" label="&addressSidebar.label;" accesskey="&addressSidebar.accesskey;" command="cmd_selectAddress"/>
<menuitem id="menu_AddressSidebar" type="checkbox" checked="false" label="&addressSidebar.label;" accesskey="&addressSidebar.accesskey;" oncommand="toggleAddressPicker();"/>
<menuseparator/>
<menu id="maileditCharsetMenu" label="&charsetMenu.label;" accesskey="&charsetMenu.accesskey;" datasources="rdf:charset-menu" ref="NC:MaileditCharsetMenuRoot" oncommand="SetDocumentCharacterSet(event.target.getAttribute('id'));" onpopupshowing="CreateMenu('mailedit');InitCharsetMenuCheckMark();" onpopupshown="CreateMenu('more-menu');">
<template>
@ -340,7 +343,7 @@
<menuitem label="&quoteCmd.label;" accesskey="&quoteCmd.accesskey;" command="cmd_quoteMessage"/>
<menuseparator/>
<menuitem id="returnReceiptMenu" type="checkbox" label="&returnReceiptMenu.label;" accesskey="&returnReceiptMenu.accesskey;" checked="false" oncommand="ToggleReturnReceipt(event.target)"/>
<menu id="outputFormatMenu" label="&outputFormatMenu.label;" accesskey="&outputFormatMenu.accesskey;" command="cmd_outputFormat">
<menu id="outputFormatMenu" label="&outputFormatMenu.label;" accesskey="&outputFormatMenu.accesskey;" oncommand="OutputFormatMenuSelect(event.target)">
<menupopup>
<menuitem type="radio" name="output_format" label="&autoFormatCmd.label;" accesskey="&autoFormatCmd.accesskey;" id="format_auto" checked="true"/>
<menuitem type="radio" name="output_format" label="&plainTextFormatCmd.label;" accesskey="&plainTextFormatCmd.accesskey;" id="format_plain"/>
@ -418,7 +421,8 @@
<menuitem label="&addressBookCmd.label;" accesskey="&addressBookCmd.accesskey;" key="key_addressbook" oncommand="toAddressBook();" id="tasksMenuAddressBook" class="menuitem-iconic icon-addressbook16 menu-iconic"/>
<menuseparator/>
<menuitem label="&accountManagerCmd.label;" accesskey="&accountManagerCmd.accesskey;" command="cmd_account"/>
<menuitem id="menu_preferences" label="&preferencesCmd.label;" accesskey="&preferencesCmd.accesskey;" oncommand="goDoCommand('cmd_preferences')"/>
<menuitem id="menu_preferences" label="&preferencesCmd.label;" accesskey="&preferencesCmd.accesskey;"
oncommand="goPreferences('mailnews', 'chrome://messenger/content/messengercompose/pref-composing_messages.xul', 'mailcomposepref');"/>
</menupopup>
</menu>
@ -450,7 +454,7 @@
<toolbarbutton class="toolbarbutton-1"
id="button-address" label="&addressButton.label;"
tooltiptext="&addressButton.tooltip;"
command="cmd_selectAddress"/>
oncommand="toggleAddressPicker();"/>
<toolbarbutton class="toolbarbutton-1" type="menu-button"
id="button-attach" label="&attachButton.label;"
tooltiptext="&attachButton.tooltip;"

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

@ -7,7 +7,10 @@
<!ENTITY newMenu.label "New">
<!ENTITY newMenu.accesskey "N">
<!ENTITY newMessage.label "Message">
<!ENTITY newMessage.key "M">
<!ENTITY newMessage.accesskey "M">
<!ENTITY newCard.label "Address Book Card...">
<!ENTITY newCard.accesskey "c">
<!ENTITY attachFileCmd.label "Attach File...">
<!ENTITY attachFileCmd.accesskey "F">
<!ENTITY attachPageCmd.label "Attach Web Page...">