aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-04-15 01:29:15 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-04-15 01:29:15 +0800
commitfea1c47a5742f84561a4ec793f1f9b17ee9f29ae (patch)
tree6ae5b4e3d33b9ef48961c8556bc2999c38ecefc3 /e-util
parentc638a551a2eaef108361cf867472ec4d0c733335 (diff)
downloadgsoc2013-evolution-fea1c47a5742f84561a4ec793f1f9b17ee9f29ae.tar
gsoc2013-evolution-fea1c47a5742f84561a4ec793f1f9b17ee9f29ae.tar.gz
gsoc2013-evolution-fea1c47a5742f84561a4ec793f1f9b17ee9f29ae.tar.bz2
gsoc2013-evolution-fea1c47a5742f84561a4ec793f1f9b17ee9f29ae.tar.lz
gsoc2013-evolution-fea1c47a5742f84561a4ec793f1f9b17ee9f29ae.tar.xz
gsoc2013-evolution-fea1c47a5742f84561a4ec793f1f9b17ee9f29ae.tar.zst
gsoc2013-evolution-fea1c47a5742f84561a4ec793f1f9b17ee9f29ae.zip
Don't add an autogen signature if the new signature is the autogen
2004-04-13 Jeffrey Stedfast <fejj@ximian.com> * e-signature-list.c (gconf_signatures_changed): Don't add an autogen signature if the new signature is the autogen signature. svn path=/trunk/; revision=25463
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog5
-rw-r--r--e-util/e-signature-list.c18
2 files changed, 12 insertions, 11 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 0c6fb9ba90..7be2932b89 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,5 +1,10 @@
2004-04-13 Jeffrey Stedfast <fejj@ximian.com>
+ * e-signature-list.c (gconf_signatures_changed): Don't add an
+ autogen signature if the new signature is the autogen signature.
+
+2004-04-13 Jeffrey Stedfast <fejj@ximian.com>
+
* e-host-utils.c (e_gethostbyname_r): Implemented a similar
workaround to the one I did for a gethostbyaddr_r() glibc bug
here. Glibc will apparently return success for addresses such as
diff --git a/e-util/e-signature-list.c b/e-util/e-signature-list.c
index 8f651f54df..e7812f0181 100644
--- a/e-util/e-signature-list.c
+++ b/e-util/e-signature-list.c
@@ -152,8 +152,8 @@ e_signature_list_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
-static void
-add_autogen (ESignatureList *list)
+static GSList *
+add_autogen (ESignatureList *list, GSList *new_sigs)
{
ESignature *autogen;
@@ -162,6 +162,8 @@ add_autogen (ESignatureList *list)
autogen->autogen = TRUE;
e_list_append (E_LIST (list), autogen);
+
+ return g_slist_prepend (new_sigs, autogen);
}
static void
@@ -195,8 +197,7 @@ gconf_signatures_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry,
if (e_signature_set_from_xml (signature, l->data))
g_signal_emit (signature_list, signals[SIGNATURE_CHANGED], 0, signature);
- if (!have_autogen)
- have_autogen = signature->autogen;
+ have_autogen |= signature->autogen;
break;
}
@@ -205,15 +206,10 @@ gconf_signatures_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry,
g_object_unref (iter);
}
- if (!have_autogen) {
- add_autogen (signature_list);
- have_autogen = TRUE;
- resave = TRUE;
- }
-
if (!found) {
/* Must be a new signature */
signature = e_signature_new_from_xml (l->data);
+ have_autogen |= signature->autogen;
if (!signature->uid) {
signature->uid = e_uid_new ();
resave = TRUE;
@@ -227,7 +223,7 @@ gconf_signatures_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry,
}
if (!have_autogen) {
- add_autogen (signature_list);
+ new_sigs = add_autogen (signature_list, new_sigs);
have_autogen = TRUE;
resave = TRUE;
}