]> git.0d.be Git - empathy.git/commitdiff
Adapt the status icon message to the new API.
authorXavier Claessens <xclaesse@src.gnome.org>
Fri, 30 Jan 2009 17:07:00 +0000 (17:07 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Fri, 30 Jan 2009 17:07:00 +0000 (17:07 +0000)
svn path=/trunk/; revision=2275

src/empathy-status-icon.c

index bb96e65e5226e2ed5b348d5884da63b58d04caaf..738b7b92695c2521130438922bc4935390d25a7e 100644 (file)
@@ -126,17 +126,24 @@ static void
 status_icon_update_tooltip (EmpathyStatusIcon *icon)
 {
        EmpathyStatusIconPriv *priv = GET_PRIV (icon);
-       const gchar           *tooltip = NULL;
+       gchar                 *tooltip = NULL;
 
        if (priv->event) {
-               tooltip = priv->event->message;
+               tooltip = g_strdup_printf ("%s\n%s",
+                                          priv->event->header,
+                                          priv->event->message);
        }
 
        if (!tooltip) {
-               tooltip = empathy_idle_get_status (priv->idle);
+               tooltip = g_strdup (empathy_idle_get_status (priv->idle));
        }
 
-       gtk_status_icon_set_tooltip (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);
 }
 
 static void