|
@@ -0,0 +1,2225 @@
|
|
|
+# HG changeset patch
|
|
|
+# User Jorg K <jorgk@jorgk.com>
|
|
|
+# Date 1521301069 -3600
|
|
|
+# Node ID 4d1bcb81b2f6d604a3458ac02edced8918d5c3cc
|
|
|
+# Parent 32c5c14b4085c6430557e9c6450cb0ba8ec48d3c
|
|
|
+Bug 1399756 - remove trailing spaces in mailnews/ (.xul, .xml, .css, .mm, .cpp). rs=white-space-only
|
|
|
+[skip-blame]
|
|
|
+
|
|
|
+diff --git a/mailnews/addrbook/content/abAddressBookNameDialog.xul b/mailnews/addrbook/content/abAddressBookNameDialog.xul
|
|
|
+--- a/mailnews/addrbook/content/abAddressBookNameDialog.xul
|
|
|
++++ b/mailnews/addrbook/content/abAddressBookNameDialog.xul
|
|
|
+@@ -1,9 +1,9 @@
|
|
|
+-<?xml version="1.0"?>
|
|
|
++<?xml version="1.0"?>
|
|
|
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
|
+
|
|
|
+ <?xml-stylesheet href="chrome://messenger/skin/dialogs.css" type="text/css"?>
|
|
|
+
|
|
|
+ <!DOCTYPE dialog SYSTEM "chrome://messenger/locale/addressbook/abAddressBookNameDialog.dtd">
|
|
|
+
|
|
|
+diff --git a/mailnews/addrbook/content/abEditCardDialog.xul b/mailnews/addrbook/content/abEditCardDialog.xul
|
|
|
+--- a/mailnews/addrbook/content/abEditCardDialog.xul
|
|
|
++++ b/mailnews/addrbook/content/abEditCardDialog.xul
|
|
|
+@@ -1,9 +1,9 @@
|
|
|
+-<?xml version="1.0"?>
|
|
|
++<?xml version="1.0"?>
|
|
|
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
|
+
|
|
|
+ <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
|
|
|
+
|
|
|
+ <?xul-overlay href="chrome://messenger/content/addressbook/abCardOverlay.xul"?>
|
|
|
+
|
|
|
+diff --git a/mailnews/addrbook/content/abNewCardDialog.xul b/mailnews/addrbook/content/abNewCardDialog.xul
|
|
|
+--- a/mailnews/addrbook/content/abNewCardDialog.xul
|
|
|
++++ b/mailnews/addrbook/content/abNewCardDialog.xul
|
|
|
+@@ -1,9 +1,9 @@
|
|
|
+-<?xml version="1.0"?>
|
|
|
++<?xml version="1.0"?>
|
|
|
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
|
+
|
|
|
+ <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
|
|
|
+
|
|
|
+ <?xul-overlay href="chrome://messenger/content/addressbook/abCardOverlay.xul"?>
|
|
|
+
|
|
|
+diff --git a/mailnews/addrbook/content/print.css b/mailnews/addrbook/content/print.css
|
|
|
+--- a/mailnews/addrbook/content/print.css
|
|
|
++++ b/mailnews/addrbook/content/print.css
|
|
|
+@@ -2,63 +2,63 @@
|
|
|
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
+
|
|
|
+ directory {
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+
|
|
|
+ section {
|
|
|
+- display:block;
|
|
|
++ display:block;
|
|
|
+ margin: 15px 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ sectiontitle {
|
|
|
+- display:block;
|
|
|
+- font-weight:bold;
|
|
|
+- font-family:verdana;
|
|
|
++ display:block;
|
|
|
++ font-weight:bold;
|
|
|
++ font-family:verdana;
|
|
|
+ font-size:small;
|
|
|
+ }
|
|
|
+
|
|
|
+ labelrow {
|
|
|
+ display:block;
|
|
|
+ }
|
|
|
+
|
|
|
+ label {
|
|
|
+- display:inline;
|
|
|
+- font-family:verdana;
|
|
|
++ display:inline;
|
|
|
++ font-family:verdana;
|
|
|
+ font-size:small;
|
|
|
+ }
|
|
|
+
|
|
|
+ GeneratedName {
|
|
|
+- display:block;
|
|
|
+- font-weight:bold;
|
|
|
+- font-family:verdana;
|
|
|
++ display:block;
|
|
|
++ font-weight:bold;
|
|
|
++ font-family:verdana;
|
|
|
+ margin-top: 20px;
|
|
|
+ margin-bottom: 3px;
|
|
|
+ margin-inline-end: 10px;
|
|
|
+ margin-inline-start: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+-FirstName, LastName,
|
|
|
++FirstName, LastName,
|
|
|
+ HomeAddress, HomeAddress2, HomeCountry,
|
|
|
+ WorkAddress, WorkAddress2, WorkCountry,
|
|
|
+ JobTitle, Department, Company, Notes {
|
|
|
+- display: block;
|
|
|
+- font-family: verdana;
|
|
|
++ display: block;
|
|
|
++ font-family: verdana;
|
|
|
+ font-size: small;
|
|
|
+ }
|
|
|
+
|
|
|
+ DisplayName, NickName,
|
|
|
+ WorkPhone, HomePhone, FaxNumber, PagerNumber, CellularNumber,
|
|
|
+ HomeCity, HomeState, HomeZipCode,
|
|
|
+-WorkCity, WorkState, WorkZipCode,
|
|
|
++WorkCity, WorkState, WorkZipCode,
|
|
|
+ Custom1, Custom2, Custom3, Custom4 {
|
|
|
+- display: inline;
|
|
|
+- font-family: verdana;
|
|
|
++ display: inline;
|
|
|
++ font-family: verdana;
|
|
|
+ font-size: small;
|
|
|
+ }
|
|
|
+
|
|
|
+ PrimaryEmail, SecondEmail,
|
|
|
+ WebPage1, WebPage2 {
|
|
|
+ display: block;
|
|
|
+ font-family: verdana;
|
|
|
+ font-size: small;
|
|
|
+@@ -79,16 +79,16 @@ table {
|
|
|
+ display: table;
|
|
|
+ }
|
|
|
+
|
|
|
+ tr {
|
|
|
+ display: table-row;
|
|
|
+ }
|
|
|
+
|
|
|
+ td {
|
|
|
+- display: table-cell;
|
|
|
++ display: table-cell;
|
|
|
+ vertical-align: top;
|
|
|
+ }
|
|
|
+
|
|
|
+ PreferMailFormat {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+
|
|
|
+diff --git a/mailnews/addrbook/prefs/content/pref-directory-add.xul b/mailnews/addrbook/prefs/content/pref-directory-add.xul
|
|
|
+--- a/mailnews/addrbook/prefs/content/pref-directory-add.xul
|
|
|
++++ b/mailnews/addrbook/prefs/content/pref-directory-add.xul
|
|
|
+@@ -24,47 +24,47 @@
|
|
|
+ <vbox id="editDirectory">
|
|
|
+
|
|
|
+ <tabbox style="margin:5px">
|
|
|
+ <tabs id="directoryTabBox">
|
|
|
+ <tab label="&General.tab;"/>
|
|
|
+ <tab label="&Offline.tab;"/>
|
|
|
+ <tab label="&Advanced.tab;"/>
|
|
|
+ </tabs>
|
|
|
+-
|
|
|
++
|
|
|
+ <tabpanels id="directoryTabPanels" flex="1">
|
|
|
+ <vbox>
|
|
|
+ <grid flex="1">
|
|
|
+ <columns>
|
|
|
+ <column/>
|
|
|
+ <column flex="1"/>
|
|
|
+ <column/>
|
|
|
+ </columns>
|
|
|
+
|
|
|
+ <rows>
|
|
|
+ <row align="center">
|
|
|
+- <label value="&directoryName.label;" accesskey="&directoryName.accesskey;"
|
|
|
++ <label value="&directoryName.label;" accesskey="&directoryName.accesskey;"
|
|
|
+ control="description"/>
|
|
|
+ <textbox id="description" flex="1"/>
|
|
|
+ <spacer flex="1"/>
|
|
|
+ </row>
|
|
|
+ <row align="center">
|
|
|
+ <label value="&directoryHostname.label;" accesskey="&directoryHostname.accesskey;"
|
|
|
+ control="hostname"/>
|
|
|
+ <textbox id="hostname" flex="1" disableiflocked="true" class="uri-element"/>
|
|
|
+ <spacer flex="1"/>
|
|
|
+ </row>
|
|
|
+ <row align="center">
|
|
|
+- <label value="&directoryBaseDN.label;"
|
|
|
++ <label value="&directoryBaseDN.label;"
|
|
|
+ accesskey="&directoryBaseDN.accesskey;"
|
|
|
+ control="basedn"/>
|
|
|
+ <vbox>
|
|
|
+ <textbox id="basedn" disableiflocked="true" class="uri-element"/>
|
|
|
+ </vbox>
|
|
|
+- <button label="&findButton.label;"
|
|
|
++ <button label="&findButton.label;"
|
|
|
+ accesskey="&findButton.accesskey;" disabled="true"/>
|
|
|
+ </row>
|
|
|
+ <row align="center">
|
|
|
+ <label value="&portNumber.label;"
|
|
|
+ accesskey="&portNumber.accesskey;"
|
|
|
+ control="port"/>
|
|
|
+ <hbox>
|
|
|
+ <textbox id="port" type="number" size="5" min="1"
|
|
|
+@@ -89,17 +89,17 @@
|
|
|
+ <description>&offlineText.label;</description>
|
|
|
+ <separator/>
|
|
|
+ <hbox>
|
|
|
+ <button id="download" oncommand="DownloadNow();"/>
|
|
|
+ <spacer flex="1"/>
|
|
|
+ </hbox>
|
|
|
+ <description id="downloadWarningMsg" hidden="true" class="error"/>
|
|
|
+ <description id="replicationProgressText" hidden="true"/>
|
|
|
+-
|
|
|
++
|
|
|
+ <progressmeter id="replicationProgressMeter" mode="normal" value="0" hidden="true"/>
|
|
|
+ </vbox>
|
|
|
+ <grid>
|
|
|
+ <columns>
|
|
|
+ <column/>
|
|
|
+ <column flex="1"/>
|
|
|
+ </columns>
|
|
|
+
|
|
|
+@@ -128,25 +128,25 @@
|
|
|
+ accesskey="&searchFilter.accesskey;"
|
|
|
+ control="search"/>
|
|
|
+ <textbox id="search" multiline="true" flex="1" disableiflocked="true"/>
|
|
|
+ </row>
|
|
|
+ <row align="center">
|
|
|
+ <label value="&saslMechanism.label;" control="saslMechanism" accesskey="&saslMechanism.accesskey;"/>
|
|
|
+ <menulist id="saslMechanism">
|
|
|
+ <menupopup>
|
|
|
+- <menuitem id="Simple" value=""
|
|
|
++ <menuitem id="Simple" value=""
|
|
|
+ label="&saslOff.label;"
|
|
|
+ accesskey="&saslOff.accesskey;"/>
|
|
|
+- <menuitem id="GSSAPI" value="GSSAPI"
|
|
|
++ <menuitem id="GSSAPI" value="GSSAPI"
|
|
|
+ label="&saslGSSAPI.label;"
|
|
|
+ accesskey="&saslGSSAPI.accesskey;"/>
|
|
|
+ </menupopup>
|
|
|
+ </menulist>
|
|
|
+ </row>
|
|
|
+ </rows>
|
|
|
+ </grid>
|
|
|
+ </tabpanels>
|
|
|
+ </tabbox>
|
|
|
+ </vbox>
|
|
|
+-
|
|
|
++
|
|
|
+ </dialog>
|
|
|
+-
|
|
|
++
|
|
|
+diff --git a/mailnews/addrbook/prefs/content/pref-editdirectories.xul b/mailnews/addrbook/prefs/content/pref-editdirectories.xul
|
|
|
+--- a/mailnews/addrbook/prefs/content/pref-editdirectories.xul
|
|
|
++++ b/mailnews/addrbook/prefs/content/pref-editdirectories.xul
|
|
|
+@@ -1,9 +1,9 @@
|
|
|
+-<?xml version="1.0"?>
|
|
|
++<?xml version="1.0"?>
|
|
|
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
|
+
|
|
|
+ <?xml-stylesheet href="chrome://messenger/skin/" type="text/css"?>
|
|
|
+
|
|
|
+ <!DOCTYPE dialog SYSTEM "chrome://messenger/locale/addressbook/pref-directory.dtd">
|
|
|
+
|
|
|
+diff --git a/mailnews/addrbook/src/nsAbOSXCard.mm b/mailnews/addrbook/src/nsAbOSXCard.mm
|
|
|
+--- a/mailnews/addrbook/src/nsAbOSXCard.mm
|
|
|
++++ b/mailnews/addrbook/src/nsAbOSXCard.mm
|
|
|
+@@ -67,39 +67,39 @@ SetStringProperty(nsAbOSXCard *aCard, NS
|
|
|
+ static void
|
|
|
+ MapStringProperty(nsAbOSXCard *aCard, ABRecord *aOSXCard, NSString *aProperty,
|
|
|
+ const char *aMemberName, bool aNotify,
|
|
|
+ nsIAbManager *aAbManager)
|
|
|
+ {
|
|
|
+ NS_ASSERTION(aProperty, "This is bad! You asked for an unresolved symbol.");
|
|
|
+ NS_ASSERTION(GetPropertType(aOSXCard, aProperty) == kABStringProperty,
|
|
|
+ "Wrong type!");
|
|
|
+-
|
|
|
++
|
|
|
+ SetStringProperty(aCard, [aOSXCard valueForProperty:aProperty], aMemberName,
|
|
|
+ aNotify, aAbManager);
|
|
|
+ }
|
|
|
+
|
|
|
+ static ABMutableMultiValue*
|
|
|
+ GetMultiValue(ABRecord *aCard, NSString *aProperty)
|
|
|
+ {
|
|
|
+ NS_ASSERTION(aProperty, "This is bad! You asked for an unresolved symbol.");
|
|
|
+ NS_ASSERTION(GetPropertType(aCard, aProperty) & kABMultiValueMask,
|
|
|
+ "Wrong type!");
|
|
|
+-
|
|
|
++
|
|
|
+ return [aCard valueForProperty:aProperty];
|
|
|
+ }
|
|
|
+
|
|
|
+ static void
|
|
|
+ MapDate(nsAbOSXCard *aCard, NSDate *aDate, const char *aYearPropName,
|
|
|
+ const char *aMonthPropName, const char *aDayPropName, bool aNotify,
|
|
|
+ nsIAbManager *aAbManager)
|
|
|
+ {
|
|
|
+ // XXX Should we pass a format and timezone?
|
|
|
+ NSCalendarDate *date = [aDate dateWithCalendarFormat:nil timeZone:nil];
|
|
|
+-
|
|
|
++
|
|
|
+ nsAutoString value;
|
|
|
+ value.AppendInt(static_cast<int32_t>([date yearOfCommonEra]));
|
|
|
+ SetStringProperty(aCard, value, aYearPropName, aNotify, aAbManager);
|
|
|
+ value.Truncate();
|
|
|
+ value.AppendInt(static_cast<int32_t>([date monthOfYear]));
|
|
|
+ SetStringProperty(aCard, value, aMonthPropName, aNotify, aAbManager);
|
|
|
+ value.Truncate();
|
|
|
+ value.AppendInt(static_cast<int32_t>([date dayOfMonth]));
|
|
|
+@@ -115,28 +115,28 @@ MapMultiValue(nsAbOSXCard *aCard, ABReco
|
|
|
+ if (value) {
|
|
|
+ unsigned int j;
|
|
|
+ unsigned int count = [value count];
|
|
|
+ for (j = 0; j < count; ++j) {
|
|
|
+ if ([[value labelAtIndex:j] isEqualToString:aMap.mOSXLabel]) {
|
|
|
+ NSString *stringValue = (aMap.mOSXKey)
|
|
|
+ ? [[value valueAtIndex:j] objectForKey:aMap.mOSXKey]
|
|
|
+ : [value valueAtIndex:j];
|
|
|
+-
|
|
|
++
|
|
|
+ SetStringProperty(aCard, stringValue, aMap.mPropertyName, aNotify,
|
|
|
+ aAbManager);
|
|
|
+-
|
|
|
++
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // String wasn't found, set value of card to empty if it was set previously
|
|
|
+ SetStringProperty(aCard, EmptyString(), aMap.mPropertyName, aNotify,
|
|
|
+ aAbManager);
|
|
|
+-
|
|
|
++
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ // Maps Address Book's instant messenger name to the corresponding nsIAbCard field name.
|
|
|
+ static const char*
|
|
|
+ InstantMessengerFieldName(NSString* aInstantMessengerName)
|
|
|
+ {
|
|
|
+ if ([aInstantMessengerName isEqualToString:@"AIMInstant"]) {
|
|
|
+@@ -217,62 +217,62 @@ nsAbOSXCard::Update(bool aNotify)
|
|
|
+ m_MailListURI.Append(uid);
|
|
|
+ MapStringProperty(this, card, kABGroupNameProperty, "DisplayName", aNotify,
|
|
|
+ abManager);
|
|
|
+ MapStringProperty(this, card, kABGroupNameProperty, "LastName", aNotify,
|
|
|
+ abManager);
|
|
|
+
|
|
|
+ return NS_OK;
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ bool foundHome = false, foundWork = false;
|
|
|
+-
|
|
|
++
|
|
|
+ uint32_t i;
|
|
|
+ for (i = 0; i < nsAbOSXUtils::kPropertyMapSize; ++i) {
|
|
|
+ const nsAbOSXPropertyMap &propertyMap = nsAbOSXUtils::kPropertyMap[i];
|
|
|
+ if (!propertyMap.mOSXProperty)
|
|
|
+ continue;
|
|
|
+-
|
|
|
++
|
|
|
+ if (propertyMap.mOSXLabel) {
|
|
|
+ if (MapMultiValue(this, card, propertyMap, aNotify,
|
|
|
+ abManager) && propertyMap.mOSXProperty == kABAddressProperty) {
|
|
|
+- if (propertyMap.mOSXLabel == kABAddressHomeLabel)
|
|
|
++ if (propertyMap.mOSXLabel == kABAddressHomeLabel)
|
|
|
+ foundHome = true;
|
|
|
+ else
|
|
|
+ foundWork = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ MapStringProperty(this, card, propertyMap.mOSXProperty,
|
|
|
+ propertyMap.mPropertyName, aNotify, abManager);
|
|
|
+ }
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ int flags = 0;
|
|
|
+ if (kABPersonFlags)
|
|
|
+ flags = [[card valueForProperty:kABPersonFlags] intValue];
|
|
|
+-
|
|
|
++
|
|
|
+ #define SET_STRING(_value, _name, _notify, _session) \
|
|
|
+ SetStringProperty(this, _value, #_name, _notify, _session)
|
|
|
+-
|
|
|
++
|
|
|
+ // If kABShowAsCompany is set we use the company name as display name.
|
|
|
+ if (kABPersonFlags && (flags & kABShowAsCompany)) {
|
|
|
+ nsString company;
|
|
|
+ nsresult rv = GetPropertyAsAString(kCompanyProperty, company);
|
|
|
+ if (NS_FAILED(rv))
|
|
|
+ company.Truncate();
|
|
|
+ SET_STRING(company, DisplayName, aNotify, abManager);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ // Use the order used in the OS X address book to set DisplayName.
|
|
|
+ int order = kABPersonFlags && (flags & kABNameOrderingMask);
|
|
|
+ if (kABPersonFlags && (order == kABDefaultNameOrdering)) {
|
|
|
+ order = [addressBook defaultNameOrdering];
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ nsAutoString displayName, tempName;
|
|
|
+ if (kABPersonFlags && (order == kABFirstNameFirst)) {
|
|
|
+ GetFirstName(tempName);
|
|
|
+ displayName.Append(tempName);
|
|
|
+
|
|
|
+ GetLastName(tempName);
|
|
|
+
|
|
|
+ // Only append a space if the last name and the first name are not empty
|
|
|
+@@ -290,46 +290,46 @@ nsAbOSXCard::Update(bool aNotify)
|
|
|
+ // Only append a space if the last name and the first name are not empty
|
|
|
+ if (!tempName.IsEmpty() && !displayName.IsEmpty())
|
|
|
+ displayName.Append(' ');
|
|
|
+
|
|
|
+ displayName.Append(tempName);
|
|
|
+ }
|
|
|
+ SET_STRING(displayName, DisplayName, aNotify, abManager);
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ ABMultiValue *value = GetMultiValue(card, kABEmailProperty);
|
|
|
+ if (value) {
|
|
|
+ unsigned int count = [value count];
|
|
|
+ if (count > 0) {
|
|
|
+ unsigned int j = [value indexForIdentifier:[value primaryIdentifier]];
|
|
|
+-
|
|
|
++
|
|
|
+ if (j < count)
|
|
|
+ SET_STRING([value valueAtIndex:j], PrimaryEmail, aNotify,
|
|
|
+ abManager);
|
|
|
+-
|
|
|
++
|
|
|
+ // If j is 0 (first in the list) we want the second in the list
|
|
|
+ // (index 1), if j is anything else we want the first in the list
|
|
|
+ // (index 0).
|
|
|
+ j = (j == 0);
|
|
|
+ if (j < count)
|
|
|
+ SET_STRING([value valueAtIndex:j], SecondEmail, aNotify,
|
|
|
+ abManager);
|
|
|
+ }
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ // We map the first home address we can find and the first work address
|
|
|
+ // we can find. If we find none, we map the primary address to the home
|
|
|
+ // address.
|
|
|
+ if (!foundHome && !foundWork) {
|
|
|
+ value = GetMultiValue(card, kABAddressProperty);
|
|
|
+ if (value) {
|
|
|
+ unsigned int count = [value count];
|
|
|
+ unsigned int j = [value indexForIdentifier:[value primaryIdentifier]];
|
|
|
+-
|
|
|
++
|
|
|
+ if (j < count) {
|
|
|
+ NSDictionary *address = [value valueAtIndex:j];
|
|
|
+ if (address) {
|
|
|
+ SET_STRING([address objectForKey:kABAddressStreetKey],
|
|
|
+ HomeAddress, aNotify, abManager);
|
|
|
+ SET_STRING([address objectForKey:kABAddressCityKey],
|
|
|
+ HomeCity, aNotify, abManager);
|
|
|
+ SET_STRING([address objectForKey:kABAddressStateKey],
|
|
|
+@@ -356,46 +356,46 @@ nsAbOSXCard::Update(bool aNotify)
|
|
|
+ } else if ([imValue isKindOfClass:[NSDictionary class]]) {
|
|
|
+ NSString* instantMessageService = [imValue objectForKey:@"InstantMessageService"];
|
|
|
+ const char* fieldName = InstantMessengerFieldName(instantMessageService);
|
|
|
+ NSString* userName = [imValue objectForKey:@"InstantMessageUsername"];
|
|
|
+ SetStringProperty(this, userName, fieldName, aNotify, abManager);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ #define MAP_DATE(_date, _name, _notify, _session) \
|
|
|
+ MapDate(this, _date, #_name"Year", #_name"Month", #_name"Day", _notify, \
|
|
|
+ _session)
|
|
|
+-
|
|
|
++
|
|
|
+ NSDate *date = [card valueForProperty:kABBirthdayProperty];
|
|
|
+ if (date)
|
|
|
+ MAP_DATE(date, Birth, aNotify, abManager);
|
|
|
+-
|
|
|
++
|
|
|
+ if (kABOtherDatesProperty) {
|
|
|
+ value = GetMultiValue(card, kABOtherDatesProperty);
|
|
|
+ if (value) {
|
|
|
+ unsigned int j, count = [value count];
|
|
|
+ for (j = 0; j < count; ++j) {
|
|
|
+ if ([[value labelAtIndex:j] isEqualToString:kABAnniversaryLabel]) {
|
|
|
+ date = [value valueAtIndex:j];
|
|
|
+ if (date) {
|
|
|
+ MAP_DATE(date, Anniversary, aNotify, abManager);
|
|
|
+-
|
|
|
++
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ #undef MAP_DATE
|
|
|
+ #undef SET_STRING
|
|
|
+-
|
|
|
++
|
|
|
+ date = [card valueForProperty:kABModificationDateProperty];
|
|
|
+- if (date)
|
|
|
++ if (date)
|
|
|
+ SetPropertyAsUint32("LastModifiedDate",
|
|
|
+ uint32_t([date timeIntervalSince1970]));
|
|
|
+ // XXX No way to notify about this?
|
|
|
+
|
|
|
+ return NS_OK;
|
|
|
+
|
|
|
+ NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
|
|
|
+ }
|
|
|
+diff --git a/mailnews/addrbook/src/nsAbOSXDirectory.mm b/mailnews/addrbook/src/nsAbOSXDirectory.mm
|
|
|
+--- a/mailnews/addrbook/src/nsAbOSXDirectory.mm
|
|
|
++++ b/mailnews/addrbook/src/nsAbOSXDirectory.mm
|
|
|
+@@ -109,17 +109,17 @@ Sync(NSString *aUid)
|
|
|
+ ABAddressBook *addressBook = [ABAddressBook sharedAddressBook];
|
|
|
+ ABRecord *card = [addressBook recordForUniqueId:aUid];
|
|
|
+ if ([card isKindOfClass:[ABGroup class]])
|
|
|
+ {
|
|
|
+ nsCOMPtr<nsIAbDirectory> directory;
|
|
|
+ GetOrCreateGroup(aUid, getter_AddRefs(directory));
|
|
|
+ nsCOMPtr<nsIAbOSXDirectory> osxDirectory =
|
|
|
+ do_QueryInterface(directory);
|
|
|
+-
|
|
|
++
|
|
|
+ if (osxDirectory) {
|
|
|
+ osxDirectory->Update();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ nsCOMPtr<nsIAbCard> abCard;
|
|
|
+ nsresult rv;
|
|
|
+
|
|
|
+@@ -149,17 +149,17 @@ Sync(NSString *aUid)
|
|
|
+ @interface ABChangedMonitor : NSObject
|
|
|
+ -(void)ABChanged:(NSNotification *)aNotification;
|
|
|
+ @end
|
|
|
+
|
|
|
+ @implementation ABChangedMonitor
|
|
|
+ -(void)ABChanged:(NSNotification *)aNotification
|
|
|
+ {
|
|
|
+ NSDictionary *changes = [aNotification userInfo];
|
|
|
+-
|
|
|
++
|
|
|
+ nsresult rv;
|
|
|
+ NSArray *inserted = [changes objectForKey:kABInsertedRecords];
|
|
|
+
|
|
|
+ if (inserted) {
|
|
|
+ nsCOMPtr<nsIAbManager> abManager = do_GetService(NS_ABMANAGER_CONTRACTID, &rv);
|
|
|
+ NS_ENSURE_SUCCESS_VOID(rv);
|
|
|
+
|
|
|
+ nsCOMPtr<nsIAbDirectory> directory;
|
|
|
+@@ -190,26 +190,26 @@ Sync(NSString *aUid)
|
|
|
+ // Construct a card
|
|
|
+ nsresult rv = CreateCard(card, getter_AddRefs(abCard));
|
|
|
+ NS_ENSURE_SUCCESS_VOID(rv);
|
|
|
+ rv = osxDirectory->AssertCard(abManager, abCard);
|
|
|
+ NS_ENSURE_SUCCESS_VOID(rv);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ NSArray *updated = [changes objectForKey:kABUpdatedRecords];
|
|
|
+ if (updated) {
|
|
|
+ unsigned int i, count = [updated count];
|
|
|
+ for (i = 0; i < count; ++i) {
|
|
|
+ NSString *uid = [updated objectAtIndex:i];
|
|
|
+ Sync(uid);
|
|
|
+ }
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ NSArray *deleted = [changes objectForKey:kABDeletedRecords];
|
|
|
+ if (deleted) {
|
|
|
+
|
|
|
+ nsCOMPtr<nsIAbManager> abManager = do_GetService(NS_ABMANAGER_CONTRACTID, &rv);
|
|
|
+ NS_ENSURE_SUCCESS_VOID(rv);
|
|
|
+
|
|
|
+ nsCOMPtr<nsIAbDirectory> directory;
|
|
|
+ rv = abManager->GetDirectory(NS_LITERAL_CSTRING(NS_ABOSXDIRECTORY_URI_PREFIX"/"),
|
|
|
+@@ -226,34 +226,34 @@ Sync(NSString *aUid)
|
|
|
+
|
|
|
+ nsAutoCString uid;
|
|
|
+ AppendToCString(deletedUid, uid);
|
|
|
+
|
|
|
+ rv = osxDirectory->DeleteUid(uid);
|
|
|
+ NS_ENSURE_SUCCESS_VOID(rv);
|
|
|
+ }
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ if (!inserted && !updated && !deleted) {
|
|
|
+ // XXX This is supposed to mean "everything was updated", but we get
|
|
|
+ // this whenever something has changed, so not sure what to do.
|
|
|
+ }
|
|
|
+ }
|
|
|
+ @end
|
|
|
+
|
|
|
+ static nsresult
|
|
|
+ MapConditionString(nsIAbBooleanConditionString *aCondition, bool aNegate,
|
|
|
+ bool &aCanHandle, ABSearchElement **aResult)
|
|
|
+ {
|
|
|
+ aCanHandle = false;
|
|
|
+-
|
|
|
++
|
|
|
+ nsAbBooleanConditionType conditionType = 0;
|
|
|
+ nsresult rv = aCondition->GetCondition(&conditionType);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+-
|
|
|
++
|
|
|
+ ABSearchComparison comparison;
|
|
|
+ switch (conditionType) {
|
|
|
+ case nsIAbBooleanConditionTypes::Contains:
|
|
|
+ {
|
|
|
+ if (!aNegate) {
|
|
|
+ comparison = kABContainsSubString;
|
|
|
+ aCanHandle = true;
|
|
|
+ }
|
|
|
+@@ -300,44 +300,44 @@ MapConditionString(nsIAbBooleanCondition
|
|
|
+ }
|
|
|
+ case nsIAbBooleanConditionTypes::GreaterThan:
|
|
|
+ {
|
|
|
+ comparison = aNegate ? kABLessThanOrEqual : kABGreaterThan;
|
|
|
+ aCanHandle = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ if (!aCanHandle)
|
|
|
+ return NS_OK;
|
|
|
+-
|
|
|
++
|
|
|
+ nsCString name;
|
|
|
+ rv = aCondition->GetName(getter_Copies(name));
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+-
|
|
|
++
|
|
|
+ nsString value;
|
|
|
+ rv = aCondition->GetValue(getter_Copies(value));
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+-
|
|
|
++
|
|
|
+ uint32_t length = value.Length();
|
|
|
+-
|
|
|
++
|
|
|
+ uint32_t i;
|
|
|
+ for (i = 0; i < nsAbOSXUtils::kPropertyMapSize; ++i) {
|
|
|
+ if (name.Equals(nsAbOSXUtils::kPropertyMap[i].mPropertyName)) {
|
|
|
+ *aResult =
|
|
|
+ [ABPerson searchElementForProperty:nsAbOSXUtils::kPropertyMap[i].mOSXProperty
|
|
|
+ label:nsAbOSXUtils::kPropertyMap[i].mOSXLabel
|
|
|
+ key:nsAbOSXUtils::kPropertyMap[i].mOSXKey
|
|
|
+ value:[NSString stringWithCharacters:reinterpret_cast<const unichar*>(value.get()) length:length]
|
|
|
+ comparison:comparison];
|
|
|
+-
|
|
|
++
|
|
|
+ return NS_OK;
|
|
|
+ }
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ if (name.EqualsLiteral("DisplayName") && comparison == kABContainsSubString) {
|
|
|
+ ABSearchElement *first =
|
|
|
+ [ABPerson searchElementForProperty:kABFirstNameProperty
|
|
|
+ label:nil
|
|
|
+ key:nil
|
|
|
+ value:[NSString stringWithCharacters:reinterpret_cast<const unichar*>(value.get()) length:length]
|
|
|
+ comparison:comparison];
|
|
|
+ ABSearchElement *second =
|
|
|
+@@ -347,107 +347,107 @@ MapConditionString(nsIAbBooleanCondition
|
|
|
+ value:[NSString stringWithCharacters:reinterpret_cast<const unichar*>(value.get()) length:length]
|
|
|
+ comparison:comparison];
|
|
|
+ ABSearchElement *third =
|
|
|
+ [ABGroup searchElementForProperty:kABGroupNameProperty
|
|
|
+ label:nil
|
|
|
+ key:nil
|
|
|
+ value:[NSString stringWithCharacters:reinterpret_cast<const unichar*>(value.get()) length:length]
|
|
|
+ comparison:comparison];
|
|
|
+-
|
|
|
++
|
|
|
+ *aResult = [ABSearchElement searchElementForConjunction:kABSearchOr children:[NSArray arrayWithObjects:first, second, third, nil]];
|
|
|
+-
|
|
|
++
|
|
|
+ return NS_OK;
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ aCanHandle = false;
|
|
|
+-
|
|
|
++
|
|
|
+ return NS_OK;
|
|
|
+ }
|
|
|
+
|
|
|
+ static nsresult
|
|
|
+ BuildSearchElements(nsIAbBooleanExpression *aExpression,
|
|
|
+ bool &aCanHandle,
|
|
|
+ ABSearchElement **aResult)
|
|
|
+ {
|
|
|
+ aCanHandle = true;
|
|
|
+-
|
|
|
++
|
|
|
+ nsCOMPtr<nsIArray> expressions;
|
|
|
+ nsresult rv = aExpression->GetExpressions(getter_AddRefs(expressions));
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+-
|
|
|
++
|
|
|
+ nsAbBooleanOperationType operation;
|
|
|
+ rv = aExpression->GetOperation(&operation);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+-
|
|
|
++
|
|
|
+ uint32_t count;
|
|
|
+ rv = expressions->GetLength(&count);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+-
|
|
|
++
|
|
|
+ NS_ASSERTION(count > 1 && operation != nsIAbBooleanOperationTypes::NOT,
|
|
|
+ "This doesn't make sense!");
|
|
|
+-
|
|
|
++
|
|
|
+ NSMutableArray *array = nullptr;
|
|
|
+ if (count > 1)
|
|
|
+ array = [[NSMutableArray alloc] init];
|
|
|
+-
|
|
|
++
|
|
|
+ uint32_t i;
|
|
|
+ nsCOMPtr<nsIAbBooleanConditionString> condition;
|
|
|
+ nsCOMPtr<nsIAbBooleanExpression> subExpression;
|
|
|
+ for (i = 0; i < count; ++i) {
|
|
|
+ ABSearchElement *element = nullptr;
|
|
|
+-
|
|
|
++
|
|
|
+ condition = do_QueryElementAt(expressions, i);
|
|
|
+ if (condition) {
|
|
|
+ rv = MapConditionString(condition, operation == nsIAbBooleanOperationTypes::NOT, aCanHandle, &element);
|
|
|
+ if (NS_FAILED(rv))
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ subExpression = do_QueryElementAt(expressions, i);
|
|
|
+ if (subExpression) {
|
|
|
+ rv = BuildSearchElements(subExpression, aCanHandle, &element);
|
|
|
+ if (NS_FAILED(rv))
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ if (!aCanHandle) {
|
|
|
+ // remember to free the array when returning early
|
|
|
+ [array release];
|
|
|
+ return NS_OK;
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ if (element) {
|
|
|
+ if (array)
|
|
|
+ [array addObject:element];
|
|
|
+- else
|
|
|
++ else
|
|
|
+ *aResult = element;
|
|
|
+ }
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ if (array) {
|
|
|
+ if (NS_SUCCEEDED(rv)) {
|
|
|
+ ABSearchConjunction conjunction = operation == nsIAbBooleanOperationTypes::AND ? kABSearchAnd : kABSearchOr;
|
|
|
+ *aResult = [ABSearchElement searchElementForConjunction:conjunction children:array];
|
|
|
+ }
|
|
|
+ [array release];
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ return rv;
|
|
|
+ }
|
|
|
+
|
|
|
+ static bool
|
|
|
+ Search(nsIAbBooleanExpression *aExpression, NSArray **aResult)
|
|
|
+ {
|
|
|
+ bool canHandle = false;
|
|
|
+ ABSearchElement *searchElement;
|
|
|
+ nsresult rv = BuildSearchElements(aExpression, canHandle, &searchElement);
|
|
|
+ NS_ENSURE_SUCCESS(rv, false);
|
|
|
+-
|
|
|
++
|
|
|
+ if (canHandle)
|
|
|
+ *aResult = [[ABAddressBook sharedAddressBook] recordsMatchingSearchElement:searchElement];
|
|
|
+
|
|
|
+ return canHandle;
|
|
|
+ }
|
|
|
+
|
|
|
+ static uint32_t sObserverCount = 0;
|
|
|
+ static ABChangedMonitor *sObserver = nullptr;
|
|
|
+@@ -600,30 +600,30 @@ CheckRedundantCards(nsIAbManager *aManag
|
|
|
+ nsresult rv;
|
|
|
+ nsCOMPtr<nsIAbOSXCard> osxCard = do_QueryInterface(aCard, &rv);
|
|
|
+ NS_ENSURE_SUCCESS(rv, false);
|
|
|
+
|
|
|
+ nsAutoCString uri;
|
|
|
+ rv = osxCard->GetURI(uri);
|
|
|
+ NS_ENSURE_SUCCESS(rv, false);
|
|
|
+ NSString *uid = [NSString stringWithUTF8String:(uri.get() + 21)];
|
|
|
+-
|
|
|
++
|
|
|
+ unsigned int i, count = [aCardList count];
|
|
|
+ for (i = 0; i < count; ++i) {
|
|
|
+ if ([[[aCardList objectAtIndex:i] uniqueId] isEqualToString:uid]) {
|
|
|
+ [aCardList removeObjectAtIndex:i];
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (i == count) {
|
|
|
+ aManager->NotifyDirectoryItemDeleted(aDirectory, aCard);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ nsresult
|
|
|
+ nsAbOSXDirectory::GetRootOSXDirectory(nsIAbOSXDirectory **aResult)
|
|
|
+ {
|
|
|
+ if (!mCacheTopLevelOSXAb)
|
|
|
+ {
|
|
|
+@@ -650,21 +650,21 @@ nsAbOSXDirectory::GetRootOSXDirectory(ns
|
|
|
+ nsresult
|
|
|
+ nsAbOSXDirectory::Update()
|
|
|
+ {
|
|
|
+ NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
|
|
|
+
|
|
|
+ nsresult rv;
|
|
|
+ nsCOMPtr<nsIAbManager> abManager = do_GetService(NS_ABMANAGER_CONTRACTID, &rv);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+-
|
|
|
++
|
|
|
+ if (mIsQueryURI) {
|
|
|
+ return NS_OK;
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ ABAddressBook *addressBook = [ABAddressBook sharedAddressBook];
|
|
|
+ // Due to the horrible way the address book code works wrt mailing lists
|
|
|
+ // we have to use a different list depending on what we are. This pointer
|
|
|
+ // holds a reference to that list.
|
|
|
+ nsIMutableArray* cardList;
|
|
|
+ NSArray *groups, *cards;
|
|
|
+ if (m_IsMailList) {
|
|
|
+ ABGroup *group = (ABGroup*)[addressBook recordForUniqueId:[NSString stringWithUTF8String:nsAutoCString(Substring(mURINoQuery, 21)).get()]];
|
|
|
+@@ -686,60 +686,60 @@ nsAbOSXDirectory::Update()
|
|
|
+ if (!mCardList)
|
|
|
+ {
|
|
|
+ mCardList = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+ }
|
|
|
+ // For directories, store the cards in mCardList
|
|
|
+ cardList = mCardList;
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ NSMutableArray *mutableArray = [NSMutableArray arrayWithArray:cards];
|
|
|
+ uint32_t addressCount;
|
|
|
+ rv = cardList->GetLength(&addressCount);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+
|
|
|
+ while (addressCount--)
|
|
|
+ {
|
|
|
+ nsCOMPtr<nsIAbCard> card(do_QueryElementAt(cardList, addressCount, &rv));
|
|
|
+ if (NS_FAILED(rv))
|
|
|
+ break;
|
|
|
+
|
|
|
+ if (CheckRedundantCards(abManager, this, card, mutableArray))
|
|
|
+ cardList->RemoveElementAt(addressCount);
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ NSEnumerator *enumerator = [mutableArray objectEnumerator];
|
|
|
+ ABRecord *card;
|
|
|
+ nsCOMPtr<nsIAbCard> abCard;
|
|
|
+ nsCOMPtr<nsIAbOSXDirectory> rootOSXDirectory;
|
|
|
+ rv = GetRootOSXDirectory(getter_AddRefs(rootOSXDirectory));
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+
|
|
|
+ while ((card = [enumerator nextObject]))
|
|
|
+ {
|
|
|
+ rv = GetCard(card, getter_AddRefs(abCard), rootOSXDirectory);
|
|
|
+ if (NS_FAILED(rv))
|
|
|
+ rv = CreateCard(card, getter_AddRefs(abCard));
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+ AssertCard(abManager, abCard);
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ card = (ABRecord*)[addressBook recordForUniqueId:[NSString stringWithUTF8String:nsAutoCString(Substring(mURINoQuery, 21)).get()]];
|
|
|
+ NSString * stringValue = [card valueForProperty:kABGroupNameProperty];
|
|
|
+ if (![stringValue isEqualToString:WrapString(m_ListDirName)])
|
|
|
+ {
|
|
|
+ nsAutoString oldValue(m_ListDirName);
|
|
|
+ AssignToString(stringValue, m_ListDirName);
|
|
|
+ nsCOMPtr<nsISupports> supports = do_QueryInterface(static_cast<nsIAbDirectory *>(this), &rv);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+ abManager->NotifyItemPropertyChanged(supports, "DirName",
|
|
|
+ oldValue.get(), m_ListDirName.get());
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ if (groups)
|
|
|
+ {
|
|
|
+ mutableArray = [NSMutableArray arrayWithArray:groups];
|
|
|
+ nsCOMPtr<nsIAbDirectory> directory;
|
|
|
+ // It is ok to use m_AddressList here as only top-level directories have
|
|
|
+ // groups, and they will be in m_AddressList
|
|
|
+ if (m_AddressList)
|
|
|
+ {
|
|
|
+@@ -751,79 +751,79 @@ nsAbOSXDirectory::Update()
|
|
|
+ directory = do_QueryElementAt(m_AddressList, addressCount, &rv);
|
|
|
+ if (NS_FAILED(rv))
|
|
|
+ continue;
|
|
|
+
|
|
|
+ nsAutoCString uri;
|
|
|
+ directory->GetURI(uri);
|
|
|
+ uri.Cut(0, 21);
|
|
|
+ NSString *uid = [NSString stringWithUTF8String:uri.get()];
|
|
|
+-
|
|
|
++
|
|
|
+ unsigned int j, arrayCount = [mutableArray count];
|
|
|
+ for (j = 0; j < arrayCount; ++j) {
|
|
|
+ if ([[[mutableArray objectAtIndex:j] uniqueId] isEqualToString:uid]) {
|
|
|
+ [mutableArray removeObjectAtIndex:j];
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ if (j == arrayCount) {
|
|
|
+ UnassertDirectory(abManager, directory);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ enumerator = [mutableArray objectEnumerator];
|
|
|
+ while ((card = [enumerator nextObject])) {
|
|
|
+ rv = GetOrCreateGroup([card uniqueId], getter_AddRefs(directory));
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+-
|
|
|
++
|
|
|
+ AssertDirectory(abManager, directory);
|
|
|
+ }
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ return NS_OK;
|
|
|
+
|
|
|
+ NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
|
|
|
+ }
|
|
|
+
|
|
|
+ nsresult
|
|
|
+ nsAbOSXDirectory::AssertChildNodes()
|
|
|
+ {
|
|
|
+ NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
|
|
|
+
|
|
|
+ // Queries and mailing lists can't have childnodes.
|
|
|
+ if (mIsQueryURI || m_IsMailList) {
|
|
|
+ return NS_OK;
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ nsresult rv;
|
|
|
+ nsCOMPtr<nsIAbManager> abManager =
|
|
|
+ do_GetService(NS_ABMANAGER_CONTRACTID, &rv);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+-
|
|
|
++
|
|
|
+ NSArray *groups = [[ABAddressBook sharedAddressBook] groups];
|
|
|
+-
|
|
|
++
|
|
|
+ unsigned int i, count = [groups count];
|
|
|
+-
|
|
|
++
|
|
|
+ if (count > 0 && !m_AddressList) {
|
|
|
+ m_AddressList = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ nsCOMPtr<nsIAbDirectory> directory;
|
|
|
+ for (i = 0; i < count; ++i) {
|
|
|
+ rv = GetOrCreateGroup([[groups objectAtIndex:i] uniqueId],
|
|
|
+ getter_AddRefs(directory));
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+-
|
|
|
++
|
|
|
+ rv = AssertDirectory(abManager, directory);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ return NS_OK;
|
|
|
+
|
|
|
+ NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
|
|
|
+ }
|
|
|
+
|
|
|
+ nsresult
|
|
|
+ nsAbOSXDirectory::AssertDirectory(nsIAbManager *aManager,
|
|
|
+ nsIAbDirectory *aDirectory)
|
|
|
+@@ -834,17 +834,17 @@ nsAbOSXDirectory::AssertDirectory(nsIAbM
|
|
|
+ // We already have this directory, so no point in adding it again.
|
|
|
+ return NS_OK;
|
|
|
+
|
|
|
+ nsresult rv;
|
|
|
+ if (!m_AddressList) {
|
|
|
+ m_AddressList = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ rv = m_AddressList->AppendElement(aDirectory);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+
|
|
|
+ return aManager->NotifyDirectoryItemAdded(this, aDirectory);
|
|
|
+ }
|
|
|
+
|
|
|
+ nsresult
|
|
|
+ nsAbOSXDirectory::AssertCard(nsIAbManager *aManager,
|
|
|
+@@ -874,17 +874,17 @@ nsAbOSXDirectory::AssertCard(nsIAbManage
|
|
|
+
|
|
|
+ nsresult
|
|
|
+ nsAbOSXDirectory::UnassertCard(nsIAbManager *aManager,
|
|
|
+ nsIAbCard *aCard,
|
|
|
+ nsIMutableArray *aCardList)
|
|
|
+ {
|
|
|
+ nsresult rv;
|
|
|
+ uint32_t pos;
|
|
|
+-
|
|
|
++
|
|
|
+ if (NS_SUCCEEDED(aCardList->IndexOf(0, aCard, &pos)))
|
|
|
+ rv = aCardList->RemoveElementAt(pos);
|
|
|
+
|
|
|
+ return aManager->NotifyDirectoryItemDeleted(this, aCard);
|
|
|
+ }
|
|
|
+
|
|
|
+ nsresult
|
|
|
+ nsAbOSXDirectory::UnassertDirectory(nsIAbManager *aManager,
|
|
|
+@@ -901,57 +901,57 @@ nsAbOSXDirectory::UnassertDirectory(nsIA
|
|
|
+
|
|
|
+ return aManager->NotifyDirectoryItemDeleted(this, aDirectory);
|
|
|
+ }
|
|
|
+
|
|
|
+ NS_IMETHODIMP
|
|
|
+ nsAbOSXDirectory::GetChildNodes(nsISimpleEnumerator **aNodes)
|
|
|
+ {
|
|
|
+ NS_ENSURE_ARG_POINTER(aNodes);
|
|
|
+-
|
|
|
++
|
|
|
+ // Queries don't have childnodes.
|
|
|
+ if (mIsQueryURI || m_IsMailList || !m_AddressList)
|
|
|
+ return NS_NewEmptyEnumerator(aNodes);
|
|
|
+-
|
|
|
++
|
|
|
+ return NS_NewArrayEnumerator(aNodes, m_AddressList);
|
|
|
+ }
|
|
|
+
|
|
|
+ NS_IMETHODIMP
|
|
|
+ nsAbOSXDirectory::GetChildCards(nsISimpleEnumerator **aCards)
|
|
|
+ {
|
|
|
+ NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
|
|
|
+
|
|
|
+ NS_ENSURE_ARG_POINTER(aCards);
|
|
|
+-
|
|
|
++
|
|
|
+ nsresult rv;
|
|
|
+ NSArray *cards;
|
|
|
+ if (mIsQueryURI)
|
|
|
+ {
|
|
|
+ nsCOMPtr<nsIAbBooleanExpression> expression;
|
|
|
+ rv = nsAbQueryStringToExpression::Convert(mQueryString,
|
|
|
+ getter_AddRefs(expression));
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+-
|
|
|
++
|
|
|
+ bool canHandle = !m_IsMailList && Search(expression, &cards);
|
|
|
+ if (!canHandle)
|
|
|
+ return FallbackSearch(expression, aCards);
|
|
|
+
|
|
|
+ if (!mCardList)
|
|
|
+ mCardList = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
|
|
|
+ else
|
|
|
+ mCardList->Clear();
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+-
|
|
|
++
|
|
|
+ // The uuid for initializing cards
|
|
|
+ nsAutoCString ourUuid;
|
|
|
+ GetUuid(ourUuid);
|
|
|
+
|
|
|
+ // Fill the results array and update the card list
|
|
|
+ unsigned int nbCards = [cards count];
|
|
|
+-
|
|
|
++
|
|
|
+ unsigned int i;
|
|
|
+ nsCOMPtr<nsIAbCard> card;
|
|
|
+ nsCOMPtr<nsIAbOSXDirectory> rootOSXDirectory;
|
|
|
+ rv = GetRootOSXDirectory(getter_AddRefs(rootOSXDirectory));
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+
|
|
|
+ for (i = 0; i < nbCards; ++i)
|
|
|
+ {
|
|
|
+@@ -1174,17 +1174,17 @@ nsAbOSXDirectory::HasCard(nsIAbCard *aCa
|
|
|
+ }
|
|
|
+
|
|
|
+ NS_IMETHODIMP
|
|
|
+ nsAbOSXDirectory::HasDirectory(nsIAbDirectory *aDirectory,
|
|
|
+ bool *aHasDirectory)
|
|
|
+ {
|
|
|
+ NS_ENSURE_ARG_POINTER(aDirectory);
|
|
|
+ NS_ENSURE_ARG_POINTER(aHasDirectory);
|
|
|
+-
|
|
|
++
|
|
|
+ *aHasDirectory = false;
|
|
|
+
|
|
|
+ uint32_t pos;
|
|
|
+ if (m_AddressList && NS_SUCCEEDED(m_AddressList->IndexOf(0, aDirectory, &pos)))
|
|
|
+ *aHasDirectory = true;
|
|
|
+
|
|
|
+ return NS_OK;
|
|
|
+ }
|
|
|
+@@ -1198,90 +1198,90 @@ nsAbOSXDirectory::OnSearchFinished(int32
|
|
|
+ NS_IMETHODIMP
|
|
|
+ nsAbOSXDirectory::OnSearchFoundCard(nsIAbCard *aCard)
|
|
|
+ {
|
|
|
+ nsresult rv;
|
|
|
+ if (!m_AddressList) {
|
|
|
+ m_AddressList = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ if (!mCardList) {
|
|
|
+ mCardList = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+ }
|
|
|
+
|
|
|
+ rv = m_AddressList->AppendElement(aCard);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+-
|
|
|
++
|
|
|
+ rv = mCardList->AppendElement(aCard);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+
|
|
|
+ nsAutoCString ourUuid;
|
|
|
+ GetUuid(ourUuid);
|
|
|
+ aCard->SetDirectoryId(ourUuid);
|
|
|
+-
|
|
|
++
|
|
|
+ return NS_OK;
|
|
|
+ }
|
|
|
+
|
|
|
+ nsresult
|
|
|
+ nsAbOSXDirectory::FallbackSearch(nsIAbBooleanExpression *aExpression,
|
|
|
+ nsISimpleEnumerator **aCards)
|
|
|
+ {
|
|
|
+ nsresult rv;
|
|
|
+-
|
|
|
++
|
|
|
+ if (mCardList)
|
|
|
+ rv = mCardList->Clear();
|
|
|
+ else
|
|
|
+ mCardList = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+-
|
|
|
++
|
|
|
+ if (m_AddressList) {
|
|
|
+ m_AddressList->Clear();
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ m_AddressList = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ nsCOMPtr<nsIAbDirectoryQueryArguments> arguments =
|
|
|
+ do_CreateInstance(NS_ABDIRECTORYQUERYARGUMENTS_CONTRACTID, &rv);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+-
|
|
|
++
|
|
|
+ rv = arguments->SetExpression(aExpression);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+-
|
|
|
++
|
|
|
+ // Don't search the subdirectories. If the current directory is a mailing
|
|
|
+ // list, it won't have any subdirectories. If the current directory is an
|
|
|
+ // addressbook, searching both it and the subdirectories (the mailing
|
|
|
+ // lists), will yield duplicate results because every entry in a mailing
|
|
|
+ // list will be an entry in the parent addressbook.
|
|
|
+ rv = arguments->SetQuerySubDirectories(false);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+-
|
|
|
++
|
|
|
+ // Get the directory without the query
|
|
|
+ nsCOMPtr<nsIAbManager> abManager = do_GetService(NS_ABMANAGER_CONTRACTID, &rv);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+
|
|
|
+ nsCOMPtr<nsIAbDirectory> directory;
|
|
|
+ rv = abManager->GetDirectory(mURINoQuery, getter_AddRefs(directory));
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+
|
|
|
+ // Initiate the proxy query with the no query directory
|
|
|
+- nsCOMPtr<nsIAbDirectoryQueryProxy> queryProxy =
|
|
|
++ nsCOMPtr<nsIAbDirectoryQueryProxy> queryProxy =
|
|
|
+ do_CreateInstance(NS_ABDIRECTORYQUERYPROXY_CONTRACTID, &rv);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+-
|
|
|
++
|
|
|
+ rv = queryProxy->Initiate();
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+-
|
|
|
++
|
|
|
+ int32_t context = 0;
|
|
|
+ rv = queryProxy->DoQuery(directory, arguments, this, -1, 0, &context);
|
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
|
+-
|
|
|
++
|
|
|
+ return NS_NewArrayEnumerator(aCards, m_AddressList);
|
|
|
+ }
|
|
|
+
|
|
|
+ nsresult nsAbOSXDirectory::DeleteUid(const nsACString &aUid)
|
|
|
+ {
|
|
|
+ if (!m_AddressList)
|
|
|
+ return NS_ERROR_NULL_POINTER;
|
|
|
+
|
|
|
+diff --git a/mailnews/base/content/folderWidgets.xml b/mailnews/base/content/folderWidgets.xml
|
|
|
+--- a/mailnews/base/content/folderWidgets.xml
|
|
|
++++ b/mailnews/base/content/folderWidgets.xml
|
|
|
+@@ -209,17 +209,17 @@
|
|
|
+ if (!(aItem instanceof Ci.nsIMsgFolder))
|
|
|
+ return;
|
|
|
+ if (this._filterFunction && !this._filterFunction(aItem)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //xxx we can optimize this later
|
|
|
+ this._clearMenu(this._menu);
|
|
|
+ },
|
|
|
+-
|
|
|
++
|
|
|
+ OnItemRemoved: function act_remove(aRDFParentItem, aItem) {
|
|
|
+ if (!(aItem instanceof Ci.nsIMsgFolder))
|
|
|
+ return;
|
|
|
+ if (this._filterFunction && !this._filterFunction(aItem)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //xxx we can optimize this later
|
|
|
+ this._clearMenu(this._menu);
|
|
|
+diff --git a/mailnews/base/content/junkMailInfo.xul b/mailnews/base/content/junkMailInfo.xul
|
|
|
+--- a/mailnews/base/content/junkMailInfo.xul
|
|
|
++++ b/mailnews/base/content/junkMailInfo.xul
|
|
|
+@@ -7,17 +7,17 @@
|
|
|
+ <!DOCTYPE dialog [
|
|
|
+ <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
|
|
|
+ %brandDTD;
|
|
|
+ <!ENTITY % junkMailInfoDTD SYSTEM "chrome://messenger/locale/junkMailInfo.dtd" >
|
|
|
+ %junkMailInfoDTD;
|
|
|
+ ]>
|
|
|
+
|
|
|
+ <?xml-stylesheet href="chrome://messenger/skin/messenger.css" type="text/css"?>
|
|
|
+-<?xml-stylesheet href="chrome://messenger/skin/primaryToolbar.css" type="text/css"?>
|
|
|
++<?xml-stylesheet href="chrome://messenger/skin/primaryToolbar.css" type="text/css"?>
|
|
|
+
|
|
|
+ <dialog id="junkMailInfo"
|
|
|
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
|
+ title="&window.title;"
|
|
|
+ windowtype="mailnews:junkmailinfo"
|
|
|
+ buttons="accept">
|
|
|
+
|
|
|
+ <vbox flex="1" width="&window.width;">
|
|
|
+diff --git a/mailnews/base/content/msgAccountCentral.xul b/mailnews/base/content/msgAccountCentral.xul
|
|
|
+--- a/mailnews/base/content/msgAccountCentral.xul
|
|
|
++++ b/mailnews/base/content/msgAccountCentral.xul
|
|
|
+@@ -1,9 +1,9 @@
|
|
|
+-<?xml version="1.0"?>
|
|
|
++<?xml version="1.0"?>
|
|
|
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
|
+
|
|
|
+ <?xml-stylesheet href="chrome://messenger/skin/accountCentral.css" type="text/css"?>
|
|
|
+
|
|
|
+ <!DOCTYPE page [
|
|
|
+ <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
|
|
|
+diff --git a/mailnews/base/content/shutdownWindow.xul b/mailnews/base/content/shutdownWindow.xul
|
|
|
+--- a/mailnews/base/content/shutdownWindow.xul
|
|
|
++++ b/mailnews/base/content/shutdownWindow.xul
|
|
|
+@@ -10,22 +10,22 @@
|
|
|
+ <dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
|
+ style="padding: 20px; width: 350px"
|
|
|
+ onload="onLoad()"
|
|
|
+ buttons="cancel"
|
|
|
+ ondialogcancel="return onCancel();">
|
|
|
+
|
|
|
+ <script type="application/javascript" src="chrome://messenger/content/shutdownWindow.js"/>
|
|
|
+ <stringbundle id="bundle_shutdown" src="chrome://messenger/locale/shutdownWindow.properties"/>
|
|
|
+-
|
|
|
++
|
|
|
+ <vbox align="center">
|
|
|
+ <label id="shutdownStatus_label" value="" />
|
|
|
+ <separator class="thin" />
|
|
|
+ </vbox>
|
|
|
+-
|
|
|
++
|
|
|
+ <progressmeter id="shutdown_progressmeter" mode="determined" />
|
|
|
+-
|
|
|
++
|
|
|
+ <vbox align="center">
|
|
|
+ <label id="shutdownTask_label" value="" />
|
|
|
+ <separator class="thick" />
|
|
|
+ </vbox>
|
|
|
+-
|
|
|
++
|
|
|
+ </dialog>
|
|
|
+diff --git a/mailnews/base/prefs/content/AccountWizard.xul b/mailnews/base/prefs/content/AccountWizard.xul
|
|
|
+--- a/mailnews/base/prefs/content/AccountWizard.xul
|
|
|
++++ b/mailnews/base/prefs/content/AccountWizard.xul
|
|
|
+@@ -57,17 +57,17 @@
|
|
|
+ <radio id="movemailaccount" label="&accountTypeMovemail.label;"
|
|
|
+ accesskey="&accountTypeMovemail.accesskey;"
|
|
|
+ value="movemail" />
|
|
|
+ #endif
|
|
|
+ #ifndef MOZ_THUNDERBIRD
|
|
|
+ <radio id="rssaccount" value="rss" label="&feeds.wizardLongName;"
|
|
|
+ accesskey="&feeds.wizardLongName.accesskey;"/>
|
|
|
+ #endif
|
|
|
+- <vbox datasources="rdf:ispdefaults"
|
|
|
++ <vbox datasources="rdf:ispdefaults"
|
|
|
+ containment="http://home.netscape.com/NC-rdf#providers"
|
|
|
+ id="ispBox"
|
|
|
+ ref="NC:ispinfo">
|
|
|
+ <template>
|
|
|
+ <rule nc:wizardShow="true">
|
|
|
+ <radio uri="..."
|
|
|
+ value="rdf:http://home.netscape.com/NC-rdf#wizardShortName"
|
|
|
+ label="rdf:http://home.netscape.com/NC-rdf#wizardLongName"
|
|
|
+@@ -91,24 +91,24 @@
|
|
|
+ <separator/>
|
|
|
+ <description>&fullnameDesc.label; &fullnameExample.label;</description>
|
|
|
+ <separator class="thin"/>
|
|
|
+ <hbox align="center">
|
|
|
+ <label class="awIdentityLabel" value="&fullnameLabel.label;"
|
|
|
+ accesskey="&fullnameLabel.accesskey;" control="fullName"/>
|
|
|
+ <textbox mailtype="identity" wsm_persist="true" name="fullName" id="fullName" flex="1" oninput="identityPageValidate();"/>
|
|
|
+ </hbox>
|
|
|
+- <separator/>
|
|
|
++ <separator/>
|
|
|
+ <grid>
|
|
|
+ <columns>
|
|
|
+ <column flex="1"/>
|
|
|
+ </columns>
|
|
|
+ <rows>
|
|
|
+ <row>
|
|
|
+- <description id="emailDescText"/>
|
|
|
++ <description id="emailDescText"/>
|
|
|
+ </row>
|
|
|
+ <separator class="thin"/>
|
|
|
+ <row>
|
|
|
+ <hbox align="center">
|
|
|
+ <label class="awIdentityLabel" id="emailFieldLabel" value="&emailLabel.label;"
|
|
|
+ accesskey="&emailLabel.accesskey;" control="email"/>
|
|
|
+ <hbox class="uri-element" align="center" flex="1">
|
|
|
+ <textbox wsm_persist="true" mailtype="identity" name="email"
|
|
|
+@@ -133,22 +133,22 @@
|
|
|
+ onpageadvanced="return incomingPageUnload();">
|
|
|
+ <vbox flex="1">
|
|
|
+ <vbox id="serverTypeBox">
|
|
|
+ <label control="servertype">&incomingServerTypeDesc.label;</label>
|
|
|
+ <separator class="thin"/>
|
|
|
+ <hbox align="center" class="serverDataBox">
|
|
|
+ <!-- The initial value for the servertype radiogroup is set in onInit() -->
|
|
|
+ <radiogroup id="servertype" wsm_persist="true" orient="horizontal">
|
|
|
+- <radio group="servertype" value="pop3" id="pop3" label="&popType.label;"
|
|
|
++ <radio group="servertype" value="pop3" id="pop3" label="&popType.label;"
|
|
|
+ wsm_persist="true" oncommand="setServerType();" accesskey="&popType.accesskey;"/>
|
|
|
+ <radio group="servertype" value="imap" id="imap" label="&imapType.label;"
|
|
|
+ wsm_persist="true" oncommand="setServerType();" accesskey="&imapType.accesskey;"/>
|
|
|
+ </radiogroup>
|
|
|
+- <label id="serverPortLabel" control="serverPort"
|
|
|
++ <label id="serverPortLabel" control="serverPort"
|
|
|
+ accesskey="&portNum.accesskey;"
|
|
|
+ value="&portNum.label;"/>
|
|
|
+ <textbox id="serverPort" type="number" size="3" max="65535"/>
|
|
|
+ <label id="defaultPortLabel" value="&defaultPortLabel.label;"/>
|
|
|
+ <label id="defaultPortValue" value="&defaultPortValue.label;"/>
|
|
|
+ </hbox>
|
|
|
+ <separator/>
|
|
|
+ </vbox>
|
|
|
+@@ -277,33 +277,33 @@
|
|
|
+ class="uri-element"
|
|
|
+ oninput="incomingPageValidate();"/>
|
|
|
+ </hbox>
|
|
|
+ </vbox>
|
|
|
+ </wizardpage>
|
|
|
+
|
|
|
+ <!-- Account name page : User gets a choice to enter a pretty name for the account -->
|
|
|
+ <!-- Defaults : Mail account -> Email address, Newsgroup account -> Newsgroup server name -->
|
|
|
+- <wizardpage id="accnamepage" pageid="accnamepage"
|
|
|
++ <wizardpage id="accnamepage" pageid="accnamepage"
|
|
|
+ label="&accnameTitle.label;"
|
|
|
+ onpageshow="return acctNamePageInit();"
|
|
|
+ onpageadvanced="return acctNamePageUnload();">
|
|
|
+ <vbox flex="1">
|
|
|
+ <description>&accnameDesc.label;</description>
|
|
|
+ <separator class="thin"/>
|
|
|
+ <hbox align="center">
|
|
|
+ <label class="label" value="&accnameLabel.label;" style="width: 8em;"
|
|
|
+ accesskey="&accnameLabel.accesskey;" control="prettyName"/>
|
|
|
+ <textbox id="prettyName" size="40" wsm_persist="true" flex="1" oninput="acctNamePageValidate();"/>
|
|
|
+ </hbox>
|
|
|
+ </vbox>
|
|
|
+ </wizardpage>
|
|
|
+
|
|
|
+ <!-- Done page : this page summarizes information collected to create a mail/news account -->
|
|
|
+- <wizardpage id="done" pageid="done"
|
|
|
++ <wizardpage id="done" pageid="done"
|
|
|
+ label="&completionTitle.label;"
|
|
|
+ onpageshow="return donePageInit();">
|
|
|
+ <vbox flex="1">
|
|
|
+ <description>&completionText.label;</description>
|
|
|
+ <separator class="thin"/>
|
|
|
+ <grid>
|
|
|
+ <columns>
|
|
|
+ <column/>
|
|
|
+diff --git a/mailnews/base/prefs/content/am-offline.xul b/mailnews/base/prefs/content/am-offline.xul
|
|
|
+--- a/mailnews/base/prefs/content/am-offline.xul
|
|
|
++++ b/mailnews/base/prefs/content/am-offline.xul
|
|
|
+@@ -6,23 +6,23 @@
|
|
|
+ <?xml-stylesheet href="chrome://messenger/skin/accountManage.css" type="text/css"?>
|
|
|
+
|
|
|
+ <!DOCTYPE page SYSTEM "chrome://messenger/locale/am-offline.dtd">
|
|
|
+
|
|
|
+ <page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
|
+ onload="parent.onPanelLoaded('am-offline.xul');">
|
|
|
+
|
|
|
+ <vbox flex="1" style="overflow: auto;">
|
|
|
+- <stringbundle id="bundle_prefs" src="chrome://messenger/locale/prefs.properties"/>
|
|
|
++ <stringbundle id="bundle_prefs" src="chrome://messenger/locale/prefs.properties"/>
|
|
|
+
|
|
|
+ <script type="application/javascript" src="chrome://messenger/content/AccountManager.js"/>
|
|
|
+ <script type="application/javascript" src="chrome://messenger/content/retention.js"/>
|
|
|
+ <script type="application/javascript" src="chrome://messenger/content/am-offline.js"/>
|
|
|
+
|
|
|
+- <label hidden="true" wsm_persist="true" id="server.type"/>
|
|
|
++ <label hidden="true" wsm_persist="true" id="server.type"/>
|
|
|
+ <label id="imap.autoSyncMaxAgeDays" hidden="true"
|
|
|
+ wsm_persist="true" preftype="int"
|
|
|
+ prefstring="mail.server.%serverkey%.autosync_max_age_days"/>
|
|
|
+
|
|
|
+ <dialogheader id="headertitle"/>
|
|
|
+
|
|
|
+ <groupbox id="offline.titlebox" hidefor="movemail,pop3,none,rss">
|
|
|
+ <caption label="&syncGroupTitle.label;"/>
|
|
|
+diff --git a/mailnews/base/src/nsMessengerOSXIntegration.mm b/mailnews/base/src/nsMessengerOSXIntegration.mm
|
|
|
+--- a/mailnews/base/src/nsMessengerOSXIntegration.mm
|
|
|
++++ b/mailnews/base/src/nsMessengerOSXIntegration.mm
|
|
|
+@@ -113,17 +113,17 @@ static void openMailWindow(const nsCStri
|
|
|
+ wwatch->OpenWindow(0, "chrome://messenger/content/messageWindow.xul",
|
|
|
+ "_blank", "all,chrome,dialog=no,status,toolbar", msgUri,
|
|
|
+ getter_AddRefs(newWindow));
|
|
|
+ #else
|
|
|
+ nsCOMPtr<nsIMessenger> messenger(do_CreateInstance(NS_MESSENGER_CONTRACTID, &rv));
|
|
|
+ if (NS_FAILED(rv))
|
|
|
+ return;
|
|
|
+
|
|
|
+- nsCOMPtr<nsIMsgDBHdr> msgHdr;
|
|
|
++ nsCOMPtr<nsIMsgDBHdr> msgHdr;
|
|
|
+ messenger->MsgHdrFromURI(aUri, getter_AddRefs(msgHdr));
|
|
|
+ if (msgHdr)
|
|
|
+ {
|
|
|
+ nsCOMPtr<mozIDOMWindowProxy> newWindow;
|
|
|
+ wwatch->OpenWindow(0, "chrome://messenger/content/messageWindow.xul",
|
|
|
+ "_blank", "all,chrome,dialog=no,status,toolbar", msgHdr,
|
|
|
+ getter_AddRefs(newWindow));
|
|
|
+ }
|
|
|
+@@ -216,17 +216,17 @@ nsMessengerOSXIntegration::Observe(nsISu
|
|
|
+ if (!strcmp(aTopic, "alertfinished"))
|
|
|
+ return OnAlertFinished();
|
|
|
+
|
|
|
+ if (!strcmp(aTopic, "alertclickcallback"))
|
|
|
+ return OnAlertClicked(aData);
|
|
|
+
|
|
|
+ #ifdef MOZ_SUITE
|
|
|
+ // SeaMonkey does most of the GUI work in JS code when clicking on a mail
|
|
|
+- // notification, so it needs an extra function here
|
|
|
++ // notification, so it needs an extra function here
|
|
|
+ if (!strcmp(aTopic, "alertclicksimplecallback"))
|
|
|
+ return OnAlertClickedSimple();
|
|
|
+ #endif
|
|
|
+
|
|
|
+ if (!strcmp(aTopic, "mail-startup-done")) {
|
|
|
+ nsresult rv;
|
|
|
+ nsCOMPtr<nsIObserverService> observerService = do_GetService("@mozilla.org/observer-service;1", &rv);
|
|
|
+ if (NS_SUCCEEDED(rv)) {
|
|
|
+diff --git a/mailnews/build/nsMailModule.cpp b/mailnews/build/nsMailModule.cpp
|
|
|
+--- a/mailnews/build/nsMailModule.cpp
|
|
|
++++ b/mailnews/build/nsMailModule.cpp
|
|
|
+@@ -1,36 +1,36 @@
|
|
|
+ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
+ /* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
+
|
|
|
+ /* ****************************************************************************
|
|
|
+ * ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
|
|
|
+ * ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
|
|
|
+- *
|
|
|
++ *
|
|
|
+ * ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
|
|
|
+ * ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
|
|
|
+- *
|
|
|
++ *
|
|
|
+ * Dear Mortals,
|
|
|
+- *
|
|
|
++ *
|
|
|
+ * Please be advised that if you are adding something here, you should also
|
|
|
+ * strongly consider adding it to the other place it goes too! These can be
|
|
|
+ * found in paths like so: mailnews/.../build/WhateverFactory.cpp
|
|
|
+- *
|
|
|
++ *
|
|
|
+ * If you do not, your (static) release builds will be quite pleasant, but
|
|
|
+ * (dynamic) debug builds will disappoint you by not having your component in
|
|
|
+ * them.
|
|
|
+- *
|
|
|
++ *
|
|
|
+ * Yours truly,
|
|
|
+ * The ghost that haunts the MailNews codebase.
|
|
|
+- *
|
|
|
++ *
|
|
|
+ * ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
|
|
|
+ * ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
|
|
|
+- *
|
|
|
++ *
|
|
|
+ * ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
|
|
|
+ * ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
|
|
|
+ * ****************************************************************************/
|
|
|
+
|
|
|
+
|
|
|
+ ////////////////////////////////////////////////////////////////////////////////
|
|
|
+ // Core Module Include Files
|
|
|
+ ////////////////////////////////////////////////////////////////////////////////
|
|
|
+diff --git a/mailnews/compose/content/sendProgress.xul b/mailnews/compose/content/sendProgress.xul
|
|
|
+--- a/mailnews/compose/content/sendProgress.xul
|
|
|
++++ b/mailnews/compose/content/sendProgress.xul
|
|
|
+@@ -1,9 +1,9 @@
|
|
|
+-<?xml version="1.0"?>
|
|
|
++<?xml version="1.0"?>
|
|
|
+
|
|
|
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
|
+
|
|
|
+ <?xml-stylesheet href="chrome://messenger/skin/dialogs.css" type="text/css"?>
|
|
|
+
|
|
|
+ <!DOCTYPE dialog SYSTEM "chrome://messenger/locale/messengercompose/sendProgress.dtd">
|
|
|
+diff --git a/mailnews/db/gloda/content/glodacomplete.xml b/mailnews/db/gloda/content/glodacomplete.xml
|
|
|
+--- a/mailnews/db/gloda/content/glodacomplete.xml
|
|
|
++++ b/mailnews/db/gloda/content/glodacomplete.xml
|
|
|
+@@ -300,25 +300,25 @@
|
|
|
+ <implementation implements="nsIDOMXULSelectControlItemElement">
|
|
|
+ <constructor>
|
|
|
+ <![CDATA[
|
|
|
+ this._explanation = document.getAnonymousElementByAttribute(this, "anonid", "explanation");
|
|
|
+
|
|
|
+ this._adjustAcItem();
|
|
|
+ ]]>
|
|
|
+ </constructor>
|
|
|
+-
|
|
|
++
|
|
|
+ <property name="label" readonly="true">
|
|
|
+ <getter>
|
|
|
+ <![CDATA[
|
|
|
+ return "tag " + this.row.item.tag;
|
|
|
+ ]]>
|
|
|
+ </getter>
|
|
|
+ </property>
|
|
|
+-
|
|
|
++
|
|
|
+ <method name="_adjustAcItem">
|
|
|
+ <body>
|
|
|
+ <![CDATA[
|
|
|
+ let label = gGlodaCompleteStrings.get("glodaComplete.messagesTagged.label");
|
|
|
+ this._explanation.value = label.replace("#1", this.row.item.tag);
|
|
|
+ ]]>
|
|
|
+ </body>
|
|
|
+ </method>
|
|
|
+@@ -334,25 +334,25 @@
|
|
|
+ <implementation implements="nsIDOMXULSelectControlItemElement">
|
|
|
+ <constructor>
|
|
|
+ <![CDATA[
|
|
|
+ this._explanation = document.getAnonymousElementByAttribute(this, "anonid", "explanation");
|
|
|
+
|
|
|
+ this._adjustAcItem();
|
|
|
+ ]]>
|
|
|
+ </constructor>
|
|
|
+-
|
|
|
++
|
|
|
+ <property name="label" readonly="true">
|
|
|
+ <getter>
|
|
|
+ <![CDATA[
|
|
|
+ return "full text search: " + this.row.item;
|
|
|
+ ]]>
|
|
|
+ </getter>
|
|
|
+ </property>
|
|
|
+-
|
|
|
++
|
|
|
+ <method name="_adjustAcItem">
|
|
|
+ <body>
|
|
|
+ <![CDATA[
|
|
|
+ let label = gGlodaCompleteStrings.get("glodaComplete.messagesMentioning.label");
|
|
|
+ this._explanation.value = label.replace("#1", this.row.item);
|
|
|
+ ]]>
|
|
|
+ </body>
|
|
|
+ </method>
|
|
|
+@@ -365,25 +365,25 @@
|
|
|
+ </content>
|
|
|
+ <implementation implements="nsIDOMXULSelectControlItemElement">
|
|
|
+ <constructor>
|
|
|
+ <![CDATA[
|
|
|
+ this._explanation = document.getAnonymousElementByAttribute(this, "anonid", "explanation");
|
|
|
+ this._adjustAcItem();
|
|
|
+ ]]>
|
|
|
+ </constructor>
|
|
|
+-
|
|
|
++
|
|
|
+ <property name="label" readonly="true">
|
|
|
+ <getter>
|
|
|
+ <![CDATA[
|
|
|
+ return "full text search: " + this.row.item; // what is this for? l10n?
|
|
|
+ ]]>
|
|
|
+ </getter>
|
|
|
+ </property>
|
|
|
+-
|
|
|
++
|
|
|
+ <method name="_adjustAcItem">
|
|
|
+ <body>
|
|
|
+ <![CDATA[
|
|
|
+ let label = gGlodaCompleteStrings.get("glodaComplete.messagesMentioningMany.label");
|
|
|
+ this._explanation.value = label.replace("#1", this.row.words.join(", "));
|
|
|
+ ]]>
|
|
|
+ </body>
|
|
|
+ </method>
|
|
|
+@@ -436,43 +436,43 @@
|
|
|
+
|
|
|
+ this._typeImage = document.getAnonymousElementByAttribute(this, "anonid", "type-image");
|
|
|
+
|
|
|
+ this._identityBox = document.getAnonymousElementByAttribute(this, "anonid", "identity-box");
|
|
|
+ this._identity = document.getAnonymousElementByAttribute(this, "anonid", "identity");
|
|
|
+
|
|
|
+ this._nameBox = document.getAnonymousElementByAttribute(this, "anonid", "name-box");
|
|
|
+ this._name = document.getAnonymousElementByAttribute(this, "anonid", "name");
|
|
|
+-
|
|
|
++
|
|
|
+ this._picture = document.getAnonymousElementByAttribute(this, "anonid", "picture");
|
|
|
+
|
|
|
+ this._adjustAcItem();
|
|
|
+ ]]>
|
|
|
+ </constructor>
|
|
|
+-
|
|
|
++
|
|
|
+ <property name="label" readonly="true">
|
|
|
+ <getter>
|
|
|
+ <![CDATA[
|
|
|
+ var identity = this.row.item;
|
|
|
+ return identity.accessibleLabel;
|
|
|
+ ]]>
|
|
|
+ </getter>
|
|
|
+ </property>
|
|
|
+-
|
|
|
++
|
|
|
+ <method name="_adjustAcItem">
|
|
|
+ <body>
|
|
|
+ <![CDATA[
|
|
|
+ var identity = this.row.item;
|
|
|
+-
|
|
|
++
|
|
|
+ if (identity == null)
|
|
|
+ return;
|
|
|
+-
|
|
|
++
|
|
|
+ // I guess we should get the picture size from CSS or something?
|
|
|
+ this._picture.src = identity.pictureURL(32);
|
|
|
+-
|
|
|
++
|
|
|
+ // Emphasize the matching search terms for the description
|
|
|
+ this._setUpDescription(this._name, identity.contact.name);
|
|
|
+ this._setUpDescription(this._identity, identity.value);
|
|
|
+
|
|
|
+ // Set up overflow on a timeout because the contents of the box
|
|
|
+ // might not have a width yet even though we just changed them
|
|
|
+ setTimeout(this._setUpOverflow, 0, this._nameBox, this._nameOverflowEllipsis);
|
|
|
+ setTimeout(this._setUpOverflow, 0, this._identityBox, this._identityOverflowEllipsis);
|
|
|
+@@ -526,45 +526,45 @@
|
|
|
+
|
|
|
+ this._typeImage = document.getAnonymousElementByAttribute(this, "anonid", "type-image");
|
|
|
+
|
|
|
+ this._identityBox = document.getAnonymousElementByAttribute(this, "anonid", "identity-box");
|
|
|
+ this._identity = document.getAnonymousElementByAttribute(this, "anonid", "identity");
|
|
|
+
|
|
|
+ this._nameBox = document.getAnonymousElementByAttribute(this, "anonid", "name-box");
|
|
|
+ this._name = document.getAnonymousElementByAttribute(this, "anonid", "name");
|
|
|
+-
|
|
|
++
|
|
|
+ this._picture = document.getAnonymousElementByAttribute(this, "anonid", "picture");
|
|
|
+
|
|
|
+ this._adjustAcItem();
|
|
|
+ ]]>
|
|
|
+ </constructor>
|
|
|
+-
|
|
|
++
|
|
|
+ <property name="label" readonly="true">
|
|
|
+ <getter>
|
|
|
+ <![CDATA[
|
|
|
+ var identity = this.obj;
|
|
|
+ return identity.accessibleLabel;
|
|
|
+ ]]>
|
|
|
+ </getter>
|
|
|
+ </property>
|
|
|
+-
|
|
|
++
|
|
|
+ <method name="_adjustAcItem">
|
|
|
+ <body>
|
|
|
+ <![CDATA[
|
|
|
+ var contact = this.obj;
|
|
|
+-
|
|
|
++
|
|
|
+ if (contact == null)
|
|
|
+ return;
|
|
|
+-
|
|
|
++
|
|
|
+ var identity = contact.identities[0];
|
|
|
+-
|
|
|
++
|
|
|
+ // I guess we should get the picture size from CSS or something?
|
|
|
+ this._picture.src = identity.pictureURL(32);
|
|
|
+-
|
|
|
++
|
|
|
+ // Emphasize the matching search terms for the description
|
|
|
+ this._setUpDescription(this._name, contact.name);
|
|
|
+ this._setUpDescription(this._identity, identity.value);
|
|
|
+
|
|
|
+ // Set up overflow on a timeout because the contents of the box
|
|
|
+ // might not have a width yet even though we just changed them
|
|
|
+ setTimeout(this._setUpOverflow, 0, this._nameBox, this._nameOverflowEllipsis);
|
|
|
+ setTimeout(this._setUpOverflow, 0, this._identityBox, this._identityOverflowEllipsis);
|
|
|
+@@ -584,54 +584,54 @@
|
|
|
+ <constructor>
|
|
|
+ <![CDATA[
|
|
|
+ this._explanation = document.getAnonymousElementByAttribute(this, "anonid", "explanation");
|
|
|
+ this._identityHolder = document.getAnonymousElementByAttribute(this, "anonid", "identity-holder");
|
|
|
+
|
|
|
+ this._adjustAcItem();
|
|
|
+ ]]>
|
|
|
+ </constructor>
|
|
|
+-
|
|
|
++
|
|
|
+ <property name="label" readonly="true">
|
|
|
+ <getter>
|
|
|
+ <![CDATA[
|
|
|
+ return this._explanation.value;
|
|
|
+ ]]>
|
|
|
+ </getter>
|
|
|
+ </property>
|
|
|
+-
|
|
|
++
|
|
|
+ <method name="renderItem">
|
|
|
+ <parameter name="aObj"/>
|
|
|
+ <body>
|
|
|
+ var node = document.createElementNS(
|
|
|
+ "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
|
|
|
+ "richlistitem");
|
|
|
+-
|
|
|
++
|
|
|
+ node.obj = aObj;
|
|
|
+ node.setAttribute("type",
|
|
|
+ "gloda-" + this.row.nounDef.name + "-chunk");
|
|
|
+-
|
|
|
++
|
|
|
+ this._identityHolder.appendChild(node);
|
|
|
+ </body>
|
|
|
+ </method>
|
|
|
+-
|
|
|
++
|
|
|
+ <method name="_adjustAcItem">
|
|
|
+ <body>
|
|
|
+ <![CDATA[
|
|
|
+ // clear out any lingering children
|
|
|
+ while (this._identityHolder.hasChildNodes())
|
|
|
+ this._identityHolder.lastChild.remove();
|
|
|
+-
|
|
|
++
|
|
|
+ var row = this.row;
|
|
|
+ if (row == null)
|
|
|
+ return;
|
|
|
+-
|
|
|
++
|
|
|
+ this._explanation.value = row.nounDef.name + "s " +
|
|
|
+ row.criteriaType + "ed " + row.criteria;
|
|
|
+-
|
|
|
++
|
|
|
+ // render anyone already in there
|
|
|
+ for (let item of row.collection.items) {
|
|
|
+ this.renderItem(item);
|
|
|
+ }
|
|
|
+ // listen up, yo.
|
|
|
+ row.renderer = this;
|
|
|
+ ]]>
|
|
|
+ </body>
|
|
|
+diff --git a/mailnews/extensions/dsn/content/am-dsn.xul b/mailnews/extensions/dsn/content/am-dsn.xul
|
|
|
+--- a/mailnews/extensions/dsn/content/am-dsn.xul
|
|
|
++++ b/mailnews/extensions/dsn/content/am-dsn.xul
|
|
|
+@@ -5,42 +5,42 @@
|
|
|
+ This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
|
+
|
|
|
+ <?xml-stylesheet href="chrome://messenger/skin/accountManage.css" type="text/css"?>
|
|
|
+
|
|
|
+ <!DOCTYPE page SYSTEM "chrome://messenger/locale/am-dsn.dtd">
|
|
|
+
|
|
|
+-<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
|
++<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
|
+ onload="parent.onPanelLoaded('am-dsn.xul');">
|
|
|
+
|
|
|
+- <stringbundle id="bundle_smime" src="chrome://messenger/locale/am-dsn.properties"/>
|
|
|
++ <stringbundle id="bundle_smime" src="chrome://messenger/locale/am-dsn.properties"/>
|
|
|
+ <script type="application/javascript" src="chrome://messenger/content/AccountManager.js"/>
|
|
|
+ <script type="application/javascript" src="chrome://messenger/content/am-dsn.js"/>
|
|
|
+-
|
|
|
++
|
|
|
+ <dialogheader title="&pane.title;"/>
|
|
|
+
|
|
|
+ <groupbox>
|
|
|
+
|
|
|
+ <caption label="&pane.title;"/>
|
|
|
+
|
|
|
+ <hbox id="prefChoices" align="center">
|
|
|
+ <radiogroup id="identity.dsn_use_custom_prefs"
|
|
|
+ wsm_persist="true"
|
|
|
+- genericattr="true"
|
|
|
++ genericattr="true"
|
|
|
+ preftype="bool"
|
|
|
+- prefstring="mail.identity.%identitykey%.dsn_use_custom_prefs"
|
|
|
++ prefstring="mail.identity.%identitykey%.dsn_use_custom_prefs"
|
|
|
+ oncommand="EnableDisableCustomSettings();">
|
|
|
+-
|
|
|
++
|
|
|
+ <radio id="identity.select_global_prefs"
|
|
|
+ value="false"
|
|
|
+ label="&useGlobalPrefs.label;"
|
|
|
+ accesskey="&useGlobalPrefs.accesskey;"/>
|
|
|
+-
|
|
|
++
|
|
|
+ <radio id="identity.select_custom_prefs"
|
|
|
+ value="true"
|
|
|
+ label="&useCustomPrefs.label;"
|
|
|
+ accesskey="&useCustomPrefs.accesskey;"/>
|
|
|
+ </radiogroup>
|
|
|
+ </hbox>
|
|
|
+
|
|
|
+ <vbox id="dsnSettings" class="indent" align="start">
|
|
|
+diff --git a/mailnews/extensions/smime/content/certFetchingStatus.xul b/mailnews/extensions/smime/content/certFetchingStatus.xul
|
|
|
+--- a/mailnews/extensions/smime/content/certFetchingStatus.xul
|
|
|
++++ b/mailnews/extensions/smime/content/certFetchingStatus.xul
|
|
|
+@@ -4,17 +4,17 @@
|
|
|
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
|
+
|
|
|
+ <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
|
|
+ <?xml-stylesheet href="chrome://messenger/skin/smime/certFetchingStatus.css" type="text/css"?>
|
|
|
+
|
|
|
+ <!DOCTYPE dialog SYSTEM "chrome://messenger-smime/locale/certFetchingStatus.dtd">
|
|
|
+
|
|
|
+ <dialog id="certFetchingStatus" title="&title.label;"
|
|
|
+- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
|
++ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
|
+ style="width: 50em;"
|
|
|
+ buttons="cancel"
|
|
|
+ buttonlabelcancel="&stop.label;"
|
|
|
+ ondialogcancel="return stopFetching();"
|
|
|
+ onload="onLoad();">
|
|
|
+
|
|
|
+ <stringbundle id="bundle_ldap" src="chrome://mozldap/locale/ldap.properties"/>
|
|
|
+ <script type="application/javascript" src="chrome://messenger-smime/content/certFetchingStatus.js"/>
|
|
|
+diff --git a/mailnews/extensions/smime/content/msgCompSecurityInfo.xul b/mailnews/extensions/smime/content/msgCompSecurityInfo.xul
|
|
|
+--- a/mailnews/extensions/smime/content/msgCompSecurityInfo.xul
|
|
|
++++ b/mailnews/extensions/smime/content/msgCompSecurityInfo.xul
|
|
|
+@@ -4,25 +4,25 @@
|
|
|
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
|
+
|
|
|
+ <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
|
|
+ <?xml-stylesheet href="chrome://messenger/skin/smime/msgCompSecurityInfo.css" type="text/css"?>
|
|
|
+
|
|
|
+ <!DOCTYPE dialog SYSTEM "chrome://messenger-smime/locale/msgCompSecurityInfo.dtd">
|
|
|
+
|
|
|
+ <dialog id="msgCompSecurityInfo" title="&title.label;"
|
|
|
+- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
|
++ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
|
+ style="width: 50em;"
|
|
|
+ persist="width height"
|
|
|
+ buttons="accept"
|
|
|
+ onload="onLoad();">
|
|
|
+
|
|
|
+ <script type="application/javascript" src="chrome://messenger-smime/content/msgCompSecurityInfo.js"/>
|
|
|
+
|
|
|
+- <stringbundle id="bundle_smime_comp_info" src="chrome://messenger-smime/locale/msgCompSecurityInfo.properties"/>
|
|
|
++ <stringbundle id="bundle_smime_comp_info" src="chrome://messenger-smime/locale/msgCompSecurityInfo.properties"/>
|
|
|
+
|
|
|
+ <description>&subject.plaintextWarning;</description>
|
|
|
+ <separator class="thin"/>
|
|
|
+ <description>&status.heading;</description>
|
|
|
+ <grid>
|
|
|
+ <columns>
|
|
|
+ <column/>
|
|
|
+ <column/>
|
|
|
+diff --git a/mailnews/extensions/smime/content/msgHdrViewSMIMEOverlay.xul b/mailnews/extensions/smime/content/msgHdrViewSMIMEOverlay.xul
|
|
|
+--- a/mailnews/extensions/smime/content/msgHdrViewSMIMEOverlay.xul
|
|
|
++++ b/mailnews/extensions/smime/content/msgHdrViewSMIMEOverlay.xul
|
|
|
+@@ -1,14 +1,14 @@
|
|
|
+-<?xml version="1.0"?>
|
|
|
++<?xml version="1.0"?>
|
|
|
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
|
+
|
|
|
+-<?xml-stylesheet href="chrome://messenger/skin/smime/msgHdrViewSMIMEOverlay.css" type="text/css"?>
|
|
|
++<?xml-stylesheet href="chrome://messenger/skin/smime/msgHdrViewSMIMEOverlay.css" type="text/css"?>
|
|
|
+
|
|
|
+ <overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
|
|
+
|
|
|
+ <script type="application/javascript" src="chrome://messenger-smime/content/msgHdrViewSMIMEOverlay.js"/>
|
|
|
+ <!-- These stringbundles are already defined in msgReadSMIMEOverlay.xul!
|
|
|
+ <stringbundleset id="stringbundleset">
|
|
|
+ <stringbundle id="bundle_read_smime" src="chrome://messenger-smime/locale/msgReadSMIMEOverlay.properties"/>
|
|
|
+ <stringbundle id="bundle_brand" src="chrome://branding/locale/brand.properties"/>
|
|
|
+diff --git a/mailnews/extensions/smime/content/msgReadSMIMEOverlay.xul b/mailnews/extensions/smime/content/msgReadSMIMEOverlay.xul
|
|
|
+--- a/mailnews/extensions/smime/content/msgReadSMIMEOverlay.xul
|
|
|
++++ b/mailnews/extensions/smime/content/msgReadSMIMEOverlay.xul
|
|
|
+@@ -1,9 +1,9 @@
|
|
|
+-<?xml version="1.0"?>
|
|
|
++<?xml version="1.0"?>
|
|
|
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
|
+
|
|
|
+ <?xml-stylesheet href="chrome://messenger/skin/smime/msgReadSMIMEOverlay.css" type="text/css"?>
|
|
|
+
|
|
|
+ <!DOCTYPE overlay SYSTEM "chrome://messenger-smime/locale/msgReadSMIMEOverlay.dtd">
|
|
|
+
|
|
|
+diff --git a/mailnews/extensions/smime/content/msgReadSecurityInfo.xul b/mailnews/extensions/smime/content/msgReadSecurityInfo.xul
|
|
|
+--- a/mailnews/extensions/smime/content/msgReadSecurityInfo.xul
|
|
|
++++ b/mailnews/extensions/smime/content/msgReadSecurityInfo.xul
|
|
|
+@@ -1,27 +1,27 @@
|
|
|
+ <?xml version="1.0"?>
|
|
|
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
|
+
|
|
|
+ <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
|
|
+-<?xml-stylesheet href="chrome://messenger/skin/smime/msgReadSecurityInfo.css" type="text/css"?>
|
|
|
++<?xml-stylesheet href="chrome://messenger/skin/smime/msgReadSecurityInfo.css" type="text/css"?>
|
|
|
+
|
|
|
+ <!DOCTYPE dialog SYSTEM "chrome://messenger-smime/locale/msgReadSecurityInfo.dtd">
|
|
|
+
|
|
|
+ <dialog id="msgReadSecurityInfo" title="&status.label;"
|
|
|
+- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
|
++ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
|
+ style="width: 40em;"
|
|
|
+ buttons="accept"
|
|
|
+ onload="onLoad();">
|
|
|
+
|
|
|
+ <script type="application/javascript" src="chrome://messenger-smime/content/msgReadSecurityInfo.js"/>
|
|
|
+
|
|
|
+- <stringbundle id="bundle_smime_read_info" src="chrome://messenger-smime/locale/msgSecurityInfo.properties"/>
|
|
|
++ <stringbundle id="bundle_smime_read_info" src="chrome://messenger-smime/locale/msgSecurityInfo.properties"/>
|
|
|
+
|
|
|
+ <vbox flex="1">
|
|
|
+ <label id="signatureLabel"/>
|
|
|
+ <label id="signatureHeader" collapsed="true"/>
|
|
|
+ <description id="signatureExplanation"/>
|
|
|
+ <vbox id="signatureCert" collapsed="true">
|
|
|
+ <hbox>
|
|
|
+ <label id="signedByLabel">&signer.name;</label>
|
|
|
+diff --git a/mailnews/import/applemail/src/nsEmlxHelperUtils.mm b/mailnews/import/applemail/src/nsEmlxHelperUtils.mm
|
|
|
+--- a/mailnews/import/applemail/src/nsEmlxHelperUtils.mm
|
|
|
++++ b/mailnews/import/applemail/src/nsEmlxHelperUtils.mm
|
|
|
+@@ -16,22 +16,22 @@
|
|
|
+ #include "nsTArray.h"
|
|
|
+ #include "nsAppleMailImport.h"
|
|
|
+ #include "prprf.h"
|
|
|
+ #include "nsIFile.h"
|
|
|
+
|
|
|
+ #import <Cocoa/Cocoa.h>
|
|
|
+
|
|
|
+
|
|
|
+-nsresult nsEmlxHelperUtils::ConvertToMozillaStatusFlags(const char *aXMLBufferStart,
|
|
|
+- const char *aXMLBufferEnd,
|
|
|
++nsresult nsEmlxHelperUtils::ConvertToMozillaStatusFlags(const char *aXMLBufferStart,
|
|
|
++ const char *aXMLBufferEnd,
|
|
|
+ uint32_t *aMozillaStatusFlags)
|
|
|
+ {
|
|
|
+ // create a NSData wrapper around the buffer, so we can use the Cocoa call below
|
|
|
+- NSData *metadata =
|
|
|
++ NSData *metadata =
|
|
|
+ [[[NSData alloc] initWithBytesNoCopy:(void *)aXMLBufferStart length:(aXMLBufferEnd-aXMLBufferStart) freeWhenDone:NO] autorelease];
|
|
|
+
|
|
|
+ // get the XML data as a dictionary
|
|
|
+ NSPropertyListFormat format;
|
|
|
+ id plist = [NSPropertyListSerialization propertyListWithData:metadata
|
|
|
+ options:NSPropertyListImmutable
|
|
|
+ format:&format
|
|
|
+ error:NULL];
|
|
|
+@@ -40,17 +40,17 @@ nsresult nsEmlxHelperUtils::ConvertToMoz
|
|
|
+ return NS_ERROR_FAILURE;
|
|
|
+
|
|
|
+ // find the <flags>...</flags> value and convert to int
|
|
|
+ const uint32_t emlxMessageFlags = [[(NSDictionary *)plist objectForKey:@"flags"] intValue];
|
|
|
+
|
|
|
+ if (emlxMessageFlags == 0)
|
|
|
+ return NS_ERROR_FAILURE;
|
|
|
+
|
|
|
+- if (emlxMessageFlags & nsEmlxHelperUtils::kRead)
|
|
|
++ if (emlxMessageFlags & nsEmlxHelperUtils::kRead)
|
|
|
+ *aMozillaStatusFlags |= nsMsgMessageFlags::Read;
|
|
|
+ if (emlxMessageFlags & nsEmlxHelperUtils::kForwarded)
|
|
|
+ *aMozillaStatusFlags |= nsMsgMessageFlags::Forwarded;
|
|
|
+ if (emlxMessageFlags & nsEmlxHelperUtils::kAnswered)
|
|
|
+ *aMozillaStatusFlags |= nsMsgMessageFlags::Replied;
|
|
|
+ if (emlxMessageFlags & nsEmlxHelperUtils::kFlagged)
|
|
|
+ *aMozillaStatusFlags |= nsMsgMessageFlags::Marked;
|
|
|
+
|
|
|
+@@ -62,17 +62,17 @@ nsresult nsEmlxHelperUtils::ConvertToMbo
|
|
|
+ nsTArray<const char *> foundFromLines;
|
|
|
+
|
|
|
+ const char *cur = aMessageBufferStart;
|
|
|
+ while (cur < aMessageBufferEnd) {
|
|
|
+
|
|
|
+ const char *foundFromStr = strnstr(cur, "From ", aMessageBufferEnd-cur);
|
|
|
+
|
|
|
+ if (foundFromStr) {
|
|
|
+- // skip all prepending '>' chars
|
|
|
++ // skip all prepending '>' chars
|
|
|
+ const char *fromLineStart = foundFromStr;
|
|
|
+ while (fromLineStart-- >= aMessageBufferStart) {
|
|
|
+ if (*fromLineStart == '\n' || fromLineStart == aMessageBufferStart) {
|
|
|
+ if (fromLineStart > aMessageBufferStart)
|
|
|
+ fromLineStart++;
|
|
|
+ foundFromLines.AppendElement(fromLineStart);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+@@ -80,17 +80,17 @@ nsresult nsEmlxHelperUtils::ConvertToMbo
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ // advance past the last found From string.
|
|
|
+ cur = foundFromStr + 5;
|
|
|
+
|
|
|
+ // look for more From lines.
|
|
|
+ continue;
|
|
|
+- }
|
|
|
++ }
|
|
|
+
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ // go through foundFromLines
|
|
|
+ if (foundFromLines.Length()) {
|
|
|
+
|
|
|
+ const char *chunkStart = aMessageBufferStart;
|
|
|
+@@ -114,17 +114,17 @@ nsresult nsEmlxHelperUtils::AddEmlxMessa
|
|
|
+ // in a C++ environment where the main event loop has no autorelease pool (e.g on a XPCOM thread)
|
|
|
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
|
|
+
|
|
|
+ nsresult rv = NS_ERROR_FAILURE;
|
|
|
+
|
|
|
+ nsAutoCString path;
|
|
|
+ aMessage->GetNativePath(path);
|
|
|
+
|
|
|
+- NSData *data = [NSData dataWithContentsOfFile:[NSString stringWithUTF8String:path.get()]];
|
|
|
++ NSData *data = [NSData dataWithContentsOfFile:[NSString stringWithUTF8String:path.get()]];
|
|
|
+ if (!data) {
|
|
|
+ [pool release];
|
|
|
+ return NS_ERROR_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
+ char *startOfMessageData = NULL;
|
|
|
+ uint32_t actualBytesWritten = 0;
|
|
|
+
|
|
|
+@@ -132,27 +132,27 @@ nsresult nsEmlxHelperUtils::AddEmlxMessa
|
|
|
+ //
|
|
|
+ // -------------------------------
|
|
|
+ // < A number describing how many bytes ahead there is message data >
|
|
|
+ // < Message data >
|
|
|
+ // < XML metadata for this message >
|
|
|
+ // -------------------------------
|
|
|
+
|
|
|
+ // read the first line of the emlx file, which is a number of how many bytes ahead the actual
|
|
|
+- // message data is.
|
|
|
++ // message data is.
|
|
|
+ uint64_t numberOfBytesToRead = strtol((char *)[data bytes], &startOfMessageData, 10);
|
|
|
+ if (numberOfBytesToRead <= 0 || !startOfMessageData) {
|
|
|
+ [pool release];
|
|
|
+ return NS_ERROR_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
+ // skip whitespace
|
|
|
+- while (*startOfMessageData == ' ' ||
|
|
|
+- *startOfMessageData == '\n' ||
|
|
|
+- *startOfMessageData == '\r' ||
|
|
|
++ while (*startOfMessageData == ' ' ||
|
|
|
++ *startOfMessageData == '\n' ||
|
|
|
++ *startOfMessageData == '\r' ||
|
|
|
+ *startOfMessageData == '\t')
|
|
|
+ ++startOfMessageData;
|
|
|
+
|
|
|
+ NS_NAMED_LITERAL_CSTRING(kBogusFromLine, "From \n");
|
|
|
+ NS_NAMED_LITERAL_CSTRING(kEndOfMessage, "\n\n");
|
|
|
+
|
|
|
+ // write the bogus "From " line which is a magic separator in the mbox format
|
|
|
+ rv = aOut->Write(kBogusFromLine.get(), kBogusFromLine.Length(), &actualBytesWritten);
|
|
|
+@@ -177,39 +177,39 @@ nsresult nsEmlxHelperUtils::AddEmlxMessa
|
|
|
+ return rv;
|
|
|
+ }
|
|
|
+
|
|
|
+ rv = aOut->Write(buf.get(), buf.Length(), &dummyRv);
|
|
|
+ if (NS_FAILED(rv)) {
|
|
|
+ [pool release];
|
|
|
+ return rv;
|
|
|
+ }
|
|
|
+-
|
|
|
+- // write out X-Mozilla-Keywords header as well to reserve some space for it
|
|
|
++
|
|
|
++ // write out X-Mozilla-Keywords header as well to reserve some space for it
|
|
|
+ // in the mbox file.
|
|
|
+ rv = aOut->Write(X_MOZILLA_KEYWORDS, X_MOZILLA_KEYWORDS_LEN, &dummyRv);
|
|
|
+ if (NS_FAILED(rv)) {
|
|
|
+ [pool release];
|
|
|
+ return rv;
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ // write out empty X-Mozilla_status2 header
|
|
|
+ buf.Adopt(PR_smprintf(X_MOZILLA_STATUS2_FORMAT MSG_LINEBREAK, 0));
|
|
|
+ NS_ASSERTION(!buf.IsEmpty(), "printf error with X-Mozilla-Status2 header");
|
|
|
+ if (buf.IsEmpty()) {
|
|
|
+ [pool release];
|
|
|
+ return NS_ERROR_OUT_OF_MEMORY;
|
|
|
+ }
|
|
|
+
|
|
|
+ rv = aOut->Write(buf.get(), buf.Length(), &dummyRv);
|
|
|
+ if (NS_FAILED(rv)) {
|
|
|
+ [pool release];
|
|
|
+ return rv;
|
|
|
+ }
|
|
|
+-
|
|
|
++
|
|
|
+ // do any conversion needed for the mbox data to be valid mboxrd.
|
|
|
+ nsCString convertedData;
|
|
|
+ rv = ConvertToMboxRD(startOfMessageData, (startOfMessageData + numberOfBytesToRead), convertedData);
|
|
|
+ if (NS_FAILED(rv)) {
|
|
|
+ [pool release];
|
|
|
+ return rv;
|
|
|
+ }
|
|
|
+
|
|
|
+diff --git a/mailnews/import/content/fieldMapImport.xul b/mailnews/import/content/fieldMapImport.xul
|
|
|
+--- a/mailnews/import/content/fieldMapImport.xul
|
|
|
++++ b/mailnews/import/content/fieldMapImport.xul
|
|
|
+@@ -1,14 +1,14 @@
|
|
|
+-<?xml version="1.0"?>
|
|
|
++<?xml version="1.0"?>
|
|
|
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
|
+
|
|
|
+-<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
|
|
++<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
|
|
+
|
|
|
+ <!DOCTYPE dialog SYSTEM "chrome://messenger/locale/fieldMapImport.dtd">
|
|
|
+
|
|
|
+ <dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
|
+ buttons="accept,cancel"
|
|
|
+ title="&fieldMapImport.title;"
|
|
|
+ style="&fieldMapImport.size;"
|
|
|
+ ondialogaccept="FieldImportOKButton();"
|
|
|
+@@ -18,19 +18,19 @@
|
|
|
+
|
|
|
+ <hbox align="center">
|
|
|
+ <label value="&fieldMapImport.recordNumber;"/>
|
|
|
+ <label id="recordNumber"/>
|
|
|
+ <spacer flex="1"/>
|
|
|
+ <button id="previous" oncommand="Browse(-1);"
|
|
|
+ label="&fieldMapImport.previous.label;"
|
|
|
+ accesskey="&fieldMapImport.previous.accesskey;"/>
|
|
|
+- <button id="next" oncommand="Browse(1);"
|
|
|
++ <button id="next" oncommand="Browse(1);"
|
|
|
+ label="&fieldMapImport.next.label;"
|
|
|
+- accesskey="&fieldMapImport.next.accesskey;"/>
|
|
|
++ accesskey="&fieldMapImport.next.accesskey;"/>
|
|
|
+ </hbox>
|
|
|
+
|
|
|
+ <hbox align="center">
|
|
|
+ <checkbox id="skipFirstRecord"
|
|
|
+ label="&fieldMapImport.skipFirstRecord.label;"
|
|
|
+ accesskey="&fieldMapImport.skipFirstRecord.accessKey;"/>
|
|
|
+ </hbox>
|
|
|
+
|