From 3e44a8a3c4268a401f4a2869ee4b8a806d23c51a Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 23 Dec 2009 15:45:33 +0000 Subject: status_icon_update_tooltip: display a translated version of the default status string --- src/empathy-status-icon.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/empathy-status-icon.c') diff --git a/src/empathy-status-icon.c b/src/empathy-status-icon.c index b137daf72..b7555598d 100644 --- a/src/empathy-status-icon.c +++ b/src/empathy-status-icon.c @@ -209,9 +209,10 @@ static void status_icon_update_tooltip (EmpathyStatusIcon *icon) { EmpathyStatusIconPriv *priv = GET_PRIV (icon); - gchar *tooltip = NULL; if (priv->event) { + gchar *tooltip = NULL; + if (priv->event->message != NULL) tooltip = g_markup_printf_escaped ("%s\n%s", priv->event->header, @@ -220,13 +221,16 @@ status_icon_update_tooltip (EmpathyStatusIcon *icon) tooltip = g_markup_printf_escaped ("%s", priv->event->header); gtk_status_icon_set_tooltip_markup (priv->icon, tooltip); + g_free (tooltip); } else { - tp_account_manager_get_most_available_presence ( - priv->account_manager, &tooltip, NULL); - gtk_status_icon_set_tooltip_text (priv->icon, tooltip); - } + TpConnectionPresenceType type; - g_free (tooltip); + type = tp_account_manager_get_most_available_presence ( + priv->account_manager, NULL, NULL); + + gtk_status_icon_set_tooltip_text (priv->icon, + empathy_presence_get_default_message (type)); + } } static void -- cgit v1.2.3