diff options
author | Milan Crha <mcrha@redhat.com> | 2012-11-12 21:13:09 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2012-11-12 21:13:09 +0800 |
commit | d60f240c603580b386b5c761986a5d418b9a0cd4 (patch) | |
tree | f2ae5805fcdad85865da182fe1a1a542fbfb72e3 /calendar | |
parent | 2f02976588bb47475fc5b649de2564cf842a0a84 (diff) | |
download | gsoc2013-evolution-d60f240c603580b386b5c761986a5d418b9a0cd4.tar.gz gsoc2013-evolution-d60f240c603580b386b5c761986a5d418b9a0cd4.tar.zst gsoc2013-evolution-d60f240c603580b386b5c761986a5d418b9a0cd4.zip |
Bug #687997 - No email sent for shared memos
Diffstat (limited to 'calendar')
-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); |