aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-account.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-10-31 12:55:41 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-10-31 12:55:41 +0800
commit19a21a87e4819013f6499c8ee724475a2184a24e (patch)
tree62b4b62c76e895fb9c7d7feb8060fdd7d5987111 /e-util/e-account.c
parent36eff5914b2ccf251e4c1da4586dd07bdc6bb092 (diff)
downloadgsoc2013-evolution-19a21a87e4819013f6499c8ee724475a2184a24e.tar.gz
gsoc2013-evolution-19a21a87e4819013f6499c8ee724475a2184a24e.tar.zst
gsoc2013-evolution-19a21a87e4819013f6499c8ee724475a2184a24e.zip
add encrypt_key id, and change some of the names around to be more
2003-10-31 Not Zed <NotZed@Ximian.com> * e-account.c (e_account_(sg)et_from_xml): add encrypt_key id, and change some of the names around to be more meaningful. svn path=/trunk/; revision=23144
Diffstat (limited to 'e-util/e-account.c')
-rw-r--r--e-util/e-account.c31
1 files changed, 21 insertions, 10 deletions
diff --git a/e-util/e-account.c b/e-util/e-account.c
index b6e3cdc57f..dbbfccb6e3 100644
--- a/e-util/e-account.c
+++ b/e-util/e-account.c
@@ -98,7 +98,8 @@ finalize (GObject *object)
g_free (account->bcc_addrs);
g_free (account->pgp_key);
- g_free (account->smime_key);
+ g_free (account->smime_sign_key);
+ g_free (account->smime_encrypt_key);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -339,13 +340,16 @@ e_account_set_from_xml (EAccount *account, const char *xml)
}
}
} else if (!strcmp (node->name, "smime")) {
+ changed |= xml_set_bool (node, "sign-default", &account->smime_sign_default);
changed |= xml_set_bool (node, "encrypt-to-self", &account->smime_encrypt_to_self);
- changed |= xml_set_bool (node, "always-sign", &account->smime_always_sign);
+ changed |= xml_set_bool (node, "encrypt-default", &account->smime_encrypt_default);
if (node->children) {
for (cur = node->children; cur; cur = cur->next) {
- if (!strcmp (cur->name, "key-id")) {
- changed |= xml_set_content (cur, &account->smime_key);
+ if (!strcmp (cur->name, "sign-key-id")) {
+ changed |= xml_set_content (cur, &account->smime_sign_key);
+ } else if (!strcmp (cur->name, "encrypt-key-id")) {
+ changed |= xml_set_content (cur, &account->smime_encrypt_key);
break;
}
}
@@ -417,10 +421,14 @@ e_account_import (EAccount *dest, EAccount *src)
dest->pgp_no_imip_sign = src->pgp_no_imip_sign;
dest->pgp_always_trust = src->pgp_always_trust;
- g_free (dest->smime_key);
- dest->smime_key = g_strdup (src->smime_key);
+ dest->smime_sign_default = src->smime_sign_default;
+ g_free (dest->smime_sign_key);
+ dest->smime_sign_key = g_strdup (src->smime_sign_key);
+
+ dest->smime_encrypt_default = src->smime_encrypt_default;
dest->smime_encrypt_to_self = src->smime_encrypt_to_self;
- dest->smime_always_sign = src->smime_always_sign;
+ g_free (dest->smime_encrypt_key);
+ dest->smime_encrypt_key = g_strdup (src->smime_encrypt_key);
}
@@ -500,10 +508,13 @@ e_account_to_xml (EAccount *account)
xmlNewTextChild (node, NULL, "key-id", account->pgp_key);
node = xmlNewChild (root, NULL, "smime", NULL);
+ xmlSetProp (node, "sign-default", account->smime_sign_default ? "true" : "false");
+ xmlSetProp (node, "encrypt-default", account->smime_encrypt_default ? "true" : "false");
xmlSetProp (node, "encrypt-to-self", account->smime_encrypt_to_self ? "true" : "false");
- xmlSetProp (node, "always-sign", account->smime_always_sign ? "true" : "false");
- if (account->smime_key)
- xmlNewTextChild (node, NULL, "key-id", account->smime_key);
+ if (account->smime_sign_key)
+ xmlNewTextChild (node, NULL, "sign-key-id", account->smime_sign_key);
+ if (account->smime_encrypt_key)
+ xmlNewTextChild (node, NULL, "encrypt-key-id", account->smime_encrypt_key);
xmlDocDumpMemory (doc, &xmlbuf, &n);
xmlFreeDoc (doc);