Update GSM info when turning it off
[gregoa/zavai.git] / src / app_main.vala
index ae1735fceb63cad2ea4aaf8b970a77824736a730..ce1eeaaa7ae6bd41e54d5c71ffbd4fd2b6b7e773 100644 (file)
@@ -152,7 +152,10 @@ public class Status : Applet
 
         zavai.gsm.gsm.status_changed += (msg) => { gsm_status.set_text(msg); };
         zavai.gsm.gsm.info_changed += () => {
-            gsm_info.set_text("%s %d%%".printf(zavai.gsm.gsm.info_provider, zavai.gsm.gsm.info_signal_strength));
+            if (zavai.gsm.gsm.info_signal_strength != -1)
+                gsm_info.set_text("%s %d%%".printf(zavai.gsm.gsm.info_provider, zavai.gsm.gsm.info_signal_strength));
+            else
+                gsm_info.set_text(zavai.gsm.gsm.info_provider);
         };
     }
 }