From 61f61e3ecd154d3aefc0f1ee227ec6ae0ed6e39e Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Wed, 19 Sep 2001 21:32:14 +0000 Subject: New member `tooltips' in `ETaskWidgetPrivate'. (init): Init to NULL. * e-task-widget.c: New member `tooltips' in `ETaskWidgetPrivate'. (init): Init to NULL. (e_task_widget_construct): Create a GtkTooltips and make `tooltips' point to it. (e_task_widget_update): Set the tooltip for the label too. svn path=/trunk/; revision=12989 --- shell/ChangeLog | 8 ++++++++ shell/e-task-widget.c | 10 ++++++++++ 2 files changed, 18 insertions(+) (limited to 'shell') diff --git a/shell/ChangeLog b/shell/ChangeLog index 913d9a1d83..5c8b140d00 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,11 @@ +2001-09-19 Ettore Perazzoli + + * e-task-widget.c: New member `tooltips' in `ETaskWidgetPrivate'. + (init): Init to NULL. + (e_task_widget_construct): Create a GtkTooltips and make + `tooltips' point to it. + (e_task_widget_update): Set the tooltip for the label too. + 2001-09-19 Ettore Perazzoli * evolution-test-component.c: Removed globals `activity_client', diff --git a/shell/e-task-widget.c b/shell/e-task-widget.c index 877d850578..c3c549668f 100644 --- a/shell/e-task-widget.c +++ b/shell/e-task-widget.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -46,6 +47,8 @@ static GtkEventBoxClass *parent_class = NULL; struct _ETaskWidgetPrivate { char *component_id; + GtkTooltips *tooltips; + GdkPixbuf *icon_pixbuf; GtkWidget *label; GtkWidget *pixmap; @@ -65,6 +68,8 @@ impl_destroy (GtkObject *object) g_free (priv->component_id); + gtk_object_unref (GTK_OBJECT (priv->tooltips)); + gdk_pixbuf_unref (priv->icon_pixbuf); g_free (priv); @@ -89,6 +94,7 @@ init (ETaskWidget *task_widget) priv = g_new (ETaskWidgetPrivate, 1); priv->component_id = NULL; + priv->tooltips = NULL; priv->icon_pixbuf = NULL; priv->label = NULL; priv->pixmap = NULL; @@ -146,6 +152,8 @@ e_task_widget_construct (ETaskWidget *task_widget, gdk_pixmap_unref (pixmap); gdk_bitmap_unref (mask); + priv->tooltips = gtk_tooltips_new (); + e_task_widget_update (task_widget, information, -1.0); } @@ -191,6 +199,8 @@ e_task_widget_update (ETaskWidget *task_widget, gtk_label_set_text (GTK_LABEL (priv->label), text); + gtk_tooltips_set_tip (priv->tooltips, GTK_WIDGET (task_widget), text, NULL); + g_free (text); } -- cgit v1.2.3