aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-account.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-04-10 03:47:06 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-04-10 03:47:06 +0800
commit154d0ce43fbf4ef89a7068ccde99db8cef933c69 (patch)
tree271e0bebfbb08feb77596b2d477d709f588fb2a7 /e-util/e-account.c
parent2658330b37900a4d90775b2d61cf88983f8343a6 (diff)
downloadgsoc2013-evolution-154d0ce43fbf4ef89a7068ccde99db8cef933c69.tar.gz
gsoc2013-evolution-154d0ce43fbf4ef89a7068ccde99db8cef933c69.tar.zst
gsoc2013-evolution-154d0ce43fbf4ef89a7068ccde99db8cef933c69.zip
If we fail to set a sig_uid then try to extract the old style signature id
2004-04-09 Jeffrey Stedfast <fejj@ximian.com> * e-account.c (xml_set_identity): If we fail to set a sig_uid then try to extract the old style signature id and assume the migration code will fix us up (if not, nothing bad will happen anyway). svn path=/trunk/; revision=25403
Diffstat (limited to 'e-util/e-account.c')
-rw-r--r--e-util/e-account.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/e-util/e-account.c b/e-util/e-account.c
index c899170e58..37132017f0 100644
--- a/e-util/e-account.c
+++ b/e-util/e-account.c
@@ -282,6 +282,22 @@ xml_set_identity (xmlNodePtr node, EAccountIdentity *id)
changed |= xml_set_content (node, &id->organization);
else if (!strcmp (node->name, "signature")) {
changed |= xml_set_prop (node, "uid", &id->sig_uid);
+ if (!id->sig_uid) {
+ /* set a fake sig uid so the migrate code can handle this */
+ gboolean autogen = FALSE;
+ int sig_id = 0;
+
+ xml_set_bool (node, "auto", &autogen);
+ xml_set_int (node, "default", &sig_id);
+
+ if (autogen) {
+ id->sig_uid = g_strdup ("::0");
+ changed = TRUE;
+ } else if (sig_id) {
+ id->sig_uid = g_strdup_printf ("::%d", sig_id + 1);
+ changed = TRUE;
+ }
+ }
}
}