aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog6
-rw-r--r--e-util/e-account.c20
-rw-r--r--e-util/e-account.h7
3 files changed, 16 insertions, 17 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 7313f5a540..90db74dc9e 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,9 @@
+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).
+
2004-03-31 Jeffrey Stedfast <fejj@ximian.com>
* e-signature.[c,h]: New class similar to EAccount but for
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 */ },
diff --git a/e-util/e-account.h b/e-util/e-account.h
index 3b3398945f..07c0ccd5d7 100644
--- a/e-util/e-account.h
+++ b/e-util/e-account.h
@@ -33,8 +33,7 @@ typedef enum _e_account_item_t {
E_ACCOUNT_ID_ADDRESS,
E_ACCOUNT_ID_REPLY_TO,
E_ACCOUNT_ID_ORGANIZATION,
- E_ACCOUNT_ID_DEF_SIGNATURE, /* why aren't these two options the same? */
- E_ACCOUNT_ID_AUTO_SIGNATURE,
+ E_ACCOUNT_ID_SIGNATURE,
E_ACCOUNT_SOURCE_URL,
E_ACCOUNT_SOURCE_KEEP_ON_SERVER,
@@ -78,9 +77,7 @@ typedef struct _EAccountIdentity {
char *address;
char *reply_to;
char *organization;
-
- int def_signature;
- gboolean auto_signature;
+ char *sig_uid;
} EAccountIdentity;
typedef struct _EAccountService {