aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/itip-formatter
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2005-08-12 22:25:20 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2005-08-12 22:25:20 +0800
commit2740e3d13d2d1d663399e11a23b46128ee1a7f62 (patch)
tree86b457612e58170474a1f02a0084d46975f840e7 /plugins/itip-formatter
parentfe93bc962abd19cda49da538d3a73944e4eec065 (diff)
downloadgsoc2013-evolution-2740e3d13d2d1d663399e11a23b46128ee1a7f62.tar
gsoc2013-evolution-2740e3d13d2d1d663399e11a23b46128ee1a7f62.tar.gz
gsoc2013-evolution-2740e3d13d2d1d663399e11a23b46128ee1a7f62.tar.bz2
gsoc2013-evolution-2740e3d13d2d1d663399e11a23b46128ee1a7f62.tar.lz
gsoc2013-evolution-2740e3d13d2d1d663399e11a23b46128ee1a7f62.tar.xz
gsoc2013-evolution-2740e3d13d2d1d663399e11a23b46128ee1a7f62.tar.zst
gsoc2013-evolution-2740e3d13d2d1d663399e11a23b46128ee1a7f62.zip
Fixes #305627.
svn path=/trunk/; revision=30098
Diffstat (limited to 'plugins/itip-formatter')
-rw-r--r--plugins/itip-formatter/ChangeLog6
-rw-r--r--plugins/itip-formatter/itip-formatter.c45
2 files changed, 49 insertions, 2 deletions
diff --git a/plugins/itip-formatter/ChangeLog b/plugins/itip-formatter/ChangeLog
index fcc8fd9dde..2379aa180f 100644
--- a/plugins/itip-formatter/ChangeLog
+++ b/plugins/itip-formatter/ChangeLog
@@ -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
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index b2bccca3b0..4ed6cdc342 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -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, GtkHTMLEmbedded *eb, EMFormatHTMLPObject
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;
}