Show registration type
[gregoa/zavai.git] / src / app_main.vala
index 831c632ee8b815a29573e17bf057e0164a3fbe66..c8933c251ef54c7cd699b4f768eb38322e34055b 100644 (file)
@@ -152,11 +152,11 @@ public class Status : Applet
 
         zavai.gsm.gsm.status_changed += (msg) => { gsm_status.set_text(msg); };
         zavai.gsm.gsm.info_changed += () => {
-stderr.printf("NEW INFO %s %d\n", zavai.gsm.gsm.info_provider, zavai.gsm.gsm.info_signal_strength);
+stderr.printf("NEW INFO %s %s %d\n", zavai.gsm.gsm.info_provider, zavai.gsm.gsm.info_registration, zavai.gsm.gsm.info_signal_strength);
+            string text = "%s (%s)".printf(zavai.gsm.gsm.info_provider, zavai.gsm.gsm.info_registration);
             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);
+                text = "%s %d%%".printf(text, zavai.gsm.gsm.info_signal_strength);
+            gsm_info.set_text(text);
         };
     }
 }