Skip to content

Commit

Permalink
Issue #2454 - Guard the classic email account wizard with its own con…
Browse files Browse the repository at this point in the history
…figure option
  • Loading branch information
fofajardo committed Jan 15, 2024
1 parent 133ec26 commit e2e50d0
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 24 deletions.
1 change: 1 addition & 0 deletions build/moz.configure/old.configure
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ def old_configure_options(*options):
'--enable-incomplete-external-linkage',
'--enable-mailnews',
'--enable-mailnews-oauth2',
'--enable-classic-account-wizard',
# Below are configure flags used by Pale Moon
'--disable-browser-statusbar',
Expand Down
14 changes: 7 additions & 7 deletions mailnews/base/content/msgAccountCentral.xul
Original file line number Diff line number Diff line change
Expand Up @@ -153,19 +153,19 @@
<spacer id="CreateAccount.spacer" flex="1" collapsed="true"/>
<row id="CreateAccount" class="acctCentralRow" collapsed="true">
<hbox>
#if defined(MOZ_THUNDERBIRD) && defined(HYPE_ICEDOVE)
<label class="acctCentralText"
value="&newAcct.label;"
chromedir="&locale.dir;"/>
#else
#ifdef MOZ_CLASSIC_ACCOUNT_WIZARD
<label class="acctCentralText acctCentralLinkText"
value="&newAcctLink.label;"
chromedir="&locale.dir;"
onclick="CreateNewAccount();"/>
#endif
</hbox>
</row>
#if defined(MOZ_THUNDERBIRD) && defined(HYPE_ICEDOVE)
#else
<label class="acctCentralText"
value="&newAcct.label;"
chromedir="&locale.dir;"/>
</hbox>
</row>
<row id="CreateAccounts" class="acctCentralRow" collapsed="true">
<vbox id="CreateAccountsList">
<label id="CreateAccountMail"
Expand Down
22 changes: 11 additions & 11 deletions mailnews/base/prefs/content/AccountManager.xul
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,17 @@
<treechildren id="account-tree-children"/>
</tree>

#if defined(MOZ_THUNDERBIRD) && defined(HYPE_ICEDOVE)
#ifdef MOZ_CLASSIC_ACCOUNT_WIZARD
<button label="&addAccountButton.label;" oncommand="onAddAccount(event);" id="addAccountButton"
prefstring="mail.disable_new_account_addition"
accesskey="&addAccountButton.accesskey;"/>
<button label="&setDefaultButton.label;" oncommand="onSetDefault(event);" disabled="true" id="setDefaultButton"
prefstring="mail.disable_button.set_default_account"
accesskey="&setDefaultButton.accesskey;"/>
<button disabled="true" label="&removeButton.label;" oncommand="onRemoveAccount(event);" id="removeButton"
prefstring="mail.disable_button.delete_account"
accesskey="&removeButton.accesskey;"/>
#else
<button id="accountActionsButton" type="menu"
label="&accountActionsButton.label;"
accesskey="&accountActionsButton.accesskey;">
Expand Down Expand Up @@ -69,16 +79,6 @@
oncommand="onRemoveAccount(event); event.stopPropagation();"/>
</menupopup>
</button>
#else
<button label="&addAccountButton.label;" oncommand="onAddAccount(event);" id="addAccountButton"
prefstring="mail.disable_new_account_addition"
accesskey="&addAccountButton.accesskey;"/>
<button label="&setDefaultButton.label;" oncommand="onSetDefault(event);" disabled="true" id="setDefaultButton"
prefstring="mail.disable_button.set_default_account"
accesskey="&setDefaultButton.accesskey;"/>
<button disabled="true" label="&removeButton.label;" oncommand="onRemoveAccount(event);" id="removeButton"
prefstring="mail.disable_button.delete_account"
accesskey="&removeButton.accesskey;"/>
#endif
</vbox>

