aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-account.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-04-02 03:48:43 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-04-02 03:48:43 +0800
commit6659317c32c0bb03c5559cecd17990c3f1a6721a (patch)
tree90d889a094545ff93b7eb9833c435fddab61a74e /e-util/e-account.c
parent433683fae007ac7effc4418991cbadaf022d205a (diff)
downloadgsoc2013-evolution-6659317c32c0bb03c5559cecd17990c3f1a6721a.tar
gsoc2013-evolution-6659317c32c0bb03c5559cecd17990c3f1a6721a.tar.gz
gsoc2013-evolution-6659317c32c0bb03c5559cecd17990c3f1a6721a.tar.bz2
gsoc2013-evolution-6659317c32c0bb03c5559cecd17990c3f1a6721a.tar.lz
gsoc2013-evolution-6659317c32c0bb03c5559cecd17990c3f1a6721a.tar.xz
gsoc2013-evolution-6659317c32c0bb03c5559cecd17990c3f1a6721a.tar.zst
gsoc2013-evolution-6659317c32c0bb03c5559cecd17990c3f1a6721a.zip
Reference signatures by their UID rather than by an integer id. Also
2004-04-01 Jeffrey Stedfast <fejj@ximian.com> * e-account.c: Reference signatures by their UID rather than by an integer id. Also removed the need to have 2 signature settings (no need for the "auto" signature boolean anymore). svn path=/trunk/; revision=25283
Diffstat (limited to 'e-util/e-account.c')
-rw-r--r--e-util/e-account.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/e-util/e-account.c b/e-util/e-account.c
index da16677913..c899170e58 100644
--- a/e-util/e-account.c
+++ b/e-util/e-account.c
@@ -101,7 +101,8 @@ identity_destroy (EAccountIdentity *id)
g_free (id->address);
g_free (id->reply_to);
g_free (id->organization);
-
+ g_free (id->sig_uid);
+
g_free (id);
}
@@ -280,8 +281,7 @@ xml_set_identity (xmlNodePtr node, EAccountIdentity *id)
else if (!strcmp (node->name, "organization"))
changed |= xml_set_content (node, &id->organization);
else if (!strcmp (node->name, "signature")) {
- changed |= xml_set_bool (node, "auto", &id->auto_signature);
- changed |= xml_set_int (node, "default", &id->def_signature);
+ changed |= xml_set_prop (node, "uid", &id->sig_uid);
}
}
@@ -423,8 +423,7 @@ e_account_import (EAccount *dest, EAccount *src)
dest->id->reply_to = g_strdup (src->id->reply_to);
g_free (dest->id->organization);
dest->id->organization = g_strdup (src->id->organization);
- dest->id->def_signature = src->id->def_signature;
- dest->id->auto_signature = src->id->auto_signature;
+ dest->id->sig_uid = g_strdup (src->id->sig_uid);
g_free (dest->source->url);
dest->source->url = g_strdup (src->source->url);
@@ -503,12 +502,10 @@ e_account_to_xml (EAccount *account)
xmlNewTextChild (id, NULL, "reply-to", account->id->reply_to);
if (account->id->organization)
xmlNewTextChild (id, NULL, "organization", account->id->organization);
-
+
node = xmlNewChild (id, NULL, "signature",NULL);
- xmlSetProp (node, "auto", account->id->auto_signature ? "true" : "false");
- sprintf (buf, "%d", account->id->def_signature);
- xmlSetProp (node, "default", buf);
-
+ xmlSetProp (node, "uid", account->id->sig_uid);
+
src = xmlNewChild (root, NULL, "source", NULL);
xmlSetProp (src, "save-passwd", account->source->save_passwd ? "true" : "false");
xmlSetProp (src, "keep-on-server", account->source->keep_on_server ? "true" : "false");
@@ -635,8 +632,7 @@ static struct {
{ /* E_ACCOUNT_ID_ADDRESS, */ },
{ /* E_ACCOUNT_ID_REPLY_TO, */ },
{ /* E_ACCOUNT_ID_ORGANIZATION */ },
- { /* E_ACCOUNT_ID_DEF_SIGNATURE */ 1<<EAP_LOCK_SIGNATURE },
- { /* E_ACCOUNT_ID_AUTO_SIGNATURE */ 1<<EAP_LOCK_SIGNATURE },
+ { /* E_ACCOUNT_ID_SIGNATURE */ 1<<EAP_LOCK_SIGNATURE },
{ /* E_ACCOUNT_SOURCE_URL */ 1<<EAP_LOCK_SOURCE },
{ /* E_ACCOUNT_SOURCE_KEEP_ON_SERVER */ },