aboutsummaryrefslogtreecommitdiffstats
path: root/a11y
diff options
context:
space:
mode:
authorLi Yuan <li.yuan@sun.com>2005-07-19 15:46:05 +0800
committerHarry Lu <haip@src.gnome.org>2005-07-19 15:46:05 +0800
commit12b63ec4ab27fdfea36a419240dcaa29ae80a73e (patch)
tree06da7f82e685c7fce2fd3c972fcee1bae11906e5 /a11y
parent6e70c5e578a2b4fbeddde71de9503eef6c8d88c7 (diff)
downloadgsoc2013-evolution-12b63ec4ab27fdfea36a419240dcaa29ae80a73e.tar.gz
gsoc2013-evolution-12b63ec4ab27fdfea36a419240dcaa29ae80a73e.tar.zst
gsoc2013-evolution-12b63ec4ab27fdfea36a419240dcaa29ae80a73e.zip
Fixes #310136 #310138. The first items of e-table are column-header. So we
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). svn path=/trunk/; revision=29794
Diffstat (limited to 'a11y')
-rw-r--r--a11y/ChangeLog10
-rw-r--r--a11y/e-table/gal-a11y-e-table-item.c14
2 files changed, 17 insertions, 7 deletions
diff --git a/a11y/ChangeLog b/a11y/ChangeLog
index 240d6310f4..0177c5b19b 100644
--- a/a11y/ChangeLog
+++ b/a11y/ChangeLog
@@ -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
diff --git a/a11y/e-table/gal-a11y-e-table-item.c b/a11y/e-table/gal-a11y-e-table-item.c
index b4882d71bb..7f2ceb0190 100644
--- a/a11y/e-table/gal-a11y-e-table-item.c
+++ b/a11y/e-table/gal-a11y-e-table-item.c
@@ -377,7 +377,7 @@ eti_get_index_at (AtkTable *table, gint row, gint column)
if (!item)
return -1;
- return column + row * item->cols;
+ return column + (row + 1) * item->cols;
}
static gint
@@ -401,7 +401,7 @@ eti_get_row_at_index (AtkTable *table, gint index)
if (!item)
return -1;
- return index / item->cols;
+ return index / item->cols - 1;
}
static gint
@@ -425,7 +425,7 @@ eti_get_n_rows (AtkTable *table)
if (!item)
return -1;
- return item->rows + 1;
+ return item->rows;
}
static gint
@@ -688,7 +688,7 @@ eti_rows_inserted (ETableModel * model, int row, int count,
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 @@ eti_rows_deleted (ETableModel * model, int row, int count,
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 @@ eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y)
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 @@ eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y)
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);
}
}
}