[evolution/gnome-3-10] Bug #711685 - Check calendar email as an organizer



commit 8ce7cb8e8ed3f8bf9939aa871e72f5c0611d1082
Author: Milan Crha <mcrha redhat com>
Date:   Wed Nov 20 21:26:18 2013 +0100

    Bug #711685 - Check calendar email as an organizer

 calendar/gui/dialogs/event-page.c |    5 +----
 calendar/gui/dialogs/task-page.c  |    3 +--
 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 f4d9658..008823a 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -1201,10 +1201,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 66f6273..3294d08 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 d8cc740..ca79fe1 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;
                }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]