aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-item.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@novell.com>2006-01-13 16:26:45 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2006-01-13 16:26:45 +0800
commitbc8ab923cec3f385e3641dc19278d2ce288d41a7 (patch)
tree549e5982d79cd33231917cf320639b34986f3d64 /widgets/table/e-table-item.c
parent93495d47a0e8d1aaa522b41700f78a9b42595b22 (diff)
downloadgsoc2013-evolution-bc8ab923cec3f385e3641dc19278d2ce288d41a7.tar.gz
gsoc2013-evolution-bc8ab923cec3f385e3641dc19278d2ce288d41a7.tar.zst
gsoc2013-evolution-bc8ab923cec3f385e3641dc19278d2ce288d41a7.zip
Fixes the scroll issue with e-tree.
2006-01-13 Srinivasa Ragavan <sragavan@novell.com> * e-table-item.c: (adjustment_changed), (eti_tree_unfreeze), (eti_realize): Fixes the scroll issue with e-tree. svn path=/trunk/; revision=31157
Diffstat (limited to 'widgets/table/e-table-item.c')
-rw-r--r--widgets/table/e-table-item.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index 9f6ba38709..a3201aa533 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -1664,10 +1664,20 @@ static const char gray50_bits[] = {
static void
adjustment_changed (GtkAdjustment *adjustment, ETableItem *eti)
{
+ /* FIXME: It is the ugliest of hack to set the focus to scroll. Fix this up when moving away from e-tree */
+ if (g_object_get_data ((GObject *) ((GnomeCanvasItem *) eti)->canvas, "freeze-cursor"))
+ eti_maybe_show_cursor (eti, 0);
+
eti_check_cursor_on_screen (eti);
}
static void
+eti_tree_unfreeze (GtkWidget *widget, GdkEvent *event, ETableItem *eti)
+{
+ g_object_set_data (((GnomeCanvasItem *) eti)->canvas, "freeze-cursor", 0);
+}
+
+static void
eti_realize (GnomeCanvasItem *item)
{
ETableItem *eti = E_TABLE_ITEM (item);
@@ -1710,6 +1720,8 @@ eti_realize (GnomeCanvasItem *item)
g_signal_connect (gtk_layout_get_vadjustment(GTK_LAYOUT(item->canvas)), "value_changed",
G_CALLBACK (adjustment_changed), eti);
+ g_signal_connect (GTK_LAYOUT(item->canvas), "scroll_event", G_CALLBACK (eti_tree_unfreeze), eti);
+
if (eti->cell_views == NULL)
eti_attach_cell_views (eti);