Re: [evolution-patches] [calendar-plugins] some itip-formatter.c fixes



Have committed the patch from gicmo. Attached is the committed patch
with ChangeLog.


On Sat, 2005-08-20 at 14:52 -0700, Carsten Guenther wrote: 
> Sorry about that, I must have forgotten to send out an updated patch.  
> I removed those two lines because they seem unnecessary and confusing  
> (you would get those errors for every disabled calendar, which the  
> user is not interested in at this point).
There is a FIXME already in find_calendar_opened_cb. Removing the
message would not fix the actual issue. It makes sense to show this
message if the calendar which has the object already fails to open,
since even trying to accept in that calendar may fail. It definitely
needed in cal_opened_cb which is used to open only the target calendar.

thanks, Chenthill.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/itip-formatter/ChangeLog,v
retrieving revision 1.58
diff -u -p -r1.58 ChangeLog
--- ChangeLog	21 Aug 2005 01:46:18 -0000	1.58
+++ ChangeLog	21 Aug 2005 16:26:24 -0000
@@ -1,3 +1,12 @@
+2005-08-21  Chenthill Palanisamy  <pchenthill novell com>
+
+	* itip-formatter.c: 
+	(update_attendee_status): removed the unwanted brackets.
+	(format_itip_object): Applied the patch from
+	Christian Kellner <Christian Kellner scalix com> which
+	fixes a memory leak and make deference of url
+	much simpler.
+
 2005-08-20  Carsten Guenther <carsten guenther scalix com>
 
 	* itip-formatter.c: (cal_opened_cb, final_cal_opened_cb):
Index: itip-formatter.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/itip-formatter/itip-formatter.c,v
retrieving revision 1.51
diff -u -p -r1.51 itip-formatter.c
--- itip-formatter.c	21 Aug 2005 01:46:18 -0000	1.51
+++ itip-formatter.c	21 Aug 2005 16:26:34 -0000
@@ -978,7 +978,7 @@ update_attendee_status (FormatItipPObjec
 						}
 					}
 
-					response = (e_error_run (NULL, "org.gnome.itip-formatter:add-unknown-attendee", NULL));
+					response = e_error_run (NULL, "org.gnome.itip-formatter:add-unknown-attendee", NULL);
 
 					if (response == GTK_RESPONSE_YES) {
 						change_status (icalcomp, itip_strip_mailto (a->value), a->status);
@@ -1774,18 +1774,14 @@ format_itip_object (EMFormatHTML *efh, G
 		/* Since the mailer uri matches with only groupwise calendar uri so for this case we need not 
 		   have to call find_server */
                 CamelFolder *folder;
-                CamelStore *parent_store;
-                CamelService parent_object;
                 CamelURL *url;
                 char *uri;
                 GSList *groups, *l;
-                ESource *source;
+                ESource *source = NULL;
                 gboolean found = FALSE;
 
                 folder = (((pitip->pobject).format)->format).folder;
-                parent_store = folder->parent_store;
-                parent_object = parent_store->parent_object;
-                url = parent_object.url;
+                url = CAMEL_SERVICE (folder->parent_store)->url;
                 uri = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
 
                 groups = e_source_list_peek_groups (pitip->source_lists[pitip->type]);
@@ -1793,14 +1789,18 @@ format_itip_object (EMFormatHTML *efh, G
                         ESourceGroup *group;
                         GSList *sources, *m;
 
-                        group = l->data;
+                        group = E_SOURCE_GROUP (l->data);
                         sources = e_source_group_peek_sources (group);
                         for (m = sources; m && !found; m = m->next) {
-                                source = m->data;
-                                if (!strcmp (uri, e_source_get_uri (source))) {
-                                        found = TRUE;
-                                        break;
-                                }
+                               char *source_uri = NULL;
+
+                               source = E_SOURCE (m->data);
+                               source_uri = e_source_get_uri (source);
+                               
+			       if (source_uri)
+				       found = (strcmp (uri, source_uri) == 0);
+                               
+			       g_free (source_uri);                            
                         }
                 }
 
@@ -1809,6 +1809,8 @@ format_itip_object (EMFormatHTML *efh, G
                         set_buttons_sensitive (pitip);
                 } else
                         find_server (pitip, pitip->comp);
+	
+		g_free (uri);
 	}
 	
 	return TRUE;


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