Modify reporting method, giving a simple string. Fixed bug on update method
authorjaviplx <javiplx@gmail.com>
Sat, 30 Apr 2011 08:44:51 +0000 (08:44 +0000)
committerjaviplx <javiplx@gmail.com>
Sat, 30 Apr 2011 08:44:51 +0000 (08:44 +0000)
git-svn-id: file:///svnroot/wifihood/branches/cleaning@86 c51dfc6a-5949-4919-9c8e-f207a149c383

wifimap/gps.py

index 0965bfd..4c0cab3 100644 (file)
@@ -21,7 +21,6 @@ class GPSObject ( gobject.GObject ) :
         self.satellites = None
         self.cell_info = None
         self.ngps = 0
-        self.status = None
 
     def set_method ( self , method="gps" ) :
         if method == "agps" :
@@ -60,7 +59,7 @@ class GPSObject ( gobject.GObject ) :
 
     def update ( self ) :
 
-        self.state = None
+        self.gps_state = None
         if self.device.online :
             if self.device.status == location.GPS_DEVICE_STATUS_NO_FIX :
                 self.gps_state = "NO_FIX"
@@ -75,13 +74,8 @@ class GPSObject ( gobject.GObject ) :
             self.satellites = self.device.satellites
             self.cell_info = self.device.cell_info
 
-    def set_infowin ( self , statuswin ) :
-        self.status = statuswin
-
-    def refresh_infowin ( self ) :
-        if self.status :
-            self.status.set_label( "%d gps" % self.ngps )
-
+    def report ( self ) :
+        return "%d gps" % self.ngps
 
 #    mode = device.fix[0]
 #    if mode == location.GPS_DEVICE_MODE_NOT_SEEN : # This means ??