diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-10-07 01:43:47 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-10-07 01:43:47 +0800 |
commit | 90daf11b95d56e9100f5b5fcaaeb42494ed83e5f (patch) | |
tree | e25f5d871ef954f736b3830cd9358424c03401ad /widgets | |
parent | 3b74bfce983c7dd121bd2a66c2b760dee0ee1625 (diff) | |
download | gsoc2013-evolution-90daf11b95d56e9100f5b5fcaaeb42494ed83e5f.tar.gz gsoc2013-evolution-90daf11b95d56e9100f5b5fcaaeb42494ed83e5f.tar.zst gsoc2013-evolution-90daf11b95d56e9100f5b5fcaaeb42494ed83e5f.zip |
Check that cell views are realized before doing anything here. Fixes
2001-10-06 Christopher James Lahey <clahey@ximian.com>
* e-table-item.c (eti_show_cursor, eti_check_cursor_bounds): Check
that cell views are realized before doing anything here. Fixes
Ximian bug #11919.
(eti_check_cursor_on_screen): If the cursor values are all set to
-1, don't do anything.
svn path=/trunk/; revision=13488
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/table/e-table-item.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index fd51a0407a..dbf4716c5c 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -770,6 +770,9 @@ eti_show_cursor (ETableItem *eti, int delay) { int cursor_row; + if (!((GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED) && eti->cell_views_realized)) + return; + gtk_object_get(GTK_OBJECT(eti->selection), "cursor_row", &cursor_row, NULL); @@ -786,6 +789,12 @@ eti_show_cursor (ETableItem *eti, int delay) static void eti_check_cursor_on_screen (ETableItem *eti) { + if (eti->cursor_x1 == -1 || + eti->cursor_y1 == -1 || + eti->cursor_x2 == -1 || + eti->cursor_y2 == -1) + return; + eti->cursor_on_screen = e_canvas_item_area_shown (GNOME_CANVAS_ITEM(eti), eti->cursor_x1, eti->cursor_y1, @@ -800,6 +809,9 @@ eti_check_cursor_bounds (ETableItem *eti) { int x1, y1, x2, y2; int cursor_row; + + if (!((GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED) && eti->cell_views_realized)) + return; gtk_object_get(GTK_OBJECT(eti->selection), "cursor_row", &cursor_row, |