diff options
author | Milan Crha <mcrha@redhat.com> | 2009-01-23 19:41:55 +0800 |
---|---|---|
committer | Milan Crha <mcrha@src.gnome.org> | 2009-01-23 19:41:55 +0800 |
commit | a8abd0060bdec73f774c665dd0488623dd4932ba (patch) | |
tree | 52aeed8ba8a6e82af45ca3762e194bd868e312f3 /calendar/gui | |
parent | 9e22e250e3bee2fe7160380582eed1102b7ba922 (diff) | |
download | gsoc2013-evolution-a8abd0060bdec73f774c665dd0488623dd4932ba.tar gsoc2013-evolution-a8abd0060bdec73f774c665dd0488623dd4932ba.tar.gz gsoc2013-evolution-a8abd0060bdec73f774c665dd0488623dd4932ba.tar.bz2 gsoc2013-evolution-a8abd0060bdec73f774c665dd0488623dd4932ba.tar.lz gsoc2013-evolution-a8abd0060bdec73f774c665dd0488623dd4932ba.tar.xz gsoc2013-evolution-a8abd0060bdec73f774c665dd0488623dd4932ba.tar.zst gsoc2013-evolution-a8abd0060bdec73f774c665dd0488623dd4932ba.zip |
** Fix for bug #442869
2009-01-23 Milan Crha <mcrha@redhat.com>
** Fix for bug #442869
* gui/dialogs/task-page.c: (attendee_added_cb):
* gui/dialogs/event-page.c: (attendee_added_cb): Do not work
with NULL delegator and do not set 'delfrom' with two MAILTO.
* gui/e-meeting-list-view.c: (name_selector_dialog_close_cb):
Delete attendee only if we have enough rights for it.
svn path=/trunk/; revision=37123
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/dialogs/event-page.c | 41 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-page.c | 5 | ||||
-rw-r--r-- | calendar/gui/e-meeting-list-view.c | 8 |
3 files changed, 31 insertions, 23 deletions
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index ca42dd92fb..ffbd37d850 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -1825,27 +1825,28 @@ attendee_added_cb (EMeetingListView *emlv, client = comp_editor_get_client (editor); flags = comp_editor_get_flags (editor); - if (flags & COMP_EDITOR_DELEGATE) { - if (existing_attendee (ia, priv->comp)) - e_meeting_store_remove_attendee (priv->model, ia); - else { - if (!e_cal_get_static_capability (client, - CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY)) { - const char *delegator_id = e_meeting_attendee_get_delfrom (ia); - EMeetingAttendee *delegator; - - delegator = e_meeting_store_find_attendee (priv->model, delegator_id, NULL); - e_meeting_attendee_set_delto (delegator, - g_strdup (e_meeting_attendee_get_address (ia))); - - e_meeting_attendee_set_delfrom (ia, g_strdup_printf ("MAILTO:%s", delegator_id)); - gtk_widget_set_sensitive (priv->invite, FALSE); - gtk_widget_set_sensitive (priv->add, FALSE); - gtk_widget_set_sensitive (priv->edit, FALSE); - } - } -} + if (!(flags & COMP_EDITOR_DELEGATE)) + return; + + if (existing_attendee (ia, priv->comp)) { + e_meeting_store_remove_attendee (priv->model, ia); + } else { + if (!e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY)) { + const char *delegator_id = e_meeting_attendee_get_delfrom (ia); + EMeetingAttendee *delegator; + delegator = e_meeting_store_find_attendee (priv->model, delegator_id, NULL); + + g_return_if_fail (delegator != NULL); + + e_meeting_attendee_set_delto (delegator, g_strdup (e_meeting_attendee_get_address (ia))); + + e_meeting_attendee_set_delfrom (ia, g_strdup (delegator_id)); + gtk_widget_set_sensitive (priv->invite, FALSE); + gtk_widget_set_sensitive (priv->add, FALSE); + gtk_widget_set_sensitive (priv->edit, FALSE); + } + } } /* Callbacks for list view*/ diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index 7f2969abd2..c00a42f4bc 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -1160,8 +1160,11 @@ attendee_added_cb (EMeetingListView *emlv, EMeetingAttendee *delegator; delegator = e_meeting_store_find_attendee (priv->model, delegator_id, NULL); + + g_return_if_fail (delegator != NULL); + e_meeting_attendee_set_delto (delegator, - g_strdup (e_meeting_attendee_get_address (ia))); + g_strdup (e_meeting_attendee_get_address (ia))); gtk_widget_set_sensitive (priv->invite, FALSE); gtk_widget_set_sensitive (priv->add, FALSE); diff --git a/calendar/gui/e-meeting-list-view.c b/calendar/gui/e-meeting-list-view.c index 95bdcdff19..9859c65df9 100644 --- a/calendar/gui/e-meeting-list-view.c +++ b/calendar/gui/e-meeting-list-view.c @@ -898,8 +898,12 @@ name_selector_dialog_close_cb (ENameSelectorDialog *dialog, gint response, gpoin ma = e_meeting_store_find_attendee (store, email, &i); - if (ma) - e_meeting_store_remove_attendee (store, ma); + if (ma) { + if (e_meeting_attendee_get_edit_level (ma) != E_MEETING_ATTENDEE_EDIT_FULL) + g_warning ("Not enough rights to delete attendee: %s\n", e_meeting_attendee_get_address (ma)); + else + e_meeting_store_remove_attendee (store, ma); + } } g_slist_free (la); |