Lines 158-165
finalize (GObject *object)
Link Here
|
158 |
g_free (account->bcc_addrs); |
158 |
g_free (account->bcc_addrs); |
159 |
|
159 |
|
160 |
g_free (account->pgp_key); |
160 |
g_free (account->pgp_key); |
|
|
161 |
g_free (account->pgp_hash_algorithm); |
161 |
g_free (account->smime_sign_key); |
162 |
g_free (account->smime_sign_key); |
162 |
g_free (account->smime_encrypt_key); |
163 |
g_free (account->smime_encrypt_key); |
|
|
164 |
g_free (account->smime_hash_algorithm); |
163 |
|
165 |
|
164 |
g_free (account->parent_uid); |
166 |
g_free (account->parent_uid); |
165 |
|
167 |
|
Lines 464-469
e_account_set_from_xml (EAccount *account, const gchar *xml)
Link Here
|
464 |
changed |= xml_set_bool (node, "always-trust", &account->pgp_always_trust); |
466 |
changed |= xml_set_bool (node, "always-trust", &account->pgp_always_trust); |
465 |
changed |= xml_set_bool (node, "always-sign", &account->pgp_always_sign); |
467 |
changed |= xml_set_bool (node, "always-sign", &account->pgp_always_sign); |
466 |
changed |= xml_set_bool (node, "no-imip-sign", &account->pgp_no_imip_sign); |
468 |
changed |= xml_set_bool (node, "no-imip-sign", &account->pgp_no_imip_sign); |
|
|
469 |
changed |= xml_set_prop (node, "hash-algo", &account->pgp_hash_algorithm); |
467 |
|
470 |
|
468 |
if (node->children) { |
471 |
if (node->children) { |
469 |
for (cur = node->children; cur; cur = cur->next) { |
472 |
for (cur = node->children; cur; cur = cur->next) { |
Lines 477-482
e_account_set_from_xml (EAccount *account, const gchar *xml)
Link Here
|
477 |
changed |= xml_set_bool (node, "sign-default", &account->smime_sign_default); |
480 |
changed |= xml_set_bool (node, "sign-default", &account->smime_sign_default); |
478 |
changed |= xml_set_bool (node, "encrypt-to-self", &account->smime_encrypt_to_self); |
481 |
changed |= xml_set_bool (node, "encrypt-to-self", &account->smime_encrypt_to_self); |
479 |
changed |= xml_set_bool (node, "encrypt-default", &account->smime_encrypt_default); |
482 |
changed |= xml_set_bool (node, "encrypt-default", &account->smime_encrypt_default); |
|
|
483 |
changed |= xml_set_prop (node, "hash-algo", &account->smime_hash_algorithm); |
480 |
|
484 |
|
481 |
if (node->children) { |
485 |
if (node->children) { |
482 |
for (cur = node->children; cur; cur = cur->next) { |
486 |
for (cur = node->children; cur; cur = cur->next) { |
Lines 561-566
e_account_import (EAccount *dest, EAccount *src)
Link Here
|
561 |
|
565 |
|
562 |
g_free (dest->pgp_key); |
566 |
g_free (dest->pgp_key); |
563 |
dest->pgp_key = g_strdup (src->pgp_key); |
567 |
dest->pgp_key = g_strdup (src->pgp_key); |
|
|
568 |
g_free (dest->pgp_hash_algorithm); |
569 |
dest->pgp_hash_algorithm = g_strdup (src->pgp_hash_algorithm); |
564 |
dest->pgp_encrypt_to_self = src->pgp_encrypt_to_self; |
570 |
dest->pgp_encrypt_to_self = src->pgp_encrypt_to_self; |
565 |
dest->pgp_always_sign = src->pgp_always_sign; |
571 |
dest->pgp_always_sign = src->pgp_always_sign; |
566 |
dest->pgp_no_imip_sign = src->pgp_no_imip_sign; |
572 |
dest->pgp_no_imip_sign = src->pgp_no_imip_sign; |
Lines 569-574
e_account_import (EAccount *dest, EAccount *src)
Link Here
|
569 |
dest->smime_sign_default = src->smime_sign_default; |
575 |
dest->smime_sign_default = src->smime_sign_default; |
570 |
g_free (dest->smime_sign_key); |
576 |
g_free (dest->smime_sign_key); |
571 |
dest->smime_sign_key = g_strdup (src->smime_sign_key); |
577 |
dest->smime_sign_key = g_strdup (src->smime_sign_key); |
|
|
578 |
g_free (dest->smime_hash_algorithm); |
579 |
dest->smime_hash_algorithm = g_strdup (src->smime_hash_algorithm); |
572 |
|
580 |
|
573 |
dest->smime_encrypt_default = src->smime_encrypt_default; |
581 |
dest->smime_encrypt_default = src->smime_encrypt_default; |
574 |
dest->smime_encrypt_to_self = src->smime_encrypt_to_self; |
582 |
dest->smime_encrypt_to_self = src->smime_encrypt_to_self; |
Lines 651-656
e_account_to_xml (EAccount *account)
Link Here
|
651 |
xmlSetProp (node, (xmlChar*)"always-trust", (xmlChar*)(account->pgp_always_trust ? "true" : "false")); |
659 |
xmlSetProp (node, (xmlChar*)"always-trust", (xmlChar*)(account->pgp_always_trust ? "true" : "false")); |
652 |
xmlSetProp (node, (xmlChar*)"always-sign", (xmlChar*)(account->pgp_always_sign ? "true" : "false")); |
660 |
xmlSetProp (node, (xmlChar*)"always-sign", (xmlChar*)(account->pgp_always_sign ? "true" : "false")); |
653 |
xmlSetProp (node, (xmlChar*)"no-imip-sign", (xmlChar*)(account->pgp_no_imip_sign ? "true" : "false")); |
661 |
xmlSetProp (node, (xmlChar*)"no-imip-sign", (xmlChar*)(account->pgp_no_imip_sign ? "true" : "false")); |
|
|
662 |
if (account->pgp_hash_algorithm && *account->pgp_hash_algorithm) |
663 |
xmlSetProp (node, (xmlChar*)"hash-algo", (xmlChar*) account->pgp_hash_algorithm); |
654 |
if (account->pgp_key) |
664 |
if (account->pgp_key) |
655 |
xmlNewTextChild (node, NULL, (xmlChar*)"key-id", (xmlChar*)account->pgp_key); |
665 |
xmlNewTextChild (node, NULL, (xmlChar*)"key-id", (xmlChar*)account->pgp_key); |
656 |
|
666 |
|
Lines 658-663
e_account_to_xml (EAccount *account)
Link Here
|
658 |
xmlSetProp (node, (xmlChar*)"sign-default", (xmlChar*)(account->smime_sign_default ? "true" : "false")); |
668 |
xmlSetProp (node, (xmlChar*)"sign-default", (xmlChar*)(account->smime_sign_default ? "true" : "false")); |
659 |
xmlSetProp (node, (xmlChar*)"encrypt-default", (xmlChar*)(account->smime_encrypt_default ? "true" : "false")); |
669 |
xmlSetProp (node, (xmlChar*)"encrypt-default", (xmlChar*)(account->smime_encrypt_default ? "true" : "false")); |
660 |
xmlSetProp (node, (xmlChar*)"encrypt-to-self", (xmlChar*)(account->smime_encrypt_to_self ? "true" : "false")); |
670 |
xmlSetProp (node, (xmlChar*)"encrypt-to-self", (xmlChar*)(account->smime_encrypt_to_self ? "true" : "false")); |
|
|
671 |
if (account->smime_hash_algorithm && *account->smime_hash_algorithm) |
672 |
xmlSetProp (node, (xmlChar*)"hash-algo", (xmlChar*) account->smime_hash_algorithm); |
661 |
if (account->smime_sign_key) |
673 |
if (account->smime_sign_key) |
662 |
xmlNewTextChild (node, NULL, (xmlChar*)"sign-key-id", (xmlChar*)account->smime_sign_key); |
674 |
xmlNewTextChild (node, NULL, (xmlChar*)"sign-key-id", (xmlChar*)account->smime_sign_key); |
663 |
if (account->smime_encrypt_key) |
675 |
if (account->smime_encrypt_key) |
Lines 784-789
static struct _account_info {
Link Here
|
784 |
{ /* E_ACCOUNT_RECEIPT_POLICY */ 0, TYPE_INT, G_STRUCT_OFFSET(EAccount, receipt_policy) }, |
796 |
{ /* E_ACCOUNT_RECEIPT_POLICY */ 0, TYPE_INT, G_STRUCT_OFFSET(EAccount, receipt_policy) }, |
785 |
|
797 |
|
786 |
{ /* E_ACCOUNT_PGP_KEY */ 0, TYPE_STRING, G_STRUCT_OFFSET(EAccount, pgp_key) }, |
798 |
{ /* E_ACCOUNT_PGP_KEY */ 0, TYPE_STRING, G_STRUCT_OFFSET(EAccount, pgp_key) }, |
|
|
799 |
{ /* E_ACCOUNT_PGP_HASH_ALGORITHM */ 0, TYPE_STRING, G_STRUCT_OFFSET(EAccount, pgp_hash_algorithm) }, |
787 |
{ /* E_ACCOUNT_PGP_ENCRYPT_TO_SELF */ 0, TYPE_BOOL, G_STRUCT_OFFSET(EAccount, pgp_encrypt_to_self) }, |
800 |
{ /* E_ACCOUNT_PGP_ENCRYPT_TO_SELF */ 0, TYPE_BOOL, G_STRUCT_OFFSET(EAccount, pgp_encrypt_to_self) }, |
788 |
{ /* E_ACCOUNT_PGP_ALWAYS_SIGN */ 0, TYPE_BOOL, G_STRUCT_OFFSET(EAccount, pgp_always_sign) }, |
801 |
{ /* E_ACCOUNT_PGP_ALWAYS_SIGN */ 0, TYPE_BOOL, G_STRUCT_OFFSET(EAccount, pgp_always_sign) }, |
789 |
{ /* E_ACCOUNT_PGP_NO_IMIP_SIGN */ 0, TYPE_BOOL, G_STRUCT_OFFSET(EAccount, pgp_no_imip_sign) }, |
802 |
{ /* E_ACCOUNT_PGP_NO_IMIP_SIGN */ 0, TYPE_BOOL, G_STRUCT_OFFSET(EAccount, pgp_no_imip_sign) }, |
Lines 791-796
static struct _account_info {
Link Here
|
791 |
|
804 |
|
792 |
{ /* E_ACCOUNT_SMIME_SIGN_KEY */ 0, TYPE_STRING, G_STRUCT_OFFSET(EAccount, smime_sign_key) }, |
805 |
{ /* E_ACCOUNT_SMIME_SIGN_KEY */ 0, TYPE_STRING, G_STRUCT_OFFSET(EAccount, smime_sign_key) }, |
793 |
{ /* E_ACCOUNT_SMIME_ENCRYPT_KEY */ 0, TYPE_STRING, G_STRUCT_OFFSET(EAccount, smime_encrypt_key) }, |
806 |
{ /* E_ACCOUNT_SMIME_ENCRYPT_KEY */ 0, TYPE_STRING, G_STRUCT_OFFSET(EAccount, smime_encrypt_key) }, |
|
|
807 |
{ /* E_ACCOUNT_SMIME_HASH_ALGORITHM */ 0, TYPE_STRING, G_STRUCT_OFFSET(EAccount, smime_hash_algorithm) }, |
794 |
{ /* E_ACCOUNT_SMIME_SIGN_DEFAULT */ 0, TYPE_BOOL, G_STRUCT_OFFSET(EAccount, smime_sign_default) }, |
808 |
{ /* E_ACCOUNT_SMIME_SIGN_DEFAULT */ 0, TYPE_BOOL, G_STRUCT_OFFSET(EAccount, smime_sign_default) }, |
795 |
{ /* E_ACCOUNT_SMIME_ENCRYPT_TO_SELF */ 0, TYPE_BOOL, G_STRUCT_OFFSET(EAccount, smime_encrypt_to_self) }, |
809 |
{ /* E_ACCOUNT_SMIME_ENCRYPT_TO_SELF */ 0, TYPE_BOOL, G_STRUCT_OFFSET(EAccount, smime_encrypt_to_self) }, |
796 |
{ /* E_ACCOUNT_SMIME_ENCRYPT_DEFAULT */ 0, TYPE_BOOL, G_STRUCT_OFFSET(EAccount, smime_encrypt_default) }, |
810 |
{ /* E_ACCOUNT_SMIME_ENCRYPT_DEFAULT */ 0, TYPE_BOOL, G_STRUCT_OFFSET(EAccount, smime_encrypt_default) }, |