diff options
author | Milan Crha <mcrha@redhat.com> | 2012-11-12 21:13:43 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2012-11-12 21:13:43 +0800 |
commit | 63d5e467d5505f24256a026ef37f963964c6955d (patch) | |
tree | 0618bed0bad436346bee4e3339867772c3b058dc | |
parent | 568cdc1bed5a3123d8f2de44d1d329bbbccd5ab9 (diff) | |
download | gsoc2013-evolution-63d5e467d5505f24256a026ef37f963964c6955d.tar.gz gsoc2013-evolution-63d5e467d5505f24256a026ef37f963964c6955d.tar.zst gsoc2013-evolution-63d5e467d5505f24256a026ef37f963964c6955d.zip |
Bug #687997 - No email sent for shared memos
-rw-r--r-- | calendar/gui/dialogs/memo-page.c | 3 | ||||
-rw-r--r-- | calendar/gui/dialogs/send-comp.c | 30 |
2 files changed, 30 insertions, 3 deletions
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c index 01d3c9143c..ec99587f4e 100644 --- a/calendar/gui/dialogs/memo-page.c +++ b/calendar/gui/dialogs/memo-page.c @@ -808,6 +808,9 @@ memo_page_fill_component (CompEditorPage *page, g_free (mailto); } + comp_editor_set_needs_send (editor, (flags & COMP_EDITOR_IS_SHARED) != 0 && + itip_organizer_is_user (e_shell_get_registry (comp_editor_get_shell (editor)), comp, client)); + return TRUE; } diff --git a/calendar/gui/dialogs/send-comp.c b/calendar/gui/dialogs/send-comp.c index fa7640eae7..73938be875 100644 --- a/calendar/gui/dialogs/send-comp.c +++ b/calendar/gui/dialogs/send-comp.c @@ -51,10 +51,35 @@ component_has_recipients (ECalComponent *comp) g_return_val_if_fail (comp != NULL, FALSE); + e_cal_component_get_organizer (comp, &organizer); e_cal_component_get_attendee_list (comp, &attendees); - if (!attendees) - return FALSE; + if (!attendees) { + if (organizer.value && e_cal_component_get_vtype (comp) == E_CAL_COMPONENT_JOURNAL) { + /* memos store recipients in an extra property */ + icalcomponent *icalcomp; + icalproperty *icalprop; + + icalcomp = e_cal_component_get_icalcomponent (comp); + + for (icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY); + icalprop != NULL; + icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY)) { + const gchar *x_name; + + x_name = icalproperty_get_x_name (icalprop); + + if (g_str_equal (x_name, "X-EVOLUTION-RECIPIENTS")) { + const gchar *str_recipients = icalproperty_get_x (icalprop); + + res = str_recipients && g_ascii_strcasecmp (organizer.value, str_recipients) != 0; + break; + } + } + } + + return res; + } if (g_slist_length (attendees) > 1 || !e_cal_component_has_organizer (comp)) { e_cal_component_free_attendee_list (attendees); @@ -63,7 +88,6 @@ component_has_recipients (ECalComponent *comp) attendee = attendees->data; - e_cal_component_get_organizer (comp, &organizer); res = organizer.value && attendee && attendee->value && g_ascii_strcasecmp (organizer.value, attendee->value) != 0; e_cal_component_free_attendee_list (attendees); |