]> git.0d.be Git - empathy.git/commitdiff
status_icon_update_tooltip: display the custom status msg, if any (#604481)
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 23 Dec 2009 15:53:15 +0000 (15:53 +0000)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 24 Dec 2009 09:44:55 +0000 (09:44 +0000)
src/empathy-status-icon.c

index b7555598d5cca9795e22afc5b2505a9d772f82f3..c6acb033f24f92a6b5d5c0c4fc8dfd5b744d76c9 100644 (file)
@@ -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);
        }
 }