Expand Down
8 changes: 4 additions & 4 deletions mailnews/base/prefs/content/AccountWizard.xul
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
<wizard id="AccountWizard" title="&windowTitle.label;"
onwizardcancel="return onCancel();"
onwizardfinish="return FinishAccount();"
#if defined(MOZ_THUNDERBIRD) && defined(HYPE_ICEDOVE)
onload="onAccountWizardLoad(); initAccountWizardTB(window.arguments);"
#else
#ifdef MOZ_CLASSIC_ACCOUNT_WIZARD
onload="onAccountWizardLoad();"
#else
onload="onAccountWizardLoad(); initAccountWizardTB(window.arguments);"
#endif
style="&accountWizard.size;"
xmlns:nc="http://home.netscape.com/NC-rdf#"
Expand Down Expand Up @@ -43,7 +43,7 @@
<label control="acctyperadio">&accountTypeDirections.label;</label>
<separator/>
<radiogroup id="acctyperadio" >
#if !defined(MOZ_THUNDERBIRD) || !defined(HYPE_ICEDOVE)
#ifdef MOZ_CLASSIC_ACCOUNT_WIZARD
<radio id="mailaccount" value="mailaccount"
label="&accountTypeMail.label;" accesskey="&accountTypeMail.accesskey;"
selected="true"/>
Expand Down
2 changes: 2 additions & 0 deletions mailnews/base/prefs/content/accountUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ function msgOpenAccountWizard(wizardCallback, type)
selectServer(null, null);
}

#ifndef MOZ_CLASSIC_ACCOUNT_WIZARD
function initAccountWizardTB(args) {
let type = args[0] && args[0].acctType;
let selType = type == "newsgroups" ? "newsaccount" :
Expand All @@ -216,6 +217,7 @@ function initAccountWizardTB(args) {
else
acctyperadio.selectedItem = acctyperadio.getItemAtIndex(0);
}
#endif

function AddFeedAccount() {
window.openDialog("chrome://messenger-newsblog/content/feedAccountWizard.xul",
Expand Down
4 changes: 2 additions & 2 deletions mailnews/jar.mn
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ messenger.jar:
content/messenger/aw-outgoing.js (base/prefs/content/aw-outgoing.js)
content/messenger/aw-accname.js (base/prefs/content/aw-accname.js)
content/messenger/aw-done.js (base/prefs/content/aw-done.js)
content/messenger/accountUtils.js (base/prefs/content/accountUtils.js)
* content/messenger/accountUtils.js (base/prefs/content/accountUtils.js)
content/messenger/amUtils.js (base/prefs/content/amUtils.js)
content/messenger/ispUtils.js (base/prefs/content/ispUtils.js)
content/messenger/SmtpServerEdit.xul (base/prefs/content/SmtpServerEdit.xul)
Expand All @@ -65,7 +65,7 @@ messenger.jar:
* content/messenger/smtpEditOverlay.js (base/prefs/content/smtpEditOverlay.js)
content/messenger/removeAccount.xul (base/prefs/content/removeAccount.xul)
content/messenger/removeAccount.js (base/prefs/content/removeAccount.js)
#if defined(MOZ_THUNDERBIRD) && defined(HYPE_ICEDOVE)
#ifndef MOZ_CLASSIC_ACCOUNT_WIZARD
* content/messenger/accountcreation/accountConfig.js (base/prefs/content/accountcreation/accountConfig.js)
* content/messenger/accountcreation/createInBackend.js (base/prefs/content/accountcreation/createInBackend.js)
* content/messenger/accountcreation/emailWizard.js (base/prefs/content/accountcreation/emailWizard.js)
Expand Down
15 changes: 15 additions & 0 deletions old-configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -2050,6 +2050,7 @@ MOZ_USERINFO=1
NSS_DISABLE_DBM=
MOZ_MAILNEWS=
MOZ_MAILNEWS_OAUTH2=
MOZ_CLASSIC_ACCOUNT_WIZARD=
MOZ_LDAP_XPCOM=
MOZ_MORK=
MOZ_MAPI_SUPPORT=
Expand Down Expand Up @@ -2673,6 +2674,20 @@ fi

AC_SUBST(MOZ_MAILNEWS_OAUTH2)

dnl =========================================================
dnl = Mailnews Classic Account Wizard
dnl =========================================================
MOZ_ARG_ENABLE_BOOL(classic-account-wizard,
[ --enable-classic-account-wizard Enable the classic account wizard in mailnews],
MOZ_CLASSIC_ACCOUNT_WIZARD=1,
MOZ_CLASSIC_ACCOUNT_WIZARD= )

if test -n "$MOZ_CLASSIC_ACCOUNT_WIZARD"; then
AC_DEFINE(MOZ_CLASSIC_ACCOUNT_WIZARD)
fi

AC_SUBST(MOZ_CLASSIC_ACCOUNT_WIZARD)

dnl =========================================================
dnl = LDAP
dnl =========================================================
Expand Down

0 comments on commit e2e50d0

Please sign in to comment.