Show registration type
authorEnrico Zini <enrico@enricozini.org>
Sat, 27 Mar 2010 15:08:56 +0000 (15:08 +0000)
committerEnrico Zini <enrico@enricozini.org>
Sat, 27 Mar 2010 15:08:56 +0000 (15:08 +0000)
README
src/app_main.vala
src/gsm.vala

diff --git a/README b/README
index 71757eda1a7994ef3f18d431ea13c3fe2160896e..ea9db464989d3a4e5277d8643a8cc4133304a750 100644 (file)
--- a/README
+++ b/README
@@ -177,7 +177,6 @@ TODO list / wish list
  http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/index.html;hb=HEAD
 
 using vala-dbus-binding-tool:
  http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/index.html;hb=HEAD
 
 using vala-dbus-binding-tool:
-
   mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device org.freedesktop.DBus.Introspectable.Introspect > /tmp/api.xml
   vi /tmp/api.xml
   convert to xml: 
   mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device org.freedesktop.DBus.Introspectable.Introspect > /tmp/api.xml
   vi /tmp/api.xml
   convert to xml: 
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 += () => {
 
         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)
             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);
         };
     }
 }
         };
     }
 }
index 19a854da04554e5fb56391cd120b274619e19c41..841b995e042a02d4f5bbdc906c9cb6a6a83bc721 100644 (file)
@@ -133,6 +133,7 @@ public class GSM: zavai.ScriptMonitorService
     protected List<CallInfo> calls;
 
     public string info_provider;
     protected List<CallInfo> calls;
 
     public string info_provider;
+    public string info_registration;
     public int info_signal_strength;
 
     public signal void status_changed(string message);
     public int info_signal_strength;
 
     public signal void status_changed(string message);
@@ -165,7 +166,16 @@ public class GSM: zavai.ScriptMonitorService
             if (info_provider != vprovider.get_string())
             {
                 info_provider = vprovider.get_string();
             if (info_provider != vprovider.get_string())
             {
                 info_provider = vprovider.get_string();
-stderr.printf("ACQUIRE PROV %s\n", info_provider);
+                changed = true;
+            }
+        }
+
+        var vregistration = status.lookup("registration");
+        if (vregistration != null)
+        {
+            if (info_registration != vregistration.get_string())
+            {
+                info_registration = vregistration.get_string();
                 changed = true;
             }
         }
                 changed = true;
             }
         }