diff options
author | Milan Crha <mcrha@redhat.com> | 2013-11-21 04:26:18 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2013-11-21 04:26:54 +0800 |
commit | 93bff56329e3f20c30c0a76e07fe563f8a4c372c (patch) | |
tree | 5dee4e5cbe48c0ad3d868b18a8679d5dcf425af8 | |
parent | 6840cc4fed8646a662d7bbc91a3908858ee61e10 (diff) | |
download | gsoc2013-evolution-93bff56329e3f20c30c0a76e07fe563f8a4c372c.tar gsoc2013-evolution-93bff56329e3f20c30c0a76e07fe563f8a4c372c.tar.gz gsoc2013-evolution-93bff56329e3f20c30c0a76e07fe563f8a4c372c.tar.bz2 gsoc2013-evolution-93bff56329e3f20c30c0a76e07fe563f8a4c372c.tar.lz gsoc2013-evolution-93bff56329e3f20c30c0a76e07fe563f8a4c372c.tar.xz gsoc2013-evolution-93bff56329e3f20c30c0a76e07fe563f8a4c372c.tar.zst gsoc2013-evolution-93bff56329e3f20c30c0a76e07fe563f8a4c372c.zip |
Bug #711685 - Check calendar email as an organizer
-rw-r--r-- | calendar/gui/dialogs/event-page.c | 5 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-page.c | 3 | ||||
-rw-r--r-- | calendar/gui/itip-utils.c | 18 |
3 files changed, 12 insertions, 14 deletions
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index 09cb8c880b..f9184133bb 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -1203,10 +1203,7 @@ event_page_fill_widgets (CompEditorPage *page, if (itip_organizer_is_user (registry, comp, client) || itip_sentby_is_user (registry, comp, client)) { - if (e_client_check_capability ( - E_CLIENT (client), - CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS)) - priv->user_org = TRUE; + priv->user_org = TRUE; } else { if (e_client_check_capability ( E_CLIENT (client), diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index 66f6273cc3..3294d08d61 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -760,8 +760,7 @@ task_page_fill_widgets (CompEditorPage *page, if (itip_organizer_is_user (registry, comp, client) || itip_sentby_is_user (registry, comp, client)) { - if (e_client_check_capability (E_CLIENT (client), CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS)) - priv->user_org = TRUE; + priv->user_org = TRUE; } else { if (e_client_check_capability (E_CLIENT (client), CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS)) gtk_widget_set_sensitive (priv->invite, FALSE); diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index 1a48a29ee4..4a18a145cf 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -278,20 +278,22 @@ itip_organizer_is_user_ex (ESourceRegistry *registry, e_cal_component_get_organizer (comp, &organizer); if (organizer.value != NULL) { + gchar *email = NULL; strip = itip_strip_mailto (organizer.value); - if (e_client_check_capability (E_CLIENT (cal_client), CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS)) { - gchar *email = NULL; + if (e_client_get_backend_property_sync (E_CLIENT (cal_client), + CAL_BACKEND_PROPERTY_CAL_EMAIL_ADDRESS, + &email, NULL, NULL) && + email && g_ascii_strcasecmp (email, strip) == 0) { + g_free (email); - if (e_client_get_backend_property_sync (E_CLIENT (cal_client), CAL_BACKEND_PROPERTY_CAL_EMAIL_ADDRESS, &email, NULL, NULL) && - !g_ascii_strcasecmp (email, strip)) { - g_free (email); + return TRUE; + } - return TRUE; - } + g_free (email); - g_free (email); + if (e_client_check_capability (E_CLIENT (cal_client), CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS)) { return FALSE; } |