Matthew Barnes 73c989
--- evolution-2.9.3/calendar/gui/e-meeting-list-view.c.meeting-list-view	2006-12-11 23:13:47.000000000 -0500
Matthew Barnes 73c989
+++ evolution-2.9.3/calendar/gui/e-meeting-list-view.c	2006-12-11 23:14:17.000000000 -0500
Matthew Barnes 73c989
@@ -623,18 +623,45 @@
Matthew Barnes 73c989
                
Matthew Barnes 73c989
 }
Matthew Barnes 73c989
  
Matthew Barnes 73c989
+void
Matthew Barnes 73c989
+attendee_added_cb (EMeetingStore *store, GtkTreePath *path,
Matthew Barnes 73c989
+                   GtkTreeIter *iter, EMeetingListView *view)
Matthew Barnes 73c989
+{
Matthew Barnes 73c989
+	EMeetingAttendee *attendee;
Matthew Barnes 73c989
+	gint row;
Matthew Barnes 73c989
+
Matthew Barnes 73c989
+	/* Add the new attendee to the name selector. */
Matthew Barnes 73c989
+	row = gtk_tree_path_get_indices (path) [0];
Matthew Barnes 73c989
+	attendee = e_meeting_store_find_attendee_at_row (store, row);
Matthew Barnes 73c989
+	e_meeting_list_view_add_attendee_to_name_selector (view, attendee);
Matthew Barnes 73c989
+}
Matthew Barnes 73c989
+
Matthew Barnes 73c989
+void
Matthew Barnes 73c989
+attendee_deleted_cb (EMeetingStore *store, GtkTreePath *path,
Matthew Barnes 73c989
+                     EMeetingListView *view)
Matthew Barnes 73c989
+{
Matthew Barnes 73c989
+	EMeetingAttendee *attendee;
Matthew Barnes 73c989
+	gint row;
Matthew Barnes 73c989
+
Matthew Barnes 73c989
+	/* Remove the old attendee from the name selector. */
Matthew Barnes 73c989
+	row = gtk_tree_path_get_indices (path) [0];
Matthew Barnes 73c989
+	attendee = e_meeting_store_find_attendee_at_row (store, row);
Matthew Barnes 73c989
+	e_meeting_list_view_remove_attendee_from_name_selector (view, attendee);
Matthew Barnes 73c989
+}
Matthew Barnes 73c989
 
Matthew Barnes 73c989
 EMeetingListView *
Matthew Barnes 73c989
 e_meeting_list_view_new (EMeetingStore *store)
Matthew Barnes 73c989
 {
Matthew Barnes 73c989
-	EMeetingListView *view = g_object_new (E_TYPE_MEETING_LIST_VIEW, NULL);
Matthew Barnes 73c989
+	EMeetingListView *view;
Matthew Barnes 73c989
 	GtkTreeSelection *selection;
Matthew Barnes 73c989
 
Matthew Barnes 73c989
-	if (view) {
Matthew Barnes 73c989
-		view->priv->store = store;
Matthew Barnes 73c989
-		gtk_tree_view_set_model (GTK_TREE_VIEW (view), GTK_TREE_MODEL (store));
Matthew Barnes 73c989
-		build_table (view);
Matthew Barnes 73c989
-	}
Matthew Barnes 73c989
+	view = g_object_new (E_TYPE_MEETING_LIST_VIEW, NULL);
Matthew Barnes 73c989
+	view->priv->store = store;
Matthew Barnes 73c989
+	gtk_tree_view_set_model (GTK_TREE_VIEW (view), GTK_TREE_MODEL (store));
Matthew Barnes 73c989
+	build_table (view);
Matthew Barnes 73c989
+
Matthew Barnes 73c989
+	g_signal_connect (store, "row-inserted", G_CALLBACK (attendee_added_cb), view);
Matthew Barnes 73c989
+	g_signal_connect (store, "row-deleted", G_CALLBACK (attendee_deleted_cb), view);
Matthew Barnes 73c989
 
Matthew Barnes 73c989
 	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(view));
Matthew Barnes 73c989
 	g_signal_connect (selection, "changed", G_CALLBACK (row_activated_cb), view);
Matthew Barnes 73c989
--- evolution-2.9.3/calendar/gui/e-meeting-store.c.meeting-list-view	2006-12-04 10:44:42.000000000 -0500
Matthew Barnes 73c989
+++ evolution-2.9.3/calendar/gui/e-meeting-store.c	2006-12-11 23:14:17.000000000 -0500
Matthew Barnes 73c989
@@ -794,14 +794,13 @@
Matthew Barnes 73c989
 	}	
Matthew Barnes 73c989
 	
Matthew Barnes 73c989
 	if (row != -1) {
Matthew Barnes 73c989
-
Matthew Barnes 73c989
-		g_ptr_array_remove_index (store->priv->attendees, row);		
Matthew Barnes 73c989
-		g_object_unref (attendee);
Matthew Barnes 73c989
-
Matthew Barnes 73c989
 		path = gtk_tree_path_new ();
Matthew Barnes 73c989
 		gtk_tree_path_append_index (path, row);
Matthew Barnes 73c989
 		gtk_tree_model_row_deleted (GTK_TREE_MODEL (store), path);
Matthew Barnes 73c989
 		gtk_tree_path_free (path);
Matthew Barnes 73c989
+
Matthew Barnes 73c989
+		g_ptr_array_remove_index (store->priv->attendees, row);		
Matthew Barnes 73c989
+		g_object_unref (attendee);
Matthew Barnes 73c989
 	}
Matthew Barnes 73c989
 }
Matthew Barnes 73c989
 
Matthew Barnes 73c989
@@ -815,10 +814,10 @@
Matthew Barnes 73c989
 
Matthew Barnes 73c989
 	for (i = 0; i < store->priv->attendees->len; i++) {
Matthew Barnes 73c989
 		EMeetingAttendee *attendee = g_ptr_array_index (store->priv->attendees, i);
Matthew Barnes 73c989
-		g_object_unref (attendee);
Matthew Barnes 73c989
 
Matthew Barnes 73c989
 		gtk_tree_model_row_deleted (GTK_TREE_MODEL (store), path);
Matthew Barnes 73c989
 		gtk_tree_path_next (path);
Matthew Barnes 73c989
+		g_object_unref (attendee);
Matthew Barnes 73c989
 	}
Matthew Barnes 73c989
 
Matthew Barnes 73c989
 	g_ptr_array_set_size (store->priv->attendees, 0);