Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/a11y/ChangeLog,v
retrieving revision 1.41
diff -u -r1.41 ChangeLog
--- ChangeLog	18 Jun 2005 19:03:59 -0000	1.41
+++ ChangeLog	18 Jul 2005 09:45:52 -0000
@@ -1,3 +1,13 @@
+2005-07-18  Li Yuan  <li.yuan@sun.com>
+
+	Fixes #310136 #310138.
+	* e-table/gal-a11y-e-table-item.c: (eti_get_index_at),
+	(eti_get_row_at_index), (eti_get_n_rows), (eti_rows_inserted),
+	(eti_rows_deleted), (eti_header_structure_changed):
+	The first items of e-table are column-header. So we should add
+	number of columns when change (row, col) to index, or subtract
+	when change index to (row, col).
+
 2005-06-18  Tor Lillqvist  <tml@novell.com>
 
 	* Makefile.am
Index: e-table/gal-a11y-e-table-item.c
===================================================================
RCS file: /cvs/gnome/evolution/a11y/e-table/gal-a11y-e-table-item.c,v
retrieving revision 1.21
diff -u -r1.21 gal-a11y-e-table-item.c
--- e-table/gal-a11y-e-table-item.c	23 Jun 2005 09:11:03 -0000	1.21
+++ e-table/gal-a11y-e-table-item.c	18 Jul 2005 09:45:59 -0000
@@ -377,7 +377,7 @@
 	if (!item)
 		return -1;
 
-	return column + row * item->cols;
+	return column + (row + 1) * item->cols;
 }
 
 static gint
@@ -401,7 +401,7 @@
 	if (!item)
 		return -1;
 
-	return index / item->cols;
+	return index / item->cols - 1;
 }
 
 static gint
@@ -425,7 +425,7 @@
 	if (!item)
 		return -1;
 
-	return item->rows + 1;
+	return item->rows;
 }
 
 static gint
@@ -688,7 +688,7 @@
                 for (j = 0; j < n_cols; j ++) {
 			g_signal_emit_by_name (table_item,
 					       "children_changed::add",
-                                               ( (i*n_cols) + j), NULL, NULL);
+                                               ( ((i + 1)*n_cols) + j), NULL, NULL);
 		}
         }
 
@@ -718,7 +718,7 @@
                 for (j = 0; j < n_cols; j ++) {
 			g_signal_emit_by_name (table_item,
 					       "children_changed::remove",
-                                               ( (i*n_cols) + j), NULL, NULL);
+                                               ( ((i + 1)*n_cols) + j), NULL, NULL);
 		}
         }
 	g_signal_emit_by_name (table_item, "visible-data-changed");
@@ -833,7 +833,7 @@
 			if (prev_state[i] == ETI_HEADER_REMOVED) {
 				g_signal_emit_by_name (G_OBJECT(a11y_item), "column-deleted", i, 1);
 				for (j = 0 ; j < n_rows; j ++)
-					g_signal_emit_by_name (G_OBJECT(a11y_item), "children_changed::remove", (j*prev_n_cols+i), NULL, NULL);
+					g_signal_emit_by_name (G_OBJECT(a11y_item), "children_changed::remove", ((j+1)*prev_n_cols+i), NULL, NULL);
 			}
 		}
 	}
@@ -843,7 +843,7 @@
 			if (state[i] == ETI_HEADER_NEW_ADDED) {
 				g_signal_emit_by_name (G_OBJECT(a11y_item), "column-inserted", i, 1);
 				for (j = 0 ; j < n_rows; j ++)
-					g_signal_emit_by_name (G_OBJECT(a11y_item), "children_changed::add", (j*n_cols+i), NULL, NULL);
+					g_signal_emit_by_name (G_OBJECT(a11y_item), "children_changed::add", ((j+1)*n_cols+i), NULL, NULL);
 			}
 		}
 	}
