diff options
author | Milan Crha <mcrha@redhat.com> | 2009-05-25 22:54:25 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2009-05-25 22:54:25 +0800 |
commit | be4ca0bbea8eaad10bf9d2a3ec53056433d31c49 (patch) | |
tree | 36724807b4df20abac6cb4916c7022b96657ae8b | |
parent | 949c01ec2e00fd178c5ee0307191fa130ab6aa74 (diff) | |
download | gsoc2013-evolution-be4ca0bbea8eaad10bf9d2a3ec53056433d31c49.tar.gz gsoc2013-evolution-be4ca0bbea8eaad10bf9d2a3ec53056433d31c49.tar.zst gsoc2013-evolution-be4ca0bbea8eaad10bf9d2a3ec53056433d31c49.zip |
itip-formatter - search for master object too
When received a detached instance, and the calendar doesn't contain
that exact instance, then try to search for the master object and
use it, if found.
-rw-r--r-- | plugins/itip-formatter/itip-formatter.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c index 04049ef6d5..6c1775a8b5 100644 --- a/plugins/itip-formatter/itip-formatter.c +++ b/plugins/itip-formatter/itip-formatter.c @@ -629,8 +629,8 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data) e_cal_free_object_list (objects); } - - if (!pitip->current_ecal && e_cal_get_object (ecal, fd->uid, fd->rid, &icalcomp, NULL)) { + /* search for a master object if the detached object doesn't exist in the calendar */ + if (!pitip->current_ecal && (e_cal_get_object (ecal, fd->uid, fd->rid, &icalcomp, NULL) || (fd->rid && e_cal_get_object (ecal, fd->uid, NULL, &icalcomp, NULL)))) { if ((pitip->method == ICAL_METHOD_PUBLISH || pitip->method == ICAL_METHOD_REQUEST) && (icalcomponent_get_first_component (icalcomp, ICAL_VALARM_COMPONENT) || icalcomponent_get_first_component (icalcomp, ICAL_XAUDIOALARM_COMPONENT) || @@ -1278,7 +1278,9 @@ update_attendee_status (struct _itip_puri *pitip) org_icalcomp = e_cal_component_get_icalcomponent (pitip->comp); rid = e_cal_component_get_recurid_as_string (pitip->comp); - if (e_cal_get_object (pitip->current_ecal, uid, rid, &icalcomp, NULL)) { + + /* search for a master object if the detached object doesn't exist in the calendar */ + if (e_cal_get_object (pitip->current_ecal, uid, rid, &icalcomp, NULL) || (rid && e_cal_get_object (pitip->current_ecal, uid, NULL, &icalcomp, NULL))) { GSList *attendees; comp = e_cal_component_new (); |