Bug #232011 Should effect thunderbird only. Thunderbird changes for using the xul pre-processor to generate the locale version.

No more need for contents.rdf.in files.

Port random mozilla/mailnews fixes to the thunderbird


git-svn-id: svn://10.0.0.236/trunk@152703 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
scott%scott-macgregor.org 2004-02-12 05:44:05 +00:00
parent d4acd8ac44
commit b39142a3ec
8 changed files with 25 additions and 61 deletions

View File

@ -13,7 +13,7 @@
chrome:displayName="Messenger"
chrome:author="mozilla.org"
chrome:name="messenger"
chrome:localeVersion="@MOZILLA_LOCALE_VERSION@"
#expand chrome:localeVersion="__MOZILLA_LOCALE_VERSION__"
chrome:skinVersion="1.5">
</RDF:Description>

View File

@ -10,6 +10,6 @@
chrome:displayName="Mozilla Help Viewer"
chrome:author="netscape.com"
chrome:name="help"
chrome:localeVersion="@MOZILLA_LOCALE_VERSION@">
#expand chrome:localeVersion="__MOZILLA_LOCALE_VERSION__">
</RDF:Description>
</RDF:RDF>

View File

@ -518,9 +518,6 @@ function SetMenuItemLabel(menuItemId, customLabel)
function InitMessageLabel(menuType)
{
/* this code gets the label strings and changes the menu labels */
var prefs = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPref);
var prefBranch = prefs.getDefaultBranch(null);
var color;
try
@ -561,7 +558,7 @@ function InitMessageLabel(menuType)
{
try
{
var prefString = prefs.getComplexValue("mailnews.labels.description." + label,
var prefString = gPrefBranch.getComplexValue("mailnews.labels.description." + label,
Components.interfaces.nsIPrefLocalizedString);
var formattedPrefString = gMessengerBundle.getFormattedString("labelMenuItemFormat" + label,
[prefString], 1);

View File

@ -704,8 +704,8 @@
</popup>
<popup id="messagePaneContext"
onpopupshowing="gContextMenu = new nsContextMenu(this); return fillMessagePaneContextMenu();"
onpopuphiding="gContextMenu.onDestroy(); gContextMenu = null;">
onpopupshowing="if (event.target != this) return true; gContextMenu = new nsContextMenu(this); return fillMessagePaneContextMenu();"
onpopuphiding="if (event.target == this) gContextMenu = null;">
<menuseparator id="messagePaneContext-sep-link"/>
<menuitem id="context-selectall"
label="&selectAllCmd.label;"

View File

@ -10,7 +10,7 @@
chrome:displayName="Messenger"
chrome:author="mozilla.org"
chrome:name="messenger-views"
chrome:localeVersion="@MOZILLA_LOCALE_VERSION@"
#expand chrome:localeVersion="__MOZILLA_LOCALE_VERSION__"
chrome:skinVersion="1.5">
</RDF:Description>
</RDF:RDF>

View File

@ -98,7 +98,7 @@ var gCollapsedHeaderList = [ {name:"subject", outputFunction:updateHeaderValueIn
// We also have an expanded header view. This shows many of your more common (and useful) headers.
var gExpandedHeaderList = [ {name:"subject"},
{name:"from", outputFunction:OutputEmailAddresses},
{name:"reply-to", isEmailAddress:true, outputFunction:OutputEmailAddresses},
{name:"reply-to", outputFunction:OutputEmailAddresses},
{name:"date"},
{name:"to", useToggle:true, outputFunction:OutputEmailAddresses},
{name:"cc", useToggle:true, outputFunction:OutputEmailAddresses},
@ -109,8 +109,8 @@ var gExpandedHeaderList = [ {name:"subject"},
// Now, for each view the message pane can generate, we need a global table of headerEntries. These
// header entry objects are generated dynamically based on the static date in the header lists (see above)
// and elements we find in the DOM based on properties in the header lists.
var gCollapsedHeaderView = new Array;
var gExpandedHeaderView = new Array;
var gCollapsedHeaderView = {};
var gExpandedHeaderView = {};
// currentHeaderData --> this is an array of header name and value pairs for the currently displayed message.
// it's purely a data object and has no view information. View information is contained in the view objects.
@ -172,16 +172,13 @@ function initializeHeaderViewTables()
{
// iterate over each header in our header list arrays and create header entries
// for each one. These header entries are then stored in the appropriate header table
if (!gCollapsedHeaderView.length) // if we haven't already initialized the collapsed view...
for (var index = 0; index < gCollapsedHeaderList.length; index++)
var index;
for (index = 0; index < gCollapsedHeaderList.length; index++)
{
gCollapsedHeaderView[gCollapsedHeaderList[index].name] =
new createHeaderEntry('collapsed', gCollapsedHeaderList[index]);
}
if (!gExpandedHeaderView.length)
{
for (index = 0; index < gExpandedHeaderList.length; index++)
{
var headerName = gExpandedHeaderList[index].name;
@ -199,7 +196,6 @@ function initializeHeaderViewTables()
var userAgentEntry = {name:"user-agent", outputFunction:updateHeaderValue};
gExpandedHeaderView[userAgentEntry.name] = new createHeaderEntry('expanded', userAgentEntry);
}
} // if we need to initialize the expanded header view...
}
function OnLoadMsgHeaderPane()
@ -419,7 +415,7 @@ function EnsureSubjectValue()
function CheckNotify()
{
if (this.NotifyClearAddresses != undefined)
if ("NotifyClearAddresses" in this)
NotifyClearAddresses();
}
@ -559,7 +555,7 @@ function UpdateMessageHeaders()
for (headerName in currentHeaderData)
{
var headerField = currentHeaderData[headerName];
var headerEntry;
var headerEntry = null;
if (headerName == "subject")
{
@ -576,30 +572,28 @@ function UpdateMessageHeaders()
if (gCollapsedHeaderViewMode && !gBuiltCollapsedView)
{
if (headerName in gCollapsedHeaderView)
headerEntry = gCollapsedHeaderView[headerName];
if (headerEntry != undefined && headerEntry)
{
headerEntry.outputFunction(headerEntry, headerField.headerValue);
headerEntry.valid = true;
}
}
else if (!gCollapsedHeaderViewMode && !gBuiltExpandedView)
{
if (headerName in gExpandedHeaderView)
headerEntry = gExpandedHeaderView[headerName];
if (headerEntry == undefined && gViewAllHeaders)
if (!headerEntry && gViewAllHeaders)
{
// for view all headers, if we don't have a header field for this value....cheat and create one....then
// fill in a headerEntry
gExpandedHeaderView[headerName] = new createNewHeaderView(headerName);
headerEntry = gExpandedHeaderView[headerName];
}
} // if we are in expanded view....
if (headerEntry != undefined && headerEntry)
if (headerEntry)
{
headerEntry.outputFunction(headerEntry, headerField.headerValue);
headerEntry.valid = true;
}
} // if we are in expanded view....
}
if (gCollapsedHeaderViewMode)
@ -610,7 +604,7 @@ function UpdateMessageHeaders()
// now update the view to make sure the right elements are visible
updateHeaderViews();
if (this.FinishEmailProcessing != undefined)
if ("FinishEmailProcessing" in this)
FinishEmailProcessing();
}
@ -774,7 +768,7 @@ function updateEmailAddressNode(emailAddressNode, emailAddress, fullAddress, dis
emailAddressNode.setTextAttribute("fullAddress", fullAddress);
emailAddressNode.setTextAttribute("displayName", displayName);
if (this.AddExtraAddressProcessing != undefined)
if ("AddExtraAddressProcessing" in this)
AddExtraAddressProcessing(emailAddress, emailAddressNode);
}

View File

@ -745,18 +745,11 @@ function delayedOnLoadMessenger()
// argument[0] --> folder uri
// argument[1] --> optional message key
// argument[2] --> optional email address; //will come from aim; needs to show msgs from buddy's email address
if ("arguments" in window && window.arguments[0])
if ("arguments" in window)
{
gStartFolderUri = window.arguments[0];
gStartMsgKey = window.arguments[1];
gSearchEmailAddress = window.arguments[2];
}
else
{
gStartFolderUri = null;
gStartMsgKey = nsMsgKey_None;
gSearchEmailAddress = null;
gStartFolderUri = (window.arguments.length > 0) ? window.arguments[0] : null;
gStartMsgKey = (window.arguments.length > 1) ? window.arguments[1]: nsMsgKey_None;
gSearchEmailAddress = (window.arguments.length > 2) ? window.arguments[2] : null;
}
setTimeout("loadStartFolder(gStartFolderUri);", 0);

View File

@ -1,20 +0,0 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the packages being supplied by this jar -->
<RDF:Seq about="urn:mozilla:package:root">
<RDF:li resource="urn:mozilla:package:navigator"/>
</RDF:Seq>
<!-- package information -->
<RDF:Description about="urn:mozilla:package:navigator"
chrome:displayName="Navigator"
chrome:author="mozilla.org"
chrome:name="navigator"
chrome:localeVersion="@MOZILLA_LOCALE_VERSION@"
chrome:skinVersion="1.5">
</RDF:Description>
</RDF:RDF>