Infer object name from 'name' property
[gregoa/zavai.git] / plugins / 50_sat_monitor.py
index 8f82d1f49ea3bafd2d5d53595e374354ac1178dd..41be4b0bf4a0b5787664f51344211b25d59c8965 100644 (file)
@@ -33,8 +33,10 @@ SAT_QI_NAMES = {
 }
 
 class SatelliteMonitor(zavai.Applet):
-    def __init__(self, registry, name, **kw):
-        super(SatelliteMonitor, self).__init__(registry, name, _("Satellite monitor"))
+    def __init__(self, registry, **kw):
+        super(SatelliteMonitor, self).__init__(registry,
+                "menu.main.gps.satellite_monitor",
+                _("Satellite monitor"))
 
         self.gps = None
 
@@ -100,5 +102,4 @@ class SatelliteMonitor(zavai.Applet):
                 qi])
 
 def init(conf = None, registry = None, **kw):
-    name = "menu.main.gps.satellite_monitor"
-    registry.register(name, SatelliteMonitor(registry, name))
+    registry.register(SatelliteMonitor(registry))