From f1b2a1422fd6542bbe2cca4013e0fe072b514f3f Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 8 Jan 2007 11:48:06 +0000 Subject: Fixes #377511 Return the default value 1. (role_edited_cb): Move the 2007-01-08 Matthew Barnes Fixes #377511 * gui/e-meeting-list-view.c: (get_index_from_role): Return the default value 1. (role_edited_cb): Move the attendee to the right section in the name selector. svn path=/trunk/; revision=33119 --- calendar/ChangeLog | 8 ++++++++ calendar/gui/e-meeting-list-view.c | 17 +++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index f8a2b87ab9..0fc2a4e722 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,11 @@ +2007-01-08 Matthew Barnes + + Fixes #377511 + * gui/e-meeting-list-view.c: (get_index_from_role): + Return the default value 1. + (role_edited_cb): Move the attendee to the right section + in the name selector. + 2007-01-08 Wang Xin Fixes #389966 diff --git a/calendar/gui/e-meeting-list-view.c b/calendar/gui/e-meeting-list-view.c index 2e632c6919..4c17646232 100644 --- a/calendar/gui/e-meeting-list-view.c +++ b/calendar/gui/e-meeting-list-view.c @@ -234,7 +234,7 @@ get_index_from_role (icalparameter_role role) case ICAL_ROLE_NONPARTICIPANT: return 3; default: - return 4; + return 1; } } @@ -435,7 +435,20 @@ type_edited_cb (GtkCellRenderer *renderer, const gchar *path, const gchar *text, static void role_edited_cb (GtkCellRenderer *renderer, const gchar *path, const gchar *text, GtkTreeView *view) { - value_edited (view, E_MEETING_STORE_ROLE_COL, path, text); + /* This is a little more complex than the other callbacks because + * we also need to update the "Required Participants" dialog. */ + + EMeetingStore *model = E_MEETING_STORE (gtk_tree_view_get_model (view)); + GtkTreePath *treepath = gtk_tree_path_new_from_string (path); + gint row = gtk_tree_path_get_indices (treepath)[0]; + EMeetingAttendee *attendee; + + attendee = e_meeting_store_find_attendee_at_row (model, row); + e_meeting_list_view_remove_attendee_from_name_selector (E_MEETING_LIST_VIEW (view), attendee); + e_meeting_store_set_value (model, row, E_MEETING_STORE_ROLE_COL, text); + e_meeting_list_view_add_attendee_to_name_selector (E_MEETING_LIST_VIEW (view), attendee); + + gtk_tree_path_free (treepath); } static void -- cgit v1.2.3