From 0400205036f01b8e42271cdd442a15927a06b070 Mon Sep 17 00:00:00 2001 From: Frederic Peters Date: Thu, 26 Mar 2009 21:50:22 +0000 Subject: use new GtkStatusIcon tooltip methods, formatting the header in italics. (requires new GTK+ version, bumped dependency to 2.16.0) (bug #575265) svn path=/trunk/; revision=2745 --- src/empathy-status-icon.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/empathy-status-icon.c b/src/empathy-status-icon.c index 492c37a85..214e31e16 100644 --- a/src/empathy-status-icon.c +++ b/src/empathy-status-icon.c @@ -171,22 +171,18 @@ status_icon_update_tooltip (EmpathyStatusIcon *icon) if (priv->event) { if (priv->event->message != NULL) - tooltip = g_strdup_printf ("%s\n%s", + tooltip = g_strdup_printf ("%s\n%s", priv->event->header, priv->event->message); else - tooltip = g_strdup (priv->event->header); - } - - if (!tooltip) { + tooltip = g_strdup_printf ("%s", + priv->event->header); + gtk_status_icon_set_tooltip_markup (priv->icon, tooltip); + } else { tooltip = g_strdup (empathy_idle_get_status (priv->idle)); + gtk_status_icon_set_tooltip_text (priv->icon, tooltip); } - /* FIXME: when we will depend on GTK+ 2.16.0, we should use - * gtk_status_icon_set_tooltip_markup () and make the header italic. - */ - gtk_status_icon_set_tooltip (priv->icon, tooltip); - g_free (tooltip); } -- cgit v1.2.3