Re: [evolution-patches] [calendar-plugins]: fix for bug #305627



On Fri, 2005-08-12 at 09:39 +0530, Dinesh Layek wrote:
tip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_INFO,
+                                                      "Found the appointment in the calendar '%s'", e_source_peek_name (source));
itip_view_clear_lower_info_items (ITIP_VIEW (pitip->view));
+                        pitip->progress_info_id = 0;
This should say "Found the calendar" and the other two statements are not required there. Since were are in a string freeze mode. Just removing this line. The id for the bug should be present in the ChangeLog. Other than that looks fine. Committing with these changes.


thanks, chenthill.

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/itip-formatter/ChangeLog,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -p -r1.55 -r1.56
--- ChangeLog	8 Aug 2005 20:34:22 -0000	1.55
+++ ChangeLog	12 Aug 2005 14:25:20 -0000	1.56
@@ -1,3 +1,9 @@
+2005-08-11  Dinesh Layek  <LDinesh novell com>
+
+	Fixes #305627
+	* itip-formatter.c: (format_itip_object): set the source calendar
+	of an appointment from the url information of CamelFolder.
+
 2005-08-09  Chenthill Palanisamy  <pchenthill novell com>
 
 	Fixes #307841
Index: itip-formatter.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/itip-formatter/itip-formatter.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -p -r1.48 -r1.49
--- itip-formatter.c	8 Aug 2005 20:34:22 -0000	1.48
+++ itip-formatter.c	12 Aug 2005 14:25:20 -0000	1.49
@@ -35,6 +35,8 @@
 #include <camel/camel-mime-message.h>
 #include <camel/camel-folder.h>
 #include <camel/camel-multipart.h>
+#include <camel/camel-service.h>
+#include <camel/camel-store.h>
 #include <libecal/e-cal.h>
 #include <libecal/e-cal-time-util.h>
 #include <libedataserverui/e-source-option-menu.h>
@@ -1755,8 +1757,47 @@ format_itip_object (EMFormatHTML *efh, G
 
 	if (pitip->calendar_uid)
 		pitip->current_ecal = start_calendar_server_by_uid (pitip, pitip->calendar_uid, pitip->type);
-	else
-		find_server (pitip, pitip->comp);
+	else {
+
+		/* 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;
+                gboolean found = FALSE;
+
+                folder = (((pitip->pobject).format)->format).folder;
+                parent_store = folder->parent_store;
+                parent_object = parent_store->parent_object;
+                url = parent_object.url;
+                uri = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
+
+                groups = e_source_list_peek_groups (pitip->source_lists[pitip->type]);
+                for (l = groups; l && !found; l = l->next) {
+                        ESourceGroup *group;
+                        GSList *sources, *m;
+
+                        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;
+                                }
+                        }
+                }
+
+                if (found) {
+                        pitip->current_ecal = start_calendar_server (pitip, source, pitip->type, cal_opened_cb, pitip);
+                        set_buttons_sensitive (pitip);
+                } else
+                        find_server (pitip, pitip->comp);
+	}
 	
 	return TRUE;
 }


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