aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-signature-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'e-util/e-signature-list.c')
-rw-r--r--e-util/e-signature-list.c30
1 files changed, 22 insertions, 8 deletions
diff --git a/e-util/e-signature-list.c b/e-util/e-signature-list.c
index 61076b9d72..79ebb0be46 100644
--- a/e-util/e-signature-list.c
+++ b/e-util/e-signature-list.c
@@ -161,7 +161,10 @@ add_autogen (ESignatureList *list, GSList *new_sigs)
}
static void
-gconf_signatures_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data)
+gconf_signatures_changed (GConfClient *client,
+ guint cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
{
ESignatureList *signature_list = user_data;
GSList *list, *l, *n, *new_sigs = NULL;
@@ -175,29 +178,36 @@ gconf_signatures_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry,
old_sigs = e_list_duplicate (E_LIST (signature_list));
- list = gconf_client_get_list (client, "/apps/evolution/mail/signatures", GCONF_VALUE_STRING, NULL);
+ list = gconf_client_get_list (
+ client, "/apps/evolution/mail/signatures",
+ GCONF_VALUE_STRING, NULL);
for (l = list; l; l = l->next) {
found = FALSE;
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)) {
+ iter = e_list_get_iterator (old_sigs);
+ while (e_iterator_is_valid (iter)) {
const gchar *signature_uid;
signature = (ESignature *) e_iterator_get (iter);
signature_uid = e_signature_get_uid (signature);
if (!strcmp (signature_uid, uid)) {
/* The signature still exists, so remove
- * it from "old_sigs" and update it.
- */
+ * it from "old_sigs" and update it. */
found = TRUE;
e_iterator_delete (iter);
if (e_signature_set_from_xml (signature, l->data))
- g_signal_emit (signature_list, signals[SIGNATURE_CHANGED], 0, signature);
+ g_signal_emit (
+ signature_list,
+ signals[SIGNATURE_CHANGED],
+ 0, signature);
have_autogen |= e_signature_get_autogenerated (signature);
break;
}
+
+ e_iterator_next (iter);
}
g_object_unref (iter);
@@ -238,10 +248,14 @@ gconf_signatures_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry,
}
/* Anything left in old_sigs must have been deleted */
- for (iter = e_list_get_iterator (old_sigs); e_iterator_is_valid (iter); e_iterator_next (iter)) {
+ iter = e_list_get_iterator (old_sigs);
+ while (e_iterator_is_valid (iter)) {
signature = (ESignature *) e_iterator_get (iter);
e_list_remove (E_LIST (signature_list), signature);
- g_signal_emit (signature_list, signals[SIGNATURE_REMOVED], 0, signature);
+ g_signal_emit (
+ signature_list, signals[SIGNATURE_REMOVED], 0,
+ signature);
+ e_iterator_next (iter);
}
g_object_unref (iter);