mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +00:00
remove identity-specific prefs
This commit is contained in:
parent
eb006f3664
commit
67cc9fa367
@ -29,47 +29,15 @@ nsMsgCompPrefs::nsMsgCompPrefs()
|
||||
{
|
||||
nsresult res;
|
||||
|
||||
m_organization = nsnull;
|
||||
m_userFullName = nsnull;
|
||||
m_userEmail = nsnull;
|
||||
m_replyTo = nsnull;
|
||||
m_composeHTML = PR_TRUE;
|
||||
m_wrapColumn = 72;
|
||||
|
||||
// get the current identity from the mail session....
|
||||
NS_WITH_SERVICE(nsIMsgMailSession, mailSession, kCMsgMailSessionCID, &res);
|
||||
if (NS_SUCCEEDED(res) && mailSession)
|
||||
{
|
||||
nsCOMPtr<nsIMsgIdentity> identity;
|
||||
res = mailSession->GetCurrentIdentity(getter_AddRefs(identity));
|
||||
if (NS_SUCCEEDED(res) && identity)
|
||||
{
|
||||
identity->GetOrganization(&m_organization);
|
||||
|
||||
identity->GetFullName(&m_userFullName);
|
||||
|
||||
identity->GetEmail(&m_userEmail);
|
||||
|
||||
identity->GetReplyTo(&m_replyTo);
|
||||
|
||||
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)....");
|
||||
}
|
||||
else
|
||||
NS_ASSERTION(0, "no current identity found for this user (b)....");
|
||||
NS_WITH_SERVICE(nsIPref, prefs, kPrefCID, &res);
|
||||
if (NS_SUCCEEDED(res) && prefs)
|
||||
{
|
||||
res = prefs->GetIntPref("mail.wraplength", &m_wrapColumn);
|
||||
}
|
||||
}
|
||||
|
||||
nsMsgCompPrefs::~nsMsgCompPrefs()
|
||||
{
|
||||
PR_FREEIF(m_organization);
|
||||
PR_FREEIF(m_userFullName);
|
||||
PR_FREEIF(m_userEmail);
|
||||
PR_FREEIF(m_replyTo);
|
||||
}
|
||||
|
@ -27,19 +27,9 @@ public:
|
||||
nsMsgCompPrefs();
|
||||
virtual ~nsMsgCompPrefs();
|
||||
|
||||
const char * GetOrganization() {return m_organization;}
|
||||
const char * GetUserFullName() {return m_userFullName;}
|
||||
const char * GetUserEmail() {return m_userEmail;}
|
||||
const char * GetReplyTo() {return m_replyTo;}
|
||||
const PRBool GetComposeHtml() {return m_composeHTML;}
|
||||
const PRInt32 GetWrapColumn() {return m_wrapColumn;}
|
||||
|
||||
private:
|
||||
char * m_organization;
|
||||
char * m_userFullName;
|
||||
char * m_userEmail;
|
||||
char * m_replyTo;
|
||||
PRBool m_composeHTML;
|
||||
PRInt32 m_wrapColumn;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user