зеркало из https://github.com/mozilla/pjs.git
make the signature an nsIFileSpec for right now
This commit is contained in:
Родитель
a22dacff6a
Коммит
4f6483c895
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
#include "nsISupports.idl"
|
#include "nsISupports.idl"
|
||||||
#include "nsIMsgSignature.idl"
|
#include "nsIMsgSignature.idl"
|
||||||
|
#include "nsIFileSpec.idl"
|
||||||
#include "nsIMsgVCard.idl"
|
#include "nsIMsgVCard.idl"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -63,7 +64,9 @@ interface nsIMsgIdentity : nsISupports {
|
||||||
attribute boolean attachVCard;
|
attribute boolean attachVCard;
|
||||||
|
|
||||||
/* the current signature */
|
/* the current signature */
|
||||||
attribute nsIMsgSignature signature;
|
attribute nsIFileSpec signature;
|
||||||
|
/* after PR1, let's make this a real object */
|
||||||
|
/* attribute nsIMsgSignature signature; */
|
||||||
|
|
||||||
/* the current vcard */
|
/* the current vcard */
|
||||||
attribute nsIMsgVCard vCard;
|
attribute nsIMsgVCard vCard;
|
||||||
|
|
|
@ -319,7 +319,38 @@ nsMsgIdentity::ToString(PRUnichar **aResult)
|
||||||
/* Identity attribute accessors */
|
/* Identity attribute accessors */
|
||||||
|
|
||||||
// XXX - these are a COM objects, use NS_ADDREF
|
// XXX - these are a COM objects, use NS_ADDREF
|
||||||
NS_IMPL_GETSET(nsMsgIdentity, Signature, nsIMsgSignature*, m_signature);
|
//NS_IMPL_GETSET(nsMsgIdentity, Signature, nsIMsgSignature*, m_signature);
|
||||||
|
NS_IMETHODIMP
|
||||||
|
nsMsgIdentity::GetSignature(nsIFileSpec **sig) {
|
||||||
|
nsresult rv = getPrefService();
|
||||||
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
|
char *prefName = getPrefName(m_identityKey, "sig_file");
|
||||||
|
return m_prefs->GetFilePref(prefName, sig);
|
||||||
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
nsMsgIdentity::SetSignature(nsIFileSpec *sig)
|
||||||
|
{
|
||||||
|
|
||||||
|
nsresult rv = getPrefService();
|
||||||
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
|
rv = NS_OK;
|
||||||
|
char *prefName = getPrefName(m_identityKey, "sig_file");
|
||||||
|
if (sig)
|
||||||
|
rv = m_prefs->SetFilePref(NS_CONST_CAST(const char*,prefName), sig,
|
||||||
|
PR_FALSE);
|
||||||
|
/*
|
||||||
|
else
|
||||||
|
m_prefs->ClearFilePref(prefName);
|
||||||
|
*/
|
||||||
|
PR_Free(prefName);
|
||||||
|
return rv;
|
||||||
|
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
NS_IMPL_GETSET(nsMsgIdentity, VCard, nsIMsgVCard*, m_vCard);
|
NS_IMPL_GETSET(nsMsgIdentity, VCard, nsIMsgVCard*, m_vCard);
|
||||||
|
|
||||||
NS_IMPL_GETTER_STR(nsMsgIdentity::GetKey, m_identityKey);
|
NS_IMPL_GETTER_STR(nsMsgIdentity::GetKey, m_identityKey);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче