diff options
author | Milan Crha <mcrha@redhat.com> | 2008-04-16 19:38:57 +0800 |
---|---|---|
committer | Milan Crha <mcrha@src.gnome.org> | 2008-04-16 19:38:57 +0800 |
commit | c38c10de6919cc97c82ad7d769e0583dc0f03d60 (patch) | |
tree | 8396d170670a721b9aeb27b14cf1335de5cb9a1b /calendar | |
parent | 8d389d27a348250229bd7bf68c4d9f2bf5d57c00 (diff) | |
download | gsoc2013-evolution-c38c10de6919cc97c82ad7d769e0583dc0f03d60.tar.gz gsoc2013-evolution-c38c10de6919cc97c82ad7d769e0583dc0f03d60.tar.zst gsoc2013-evolution-c38c10de6919cc97c82ad7d769e0583dc0f03d60.zip |
** Fix for bug #232594
2008-04-16 Milan Crha <mcrha@redhat.com>
** Fix for bug #232594
* gui/e-meeting-list-view.c: (attendee_edited_cb):
Set status to Needs Action when attendee's address have been changed.
svn path=/trunk/; revision=35370
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 7 | ||||
-rw-r--r-- | calendar/gui/e-meeting-list-view.c | 35 |
2 files changed, 29 insertions, 13 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index cbd1b88f75..84281b397e 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2008-04-16 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #232594 + + * gui/e-meeting-list-view.c: (attendee_edited_cb): + Set status to Needs Action when attendee's address have been changed. + 2008-04-11 Suman Manjunath <msuman@novell.com> ** Fix for bug #517134 diff --git a/calendar/gui/e-meeting-list-view.c b/calendar/gui/e-meeting-list-view.c index 2e35fde081..760df5628b 100644 --- a/calendar/gui/e-meeting-list-view.c +++ b/calendar/gui/e-meeting-list-view.c @@ -317,7 +317,7 @@ attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *address GtkTreePath *treepath = gtk_tree_path_new_from_string (path); int row = gtk_tree_path_get_indices (treepath)[0]; EMeetingAttendee *existing_attendee; - gboolean removed = FALSE; + gboolean removed = FALSE, address_changed = FALSE; existing_attendee = e_meeting_store_find_attendee_at_row (model, row); @@ -342,7 +342,7 @@ attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *address e_meeting_attendee_set_cutype (attendee, e_meeting_attendee_get_cutype (existing_attendee)); e_meeting_attendee_set_role (attendee, e_meeting_attendee_get_role (existing_attendee)); e_meeting_attendee_set_rsvp (attendee, e_meeting_attendee_get_rsvp (existing_attendee)); - e_meeting_attendee_set_status (attendee, e_meeting_attendee_get_status (existing_attendee)); + e_meeting_attendee_set_status (attendee, ICAL_PARTSTAT_NEEDSACTION); e_meeting_attendee_set_delfrom (attendee, (gchar *)e_meeting_attendee_get_delfrom (existing_attendee)); } e_meeting_list_view_add_attendee_to_name_selector (E_MEETING_LIST_VIEW (view), attendee); @@ -369,9 +369,16 @@ attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *address } else { EMeetingAttendee *attendee = E_MEETING_ATTENDEE (e_meeting_attendee_new ()); - if (existing_attendee) - e_meeting_list_view_remove_attendee_from_name_selector (E_MEETING_LIST_VIEW (view), - existing_attendee); + if (existing_attendee) { + const gchar *addr = e_meeting_attendee_get_address (existing_attendee); + + if (addr && g_ascii_strncasecmp (addr, "MAILTO:", 7) == 0) + addr += 7; + + address_changed = addr && g_ascii_strcasecmp (addr, email) != 0; + + e_meeting_list_view_remove_attendee_from_name_selector (E_MEETING_LIST_VIEW (view), existing_attendee); + } value_edited (view, E_MEETING_STORE_ADDRESS_COL, path, email); value_edited (view, E_MEETING_STORE_CN_COL, path, name); @@ -386,20 +393,22 @@ attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *address if (existing_attendee) { const char *address = e_meeting_attendee_get_address (existing_attendee); - if (address && *address) - return; - - removed = TRUE; - e_meeting_list_view_remove_attendee_from_name_selector (E_MEETING_LIST_VIEW (view), - existing_attendee); - e_meeting_store_remove_attendee (model, existing_attendee); + if (!(address && *address)) { + removed = TRUE; + e_meeting_list_view_remove_attendee_from_name_selector (E_MEETING_LIST_VIEW (view), existing_attendee); + e_meeting_store_remove_attendee (model, existing_attendee); + } } } gtk_tree_path_free (treepath); - if (!removed) + if (!removed) { + if (address_changed) + e_meeting_attendee_set_status (existing_attendee, ICAL_PARTSTAT_NEEDSACTION); + g_signal_emit_by_name (G_OBJECT (view), "attendee_added", (gpointer) existing_attendee); + } } static void |