[empathy] status_icon_update_tooltip: display the custom status msg, if any (#604481)



commit 50f96722448f152b8bfe0c24501c4b1eb0136359
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Wed Dec 23 15:53:15 2009 +0000

    status_icon_update_tooltip: display the custom status msg, if any (#604481)

 src/empathy-status-icon.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/empathy-status-icon.c b/src/empathy-status-icon.c
index b755559..c6acb03 100644
--- a/src/empathy-status-icon.c
+++ b/src/empathy-status-icon.c
@@ -224,12 +224,20 @@ status_icon_update_tooltip (EmpathyStatusIcon *icon)
 		g_free (tooltip);
 	} else {
 		TpConnectionPresenceType type;
+		gchar *msg;
 
 		type = tp_account_manager_get_most_available_presence (
-			priv->account_manager, NULL, NULL);
+			priv->account_manager, NULL, &msg);
+
+		if (!EMP_STR_EMPTY (msg)) {
+			gtk_status_icon_set_tooltip_text (priv->icon, msg);
+		}
+		else {
+			gtk_status_icon_set_tooltip_text (priv->icon,
+						empathy_presence_get_default_message (type));
+		}
 
-		gtk_status_icon_set_tooltip_text (priv->icon,
-					empathy_presence_get_default_message (type));
+		g_free (msg);
 	}
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]