aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table.c
diff options
context:
space:
mode:
authorLi Yuan <li.yuan@sun.com>2004-11-04 10:10:17 +0800
committerHarry Lu <haip@src.gnome.org>2004-11-04 10:10:17 +0800
commit236a904db32148be27f3d6f14b7ab3a19b745c27 (patch)
tree6b51a23ac3f8133a975d5020466512ddec3acd25 /widgets/table/e-table.c
parent488357c9e175d99d53948ea9f97a21f38995ef42 (diff)
downloadgsoc2013-evolution-236a904db32148be27f3d6f14b7ab3a19b745c27.tar
gsoc2013-evolution-236a904db32148be27f3d6f14b7ab3a19b745c27.tar.gz
gsoc2013-evolution-236a904db32148be27f3d6f14b7ab3a19b745c27.tar.bz2
gsoc2013-evolution-236a904db32148be27f3d6f14b7ab3a19b745c27.tar.lz
gsoc2013-evolution-236a904db32148be27f3d6f14b7ab3a19b745c27.tar.xz
gsoc2013-evolution-236a904db32148be27f3d6f14b7ab3a19b745c27.tar.zst
gsoc2013-evolution-236a904db32148be27f3d6f14b7ab3a19b745c27.zip
if canvas has a focused item but the etable does not have a cursor row,
2004-11-04 Li Yuan <li.yuan@sun.com> * gal/e-table/e-table.c: (table_canvas_focus_event_cb): if canvas has a focused item but the etable does not have a cursor row, just focus the first item. svn path=/trunk/; revision=27828
Diffstat (limited to 'widgets/table/e-table.c')
-rw-r--r--widgets/table/e-table.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 9534230be1..ab836fb372 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -1124,6 +1124,10 @@ table_canvas_focus_event_cb (GtkWidget *widget, GdkEventFocus *event, gpointer d
gnome_canvas_item_grab_focus (etable->click_to_add);
} else if (!canvas->focused_item && etable->group) {
focus_first_etable_item (etable->group);
+ } else if (canvas->focused_item) {
+ ESelectionModel *selection = (ESelectionModel *)etable->selection;
+ if (e_selection_model_cursor_row (selection) == -1)
+ focus_first_etable_item (etable->group);
}
return TRUE;