aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-item.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-04-15 21:03:26 +0800
committerChris Lahey <clahey@src.gnome.org>2001-04-15 21:03:26 +0800
commit61353c59dcb175818ce98d9b4c7706026edbf395 (patch)
treeb9c9d631572c6ab9a1a5e7d1f078b2b5b379c639 /widgets/table/e-table-item.c
parent15541de2db8a7475e33c439e5640d9b89559a176 (diff)
downloadgsoc2013-evolution-61353c59dcb175818ce98d9b4c7706026edbf395.tar
gsoc2013-evolution-61353c59dcb175818ce98d9b4c7706026edbf395.tar.gz
gsoc2013-evolution-61353c59dcb175818ce98d9b4c7706026edbf395.tar.bz2
gsoc2013-evolution-61353c59dcb175818ce98d9b4c7706026edbf395.tar.lz
gsoc2013-evolution-61353c59dcb175818ce98d9b4c7706026edbf395.tar.xz
gsoc2013-evolution-61353c59dcb175818ce98d9b4c7706026edbf395.tar.zst
gsoc2013-evolution-61353c59dcb175818ce98d9b4c7706026edbf395.zip
Set "bold" argument on created tooltip. Adjusted position of displayed
2001-04-15 Christopher James Lahey <clahey@ximian.com> * e-cell-text.c (ect_show_tooltip): Set "bold" argument on created tooltip. Adjusted position of displayed tooltip. * e-cell-tree.c (offset_of_node): Changed it so that this function handles knowing whether on not to indent non expandable first level nodes. This makes things more consistent. * e-table-item.c (eti_realize): Cleaned up the ETableItem code to properly hide tooltips when going off the screen. * e-table-tooltip.h: Added a visibility_count field to ETableTooltip. svn path=/trunk/; revision=9320
Diffstat (limited to 'widgets/table/e-table-item.c')
-rw-r--r--widgets/table/e-table-item.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index 8997ccd610..144500fd47 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -1122,17 +1122,21 @@ eti_init (GnomeCanvasItem *item)
static const char gray50_bits[] = {
0x02, 0x01, };
-#if 0
+#ifdef DO_TOOLTIPS
static gint
eti_visibility_notify(GtkWidget *widget,
GdkEventVisibility *event,
ETableItem *eti)
{
- if (eti->tooltip->window) {
- gtk_widget_destroy (eti->tooltip->window);
- eti->tooltip->window = NULL;
+ if (eti->tooltip->visibility_count > 0) {
+ if (eti->tooltip->window) {
+ gtk_widget_destroy (eti->tooltip->window);
+ eti->tooltip->window = NULL;
+ }
}
+ eti->tooltip->visibility_count ++;
+
return FALSE;
}
#endif
@@ -1143,9 +1147,6 @@ eti_realize (GnomeCanvasItem *item)
ETableItem *eti = E_TABLE_ITEM (item);
GtkWidget *canvas_widget = GTK_WIDGET (item->canvas);
GdkWindow *window;
-#if 0
- GdkEventMask mask;
-#endif
if (GNOME_CANVAS_ITEM_CLASS (eti_parent_class)->realize)
(*GNOME_CANVAS_ITEM_CLASS (eti_parent_class)->realize)(item);
@@ -1175,12 +1176,10 @@ eti_realize (GnomeCanvasItem *item)
gdk_gc_set_stipple (eti->focus_gc, eti->stipple);
gdk_gc_set_fill (eti->focus_gc, GDK_OPAQUE_STIPPLED);
-#if 0
- mask = gtk_widget_get_events(GTK_WIDGET(item->canvas));
- mask |= GDK_VISIBILITY_NOTIFY_MASK;
- gtk_widget_set_events(GTK_WIDGET(item->canvas), mask);
+#ifdef DO_TOOLTIPS
+ gtk_widget_add_events(gtk_widget_get_toplevel(GTK_WIDGET(item->canvas)), GDK_VISIBILITY_NOTIFY_MASK);
- gtk_signal_connect(GTK_OBJECT(item->canvas), "visibility_notify_event",
+ gtk_signal_connect(GTK_OBJECT(gtk_widget_get_toplevel(GTK_WIDGET(item->canvas))), "visibility_notify_event",
GTK_SIGNAL_FUNC(eti_visibility_notify), eti);
#endif
@@ -1603,13 +1602,14 @@ eti_cursor_move_down (ETableItem *eti)
}
#endif
-#if 0
+#ifdef DO_TOOLTIPS
static int
_do_tooltip (ETableItem *eti)
{
ECellView *ecell_view;
int x = 0, y = 0;
int i;
+ int height_extra = eti->horizontal_draw_grid ? 1 : 0;
if (eti->tooltip->window) {
gtk_widget_destroy (eti->tooltip->window);
@@ -1629,6 +1629,8 @@ _do_tooltip (ETableItem *eti)
y += (ETI_ROW_HEIGHT (eti, i) + height_extra);
eti->tooltip->y = y;
eti->tooltip->row_height = ETI_ROW_HEIGHT (eti, i);
+
+ eti->tooltip->visibility_count = 0;
e_cell_show_tooltip (ecell_view,
view_to_model_col (eti, eti->tooltip->col),
@@ -1854,9 +1856,9 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
eti->tooltip->window = NULL;
}
+#ifdef DO_TOOLTIPS
if (eti->tooltip->timer > 0)
gtk_timeout_remove (eti->tooltip->timer);
-#if 0
eti->tooltip->col = col;
eti->tooltip->row = row;
eti->tooltip->cx = e->motion.x;