Fixed audio tracer
authorEnrico Zini <enrico@enricozini.org>
Mon, 15 Jun 2009 15:50:29 +0000 (23:50 +0800)
committerEnrico Zini <enrico@enricozini.org>
Mon, 15 Jun 2009 15:50:29 +0000 (23:50 +0800)
plugins/55_gpx_trace.py

index d85f41de52708c79a5fbf54531231f6039cf4c9c..7cffc08174fdb47b64d1f3e020ccd81c1416900e 100644 (file)
@@ -88,14 +88,16 @@ class GPXAudioTracer(gtk.ToggleAction):
 
     def start(self):
         zavai.info("GPX trace started")
-        self.registry.resource("gpx").connect("gpx", self)
-        self.gpx.add_activity_monitor(self.on_gpx_activity_changed)
+        gpx = self.registry.resource("gpx")
+        gpx.connect("gpx", self)
+        gpx.add_activity_monitor(self.on_gpx_activity_changed)
 
     def stop(self):
         zavai.info("GPX trace ended")
-        self.registry.resource("gpx").disconnect("gpx", self)
+        gpx = self.registry.resource("gpx")
+        gpx.disconnect("gpx", self)
         self.recorder.stop()
-        self.gpx.del_activity_monitor(self.on_gpx_activity_changed)
+        gpx.del_activity_monitor(self.on_gpx_activity_changed)
 
     def on_gpx_activity_changed(self, gpx, state):
         if state: