EmpathyStatusIcon *icon)
{
EmpathyStatusIconPriv *priv = GET_PRIV (icon);
- int reason = 1;
+ EmpathyNotificationClosedReason reason = 0;
#ifdef notify_notification_get_closed_reason
reason = notify_notification_get_closed_reason (notification);
/* the notification has been closed by the user, see the
* DesktopNotification spec.
*/
- if (reason == NOTIFICATION_CLOSED_DISMISSED) {
+ if (reason == EMPATHY_NOTIFICATION_CLOSED_DISMISSED) {
/* use an idle here, as this callback is called from a
* DBus signal handler inside libnotify, and we might call
* a *_run_* method when activating the event.
gchar *tooltip = NULL;
if (priv->event) {
- tooltip = g_strdup_printf ("%s\n%s",
- priv->event->header,
- priv->event->message);
- }
-
- if (!tooltip) {
+ if (priv->event->message != NULL)
+ tooltip = g_strdup_printf ("<i>%s</i>\n%s",
+ priv->event->header,
+ priv->event->message);
+ else
+ tooltip = g_strdup_printf ("<i>%s</i>",
+ 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);
}
priv->window = g_object_ref (window);
- g_signal_connect (priv->window, "key-press-event",
+ g_signal_connect_after (priv->window, "key-press-event",
G_CALLBACK (status_icon_key_press_event_cb),
icon);