[evolution-patches] Address book: patch for #274308



The issue here is relative uri and absolute uri doesn't match.
When relative uri is reset, absolute uri will still contain the old
values for DN and scope, and the property dialog doesn't get
updated.

Please review,
-Sushma.

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/ChangeLog,v
retrieving revision 1.241
diff -u -p -r1.241 ChangeLog
--- ChangeLog	11 Apr 2005 12:21:26 -0000	1.241
+++ ChangeLog	14 Apr 2005 12:53:50 -0000
@@ -1,3 +1,10 @@
+2005-04-14  Sushma Rai  <rsushma novell com>
+
+	* libedataserver/e-source.c (e_source_set_relative_uri): Resetting the
+	absolute uri, when relative uri is changed if source is having absolute
+	uri. 
+	Fixes #274308
+	 
 2005-04-11  Harish Krishnaswamy  <kharish novell com>
 
 	* Makefile.am: use API_VERSION instead of BASE_VERSION in 
Index: libedataserver/e-source.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-source.c,v
retrieving revision 1.18
diff -u -p -r1.18 e-source.c
--- libedataserver/e-source.c	21 Jan 2005 04:37:06 -0000	1.18
+++ libedataserver/e-source.c	14 Apr 2005 12:55:49 -0000
@@ -509,6 +509,8 @@ void
 e_source_set_relative_uri (ESource *source,
 			   const char *relative_uri)
 {
+	char *absolute_uri;
+
 	g_return_if_fail (E_IS_SOURCE (source));
 
 	if (source->priv->readonly)
@@ -519,6 +521,13 @@ e_source_set_relative_uri (ESource *sour
 
 	g_free (source->priv->relative_uri);
 	source->priv->relative_uri = g_strdup (relative_uri);
+
+	/* reset the absolute uri */
+	if (source->priv->absolute_uri && 
+	    (absolute_uri = e_source_build_absolute_uri (source))) {
+		g_free (source->priv->absolute_uri);
+		source->priv->absolute_uri = absolute_uri;
+	}
 
 	g_signal_emit (source, signals[CHANGED], 0);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]