From e8ab14846b8f723882e374b0f0ad4754fcc395e8 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Wed, 21 Jun 2000 03:17:22 +0000 Subject: Fix cursor column information. 2000-06-20 Christopher James Lahey * e-table-item.c: Fix cursor column information. svn path=/trunk/; revision=3661 --- widgets/e-table/ChangeLog | 4 ++++ widgets/e-table/e-table-item.c | 15 +++++++++------ widgets/table/e-table-item.c | 15 +++++++++------ 3 files changed, 22 insertions(+), 12 deletions(-) (limited to 'widgets') 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,3 +1,7 @@ +2000-06-20 Christopher James Lahey + + * e-table-item.c: Fix cursor column information. + 2000-06-20 Christopher James Lahey * e-table-group-container.c, e-table-group-leaf.c, 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); } } -- cgit v1.2.3