[evolution-patches] ESource comparison patch
- From: Hans Petter Jansson <hpj ximian com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] ESource comparison patch
- Date: Fri, 16 Jul 2004 23:03:35 +0200
e_source_equal() didn't work properly anymore, due to other changes in
ESource. Caused some mayhem in the contact editor.
--
Hans Petter
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/ChangeLog,v
retrieving revision 1.140
diff -u -p -r1.140 ChangeLog
--- ChangeLog 16 Jul 2004 14:51:37 -0000 1.140
+++ ChangeLog 16 Jul 2004 20:18:03 -0000
@@ -1,3 +1,10 @@
+2004-07-16 Hans Petter Jansson <hpj ximian com>
+
+ * libedataserver/e-source.c (e_source_equal): Don't give up and
+ warn if the source doesn't have an absolute URI, but try to check
+ for equality using available data. Prevents unnecessary book
+ reloads and warnings in Evolution's contact editor.
+
2004-07-16 Sivaiah Nallagatla <snallagatla novell com>
* libedataserver/e-source-group.c (e_source_group_remove_source)
Index: libedataserver/e-source.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-source.c,v
retrieving revision 1.16
diff -u -p -r1.16 e-source.c
--- libedataserver/e-source.c 9 Jul 2004 16:12:35 -0000 1.16
+++ libedataserver/e-source.c 16 Jul 2004 20:18:03 -0000
@@ -236,7 +236,8 @@ e_source_equal (ESource *source_1, ESour
if (source_1->priv->uid && source_2->priv->uid &&
!strcmp (source_1->priv->uid, source_2->priv->uid)) {
equal = TRUE;
- } else {
+ } else if ((source_1->priv->group && source_2->priv->group) ||
+ (source_1->priv->absolute_uri && source_2->priv->absolute_uri)) {
gchar *uri_1, *uri_2;
uri_1 = e_source_get_uri (source_1);
@@ -247,6 +248,12 @@ e_source_equal (ESource *source_1, ESour
g_free (uri_1);
g_free (uri_2);
+ } else if (!source_1->priv->group && !source_2->priv->group &&
+ !source_1->priv->absolute_uri && !source_2->priv->absolute_uri) {
+ if ((!source_1->priv->relative_uri && !source_2->priv->relative_uri) ||
+ (source_1->priv->relative_uri && source_2->priv->relative_uri &&
+ !strcmp (source_1->priv->relative_uri, source_2->priv->relative_uri)))
+ equal = TRUE;
}
return equal;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]