aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shell/ChangeLog8
-rw-r--r--shell/e-task-widget.c10
2 files changed, 18 insertions, 0 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 913d9a1d83..5c8b140d00 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,13 @@
2001-09-19 Ettore Perazzoli <ettore@ximian.com>
+ * 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 <ettore@ximian.com>
+
* evolution-test-component.c: Removed globals `activity_client',
`progress'.
(timeout_callback_3): Get the activity client from @data.
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 <gtk/gtkhbox.h>
#include <gtk/gtklabel.h>
#include <gtk/gtkpixmap.h>
+#include <gtk/gtktooltips.h>
#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
@@ -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);
}