aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-06-05 21:51:24 +0800
committerChris Lahey <clahey@src.gnome.org>2002-06-05 21:51:24 +0800
commitefb514d63c2a9e66c366d5ffe13b84932581ec18 (patch)
tree73c5cc86d7b49697d2bb370c479c6e485afb3962 /widgets/table
parent54cdc8236b8886bbcb6e0c3f3eb8dafaa082889f (diff)
downloadgsoc2013-evolution-efb514d63c2a9e66c366d5ffe13b84932581ec18.tar
gsoc2013-evolution-efb514d63c2a9e66c366d5ffe13b84932581ec18.tar.gz
gsoc2013-evolution-efb514d63c2a9e66c366d5ffe13b84932581ec18.tar.bz2
gsoc2013-evolution-efb514d63c2a9e66c366d5ffe13b84932581ec18.tar.lz
gsoc2013-evolution-efb514d63c2a9e66c366d5ffe13b84932581ec18.tar.xz
gsoc2013-evolution-efb514d63c2a9e66c366d5ffe13b84932581ec18.tar.zst
gsoc2013-evolution-efb514d63c2a9e66c366d5ffe13b84932581ec18.zip
Made it so that on realize we grab focus if we have the cursor, since
2002-06-05 Christopher James Lahey <clahey@ximian.com> * e-table-item.c (eti_realize): Made it so that on realize we grab focus if we have the cursor, since otherwise, we'll change our selection on focus in. svn path=/trunk/; revision=17115
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-table-item.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index 512586f4d4..86f55aeab2 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -1665,6 +1665,17 @@ eti_realize (GnomeCanvasItem *item)
free_height_cache(eti);
+ if (item->canvas->focused_item == NULL) {
+ int row;
+ row = e_selection_model_cursor_row (E_SELECTION_MODEL (eti->selection));
+ row = model_to_view_row(eti, row);
+ if (row != -1) {
+ e_canvas_item_grab_focus (item, FALSE);
+ eti_show_cursor (eti, 0);
+ eti_check_cursor_bounds (eti);
+ }
+ }
+
eti->needs_compute_height = 1;
eti->needs_compute_width = 1;
e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (eti));