Browse Source

[Mail] Use the communicator profile manager

custom-2020
Matt A. Tobin 2 years ago committed by Roy Tam
parent
commit
7b0e4c5ed0
  1. 6
      communicator/components/moz.build
  2. 5
      projects/mail/app/blocklist/addons.inc.xml
  3. 20
      projects/mail/base/content/mailCore.js
  4. 2
      projects/mail/base/content/mailWindowOverlay.xul
  5. 3
      projects/mail/locales/en-US/chrome/messenger/messenger.dtd

6
communicator/components/moz.build

@ -3,11 +3,13 @@
# 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/.
DIRS += ['eula']
DIRS += [
'eula',
'profile',
]
if CONFIG['BINOC_BOREALIS']:
DIRS += [
'devtools',
'downloads',
'profile',
]

5
projects/mail/app/blocklist/addons.inc.xml

@ -10,6 +10,11 @@
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="interlink-0003"
id="profileswitcher@projects.binaryoutcast.com">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<!-- Thunderbird 52.6 Entries -->
<emItem blockID="i988" id="{b12785f5-d8d0-4530-a3ea-5c4263b85bef}">
<prefs/>

20
projects/mail/base/content/mailCore.js

@ -421,6 +421,26 @@ function toSanitize()
.sanitize(window);
}
function toProfileManager()
{
var promgrWin = Services.wm.getMostRecentWindow("mozilla:profileSelection");
if (promgrWin) {
promgrWin.focus();
} else {
var params = Components.classes["@mozilla.org/embedcomp/dialogparam;1"]
.createInstance(Components.interfaces.nsIDialogParamBlock);
params.SetNumberStrings(1);
params.SetString(0, "menu");
window.openDialog("chrome://communicator/content/profile/profileSelection.xul",
"",
"centerscreen,chrome,titlebar",
params);
}
// Here, we don't care about the result code
// that was returned in the param block.
}
/**
* Opens the Preferences (Options) dialog.
*

2
projects/mail/base/content/mailWindowOverlay.xul

@ -2930,6 +2930,8 @@
<menuitem id="menu_mac_hide_others" label="&hideOtherAppsCmdMac.label;" key="key_hideOtherAppsCmdMac"/>
<menuitem id="menu_mac_show_all" label="&showAllAppsCmdMac.label;"/>
#endif
<menuseparator id="sep_switchprofile"/>
<menuitem id="cmd_switchprofile" label="&switchProfileCmd.label;" accesskey="&switchProfileCmd.accesskey;" oncommand="toProfileManager();"/>
</menupopup>
</menu>

3
projects/mail/locales/en-US/chrome/messenger/messenger.dtd

@ -482,6 +482,9 @@
<!ENTITY importCmd.accesskey "m">
<!ENTITY clearRecentHistory.label "Clear Recent History…">
<!ENTITY clearRecentHistory.accesskey "H">
<!ENTITY switchProfileCmd.label "Switch Profile…">
<!ENTITY switchProfileCmd.accesskey "h">
<!ENTITY accountManagerCmd2.label "Account Settings">
<!ENTITY accountManagerCmd2.accesskey "S">
<!-- LOCALIZATION NOTE (accountManagerCmdUnix.accesskey):

Loading…
Cancel
Save