mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
replace pref "mail.identity.<idn>.send_html" by "mail.identity.id1.compose_html".
This commit is contained in:
parent
300ee85ec5
commit
8d7f41b9f3
@ -30,12 +30,11 @@ interface nsIMsgIdentity : nsISupports {
|
||||
attribute string email;
|
||||
attribute string replyTo;
|
||||
attribute string organization;
|
||||
attribute boolean useHtml;
|
||||
attribute boolean composeHtml;
|
||||
attribute boolean attachSignature;
|
||||
attribute boolean attachVCard;
|
||||
attribute nsIMsgSignature signature;
|
||||
attribute nsIMsgVCard vCard;
|
||||
attribute string smtpHostname;
|
||||
attribute string smtpUsername;
|
||||
attribute long wrapColumn;
|
||||
};
|
||||
|
@ -787,9 +787,9 @@ nsMsgAccountManager::upgradePrefs()
|
||||
PR_Free(oldstr);
|
||||
}
|
||||
|
||||
rv = m_prefs->GetBoolPref("mail.send_html", &oldbool);
|
||||
rv = m_prefs->GetBoolPref("mail.compose_html", &oldbool);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
identity->SetUseHtml(oldbool);
|
||||
identity->SetComposeHtml(oldbool);
|
||||
}
|
||||
|
||||
rv = m_prefs->CopyCharPref("mail.smtp_server", &oldstr);
|
||||
@ -803,12 +803,7 @@ nsMsgAccountManager::upgradePrefs()
|
||||
identity->SetSmtpUsername(oldstr);
|
||||
PR_Free(oldstr);
|
||||
}
|
||||
|
||||
rv = m_prefs->GetIntPref("mail.wrap_column", &oldint);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
identity->SetWrapColumn(oldint);
|
||||
}
|
||||
|
||||
|
||||
// generic server stuff
|
||||
|
||||
// pop stuff
|
||||
|
@ -147,9 +147,8 @@ NS_IMPL_IDPREF_STR(FullName, "fullName");
|
||||
NS_IMPL_IDPREF_STR(Email, "useremail");
|
||||
NS_IMPL_IDPREF_STR(ReplyTo, "reply_to");
|
||||
NS_IMPL_IDPREF_STR(Organization, "organization");
|
||||
NS_IMPL_IDPREF_BOOL(UseHtml, "send_html");
|
||||
NS_IMPL_IDPREF_BOOL(ComposeHtml, "compose_html");
|
||||
NS_IMPL_IDPREF_STR(SmtpHostname, "smtp_server");
|
||||
NS_IMPL_IDPREF_STR(SmtpUsername, "smtp_name");
|
||||
NS_IMPL_IDPREF_BOOL(AttachVCard, "attach_vcard");
|
||||
NS_IMPL_IDPREF_BOOL(AttachSignature, "attach_signature");
|
||||
NS_IMPL_IDPREF_INT(WrapColumn, "wrap_column");
|
||||
|
@ -64,8 +64,8 @@ public:
|
||||
NS_IMETHOD SetOrganization(char * aOrganization);
|
||||
|
||||
/* attribute boolean useHtml; */
|
||||
NS_IMETHOD GetUseHtml(PRBool *aUseHtml);
|
||||
NS_IMETHOD SetUseHtml(PRBool aUseHtml);
|
||||
NS_IMETHOD GetComposeHtml(PRBool *aComposeHtml);
|
||||
NS_IMETHOD SetComposeHtml(PRBool aComposeHtml);
|
||||
|
||||
/* attribute boolean attachSignature */
|
||||
NS_IMETHOD GetAttachSignature(PRBool *aAttachSignature);
|
||||
@ -90,10 +90,6 @@ public:
|
||||
/* attribute string smtpUsername; */
|
||||
NS_IMETHOD GetSmtpUsername(char * *aSmtpUsername);
|
||||
NS_IMETHOD SetSmtpUsername(char * aSmtpUsername);
|
||||
|
||||
/* attribute long WrapColumn; */
|
||||
NS_IMETHOD GetWrapColumn(PRInt32 *aWrapColumn);
|
||||
NS_IMETHOD SetWrapColumn(PRInt32 aWrapColumn);
|
||||
|
||||
private:
|
||||
nsIMsgSignature* m_signature;
|
||||
|
@ -20,8 +20,10 @@
|
||||
#include "nsIMsgIdentity.h"
|
||||
#include "nsMsgCompPrefs.h"
|
||||
#include "nsMsgBaseCID.h"
|
||||
#include "nsIPref.h"
|
||||
|
||||
static NS_DEFINE_CID(kCMsgMailSessionCID, NS_MSGMAILSESSION_CID);
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
|
||||
nsMsgCompPrefs::nsMsgCompPrefs()
|
||||
{
|
||||
@ -31,7 +33,7 @@ nsMsgCompPrefs::nsMsgCompPrefs()
|
||||
m_userFullName = nsnull;
|
||||
m_userEmail = nsnull;
|
||||
m_replyTo = nsnull;
|
||||
m_useHTML = PR_TRUE;
|
||||
m_composeHTML = PR_TRUE;
|
||||
m_wrapColumn = 72;
|
||||
|
||||
// get the current identity from the mail session....
|
||||
@ -50,8 +52,12 @@ nsMsgCompPrefs::nsMsgCompPrefs()
|
||||
|
||||
identity->GetReplyTo(&m_replyTo);
|
||||
|
||||
identity->GetUseHtml(&m_useHTML);
|
||||
identity->GetWrapColumn(&m_wrapColumn);
|
||||
identity->GetComposeHtml(&m_composeHTML);
|
||||
NS_WITH_SERVICE(nsIPref, prefs, kPrefCID, &res);
|
||||
if (NS_SUCCEEDED(res) && prefs)
|
||||
{
|
||||
res = prefs->GetIntPref("mail.wraplength", &m_wrapColumn);
|
||||
}
|
||||
}
|
||||
else
|
||||
NS_ASSERTION(0, "no current identity found for this user (a)....");
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
const char * GetUserFullName() {return m_userFullName;}
|
||||
const char * GetUserEmail() {return m_userEmail;}
|
||||
const char * GetReplyTo() {return m_replyTo;}
|
||||
const PRBool GetUseHtml() {return m_useHTML;}
|
||||
const PRBool GetComposeHtml() {return m_composeHTML;}
|
||||
const PRInt32 GetWrapColumn() {return m_wrapColumn;}
|
||||
|
||||
private:
|
||||
@ -39,7 +39,7 @@ private:
|
||||
char * m_userFullName;
|
||||
char * m_userEmail;
|
||||
char * m_replyTo;
|
||||
PRBool m_useHTML;
|
||||
PRBool m_composeHTML;
|
||||
PRInt32 m_wrapColumn;
|
||||
};
|
||||
|
||||
|
@ -66,7 +66,7 @@ nsMsgCompose::nsMsgCompose()
|
||||
PR_Free(default_mail_charset);
|
||||
}
|
||||
|
||||
m_composeHTML = prefs.GetUseHtml();
|
||||
m_composeHTML = prefs.GetComposeHtml();
|
||||
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
@ -116,7 +116,7 @@ nsresult nsMsgCompose::Initialize(nsIDOMWindow *aWindow, const PRUnichar *origin
|
||||
{
|
||||
case MSGCOMP_FORMAT_HTML : m_composeHTML = PR_TRUE; break;
|
||||
case MSGCOMP_FORMAT_PlainText : m_composeHTML = PR_FALSE; break;
|
||||
default : m_composeHTML = prefs.GetUseHtml(); break;
|
||||
default : m_composeHTML = prefs.GetComposeHtml(); break;
|
||||
|
||||
}
|
||||
|
||||
@ -192,20 +192,20 @@ nsresult nsMsgCompose::LoadFields()
|
||||
{
|
||||
nsString id;
|
||||
inputElement->GetId(id);
|
||||
char *elementValue;
|
||||
m_compFields->GetTo(&elementValue);
|
||||
char *elementValue;
|
||||
m_compFields->GetTo(&elementValue);
|
||||
if (id == "msgTo") inputElement->SetValue(elementValue);
|
||||
|
||||
m_compFields->GetCc(&elementValue);
|
||||
m_compFields->GetCc(&elementValue);
|
||||
if (id == "msgCc") inputElement->SetValue(elementValue);
|
||||
|
||||
m_compFields->GetBcc(&elementValue);
|
||||
m_compFields->GetBcc(&elementValue);
|
||||
if (id == "msgBcc") inputElement->SetValue(elementValue);
|
||||
|
||||
m_compFields->GetNewsgroups(&elementValue);
|
||||
if (id == "msgNewsgroup") inputElement->SetValue(elementValue);
|
||||
m_compFields->GetNewsgroups(&elementValue);
|
||||
if (id == "msgNewsgroup") inputElement->SetValue(elementValue);
|
||||
|
||||
m_compFields->GetSubject(&elementValue);
|
||||
m_compFields->GetSubject(&elementValue);
|
||||
if (id == "msgSubject") inputElement->SetValue(elementValue);
|
||||
}
|
||||
|
||||
|
@ -318,8 +318,7 @@ nsresult nsPref::useDefaultPrefFile()
|
||||
SetCharPref("mail.identity.id1.smtp_name", currProfileName);
|
||||
SetCharPref("mail.identity.id1.smtp_server", "nsmail-2");
|
||||
SetCharPref("mail.identity.id1.useremail", emailStr);
|
||||
SetBoolPref("mail.identity.id1.send_html", PR_TRUE);
|
||||
SetIntPref("mail.identity.id1.wrap_column", 72);
|
||||
SetBoolPref("mail.identity.id1.compose_html", PR_TRUE);
|
||||
SetCharPref("mail.server.server0.directory", imapDirStr);
|
||||
SetCharPref("mail.server.server0.hostname", "nsmail-2");
|
||||
SetCharPref("mail.server.server0.password", "clear text password");
|
||||
@ -328,6 +327,7 @@ nsresult nsPref::useDefaultPrefFile()
|
||||
SetCharPref("mail.server.server1.directory", newsDirStr);
|
||||
SetCharPref("mail.server.server1.hostname", "news.mozilla.org");
|
||||
SetCharPref("mail.server.server1.type", "nntp");
|
||||
SetIntPref("mail.wraplength", 72);
|
||||
SetIntPref("news.max_articles",50);
|
||||
SetBoolPref("news.mark_old_read",PR_FALSE);
|
||||
PR_FREEIF(imapDirStr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user