aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-04-06 02:31:48 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-04-06 02:31:48 +0800
commitb2df23571d14a18b21e472468fd4b54417f1c86b (patch)
tree98b2a026e9ab0872b3fc4411bc718157e2d08f17
parentcc696a0364eb5b1a4c3574960b0867e09e147edc (diff)
downloadgsoc2013-evolution-b2df23571d14a18b21e472468fd4b54417f1c86b.tar.gz
gsoc2013-evolution-b2df23571d14a18b21e472468fd4b54417f1c86b.tar.zst
gsoc2013-evolution-b2df23571d14a18b21e472468fd4b54417f1c86b.zip
Fixed to not ignore signatures without uids (e.g. signatures that were
2004-04-05 Jeffrey Stedfast <fejj@ximian.com> * e-signature-list.c (gconf_signatures_changed): Fixed to not ignore signatures without uids (e.g. signatures that were from prior versions). svn path=/trunk/; revision=25319
-rw-r--r--e-util/ChangeLog6
-rw-r--r--e-util/e-signature-list.c37
2 files changed, 25 insertions, 18 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index b23b1b1cb3..e8e0a8fcc4 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,9 @@
+2004-04-05 Jeffrey Stedfast <fejj@ximian.com>
+
+ * e-signature-list.c (gconf_signatures_changed): Fixed to not
+ ignore signatures without uids (e.g. signatures that were from
+ prior versions).
+
2004-04-02 Jeffrey Stedfast <fejj@ximian.com>
* e-signature.c (e_signature_to_xml): Always set a format prop so
diff --git a/e-util/e-signature-list.c b/e-util/e-signature-list.c
index 315ea8f042..ea3d6e7bb7 100644
--- a/e-util/e-signature-list.c
+++ b/e-util/e-signature-list.c
@@ -164,32 +164,33 @@ gconf_signatures_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry,
list = gconf_client_get_list (client, "/apps/evolution/mail/signatures", GCONF_VALUE_STRING, NULL);
for (l = list; l; l = l->next) {
- uid = e_signature_uid_from_xml (l->data);
- if (!uid)
- continue;
-
- /* See if this is an existing signature */
- for (iter = e_list_get_iterator (old_sigs); e_iterator_is_valid (iter); e_iterator_next (iter)) {
- signature = (ESignature *) e_iterator_get (iter);
- if (!strcmp (signature->uid, uid)) {
- /* The signature still exists, so remove
- * it from "old_sigs" and update it.
- */
- e_iterator_delete (iter);
- if (e_signature_set_from_xml (signature, l->data))
- g_signal_emit (signature_list, signals[SIGNATURE_CHANGED], 0, signature);
- goto next;
+ if ((uid = e_signature_uid_from_xml (l->data))) {
+ /* See if this is an existing signature */
+ for (iter = e_list_get_iterator (old_sigs); e_iterator_is_valid (iter); e_iterator_next (iter)) {
+ signature = (ESignature *) e_iterator_get (iter);
+ if (!strcmp (signature->uid, uid)) {
+ /* The signature still exists, so remove
+ * it from "old_sigs" and update it.
+ */
+ e_iterator_delete (iter);
+ if (e_signature_set_from_xml (signature, l->data))
+ g_signal_emit (signature_list, signals[SIGNATURE_CHANGED], 0, signature);
+
+ g_object_unref (iter);
+ g_free (uid);
+
+ continue;
+ }
}
+
+ g_object_unref (iter);
}
/* Must be a new signature */
signature = e_signature_new_from_xml (l->data);
e_list_append (E_LIST (signature_list), signature);
new_sigs = g_slist_prepend (new_sigs, signature);
-
- next:
g_free (uid);
- g_object_unref (iter);
}
/* Now emit signals for each added signature. */