diff options
-rw-r--r-- | widgets/e-table/ChangeLog | 4 | ||||
-rw-r--r-- | widgets/e-table/e-table-item.c | 15 | ||||
-rw-r--r-- | widgets/table/e-table-item.c | 15 |
3 files changed, 22 insertions, 12 deletions
diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog index 59463dc319..e575f1068f 100644 --- a/widgets/e-table/ChangeLog +++ b/widgets/e-table/ChangeLog @@ -1,5 +1,9 @@ 2000-06-20 Christopher James Lahey <clahey@helixcode.com> + * e-table-item.c: Fix cursor column information. + +2000-06-20 Christopher James Lahey <clahey@helixcode.com> + * e-table-group-container.c, e-table-group-leaf.c, e-table-group.c, e-table-group.h: Removed the unfocus method since that's handled by the canvas itself now. diff --git a/widgets/e-table/e-table-item.c b/widgets/e-table/e-table-item.c index e385d97181..8f0adc29d8 100644 --- a/widgets/e-table/e-table-item.c +++ b/widgets/e-table/e-table-item.c @@ -1562,10 +1562,12 @@ e_table_item_focus (ETableItem *eti, int col, int row) col = eti->cols - 1; } - eti->cursor_col = col; - if (row != -1) { - e_canvas_item_set_cursor(GNOME_CANVAS_ITEM(eti), (gpointer) row); + int *nums; + nums = g_new(int, 2); + nums[0] = row; + nums[1] = col; + e_canvas_item_set_cursor(GNOME_CANVAS_ITEM(eti), nums); } } @@ -1623,8 +1625,9 @@ e_table_item_select_row (ETableItem *eti, int row) static void eti_selection (GnomeCanvasItem *item, int flags, gpointer data) { - int row = (int) data; - int col = 0; + int *nums = data; + int row = nums[0]; + int col = nums[1]; ETableItem *eti = E_TABLE_ITEM(item); int selected = e_table_item_is_row_selected(eti, row); int cursored = (row == eti->cursor_row); @@ -1649,7 +1652,7 @@ eti_selection (GnomeCanvasItem *item, int flags, gpointer data) eti->cursor_col = -1; } if (flags & E_CANVAS_ITEM_SELECTION_DELETE_DATA) { - + g_free(data); } } diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index e385d97181..8f0adc29d8 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -1562,10 +1562,12 @@ e_table_item_focus (ETableItem *eti, int col, int row) col = eti->cols - 1; } - eti->cursor_col = col; - if (row != -1) { - e_canvas_item_set_cursor(GNOME_CANVAS_ITEM(eti), (gpointer) row); + int *nums; + nums = g_new(int, 2); + nums[0] = row; + nums[1] = col; + e_canvas_item_set_cursor(GNOME_CANVAS_ITEM(eti), nums); } } @@ -1623,8 +1625,9 @@ e_table_item_select_row (ETableItem *eti, int row) static void eti_selection (GnomeCanvasItem *item, int flags, gpointer data) { - int row = (int) data; - int col = 0; + int *nums = data; + int row = nums[0]; + int col = nums[1]; ETableItem *eti = E_TABLE_ITEM(item); int selected = e_table_item_is_row_selected(eti, row); int cursored = (row == eti->cursor_row); @@ -1649,7 +1652,7 @@ eti_selection (GnomeCanvasItem *item, int flags, gpointer data) eti->cursor_col = -1; } if (flags & E_CANVAS_ITEM_SELECTION_DELETE_DATA) { - + g_free(data); } } |