From ec3a371c49617b26655fe6575a36ae308d57dc59 Mon Sep 17 00:00:00 2001
From: Alexandre Savard <alexandresavard@alexandresavard-desktop.(none)>
Date: Wed, 7 Apr 2010 11:00:33 -0400
Subject: [PATCH] [#3143] Set tooltip text StatusIcon only if systray icon is
 activated

---
 sflphone-client-gnome/src/statusicon.c | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/sflphone-client-gnome/src/statusicon.c b/sflphone-client-gnome/src/statusicon.c
index 7f74f6f066..adeae9ac91 100644
--- a/sflphone-client-gnome/src/statusicon.c
+++ b/sflphone-client-gnome/src/statusicon.c
@@ -182,13 +182,20 @@ statusicon_set_tooltip()
   int count;
   gchar *tip;
 
-  // Add a tooltip to the system tray icon
-  count = account_list_get_registered_accounts();
-  tip = g_markup_printf_escaped("%s - %s", _("SFLphone"),
-      g_markup_printf_escaped(
-          n_("%i active account", "%i active accounts", count), count));
-  gtk_status_icon_set_tooltip(status, tip);
-  g_free(tip);
+  DEBUG("statusicon_set_tooltip 1");
+
+  if(status) {
+
+    // Add a tooltip to the system tray icon
+    count = account_list_get_registered_accounts();
+    tip = g_markup_printf_escaped("%s - %s", _("SFLphone"),
+        g_markup_printf_escaped(n_("%i active account", "%i active accounts", count), count));
+    gtk_status_icon_set_tooltip(status, tip);
+    g_free(tip);
+
+  }
+
+  DEBUG("statusicon_set_tooltip 2");
 }
 
 void
-- 
GitLab