Fix strength propagation
This commit is contained in:
@@ -108,6 +108,8 @@ class Network(gobject.GObject):
|
||||
logging.debug("Net(%s): ssid '%s', mode %d, strength %d" % (self._op,
|
||||
self._ssid, self._mode, self._strength))
|
||||
|
||||
self.emit('strength-changed')
|
||||
|
||||
def _update_error_cb(self, err):
|
||||
logging.debug("Net(%s): failed to update. (%s)" % (self._op, err))
|
||||
self._valid = False
|
||||
|
||||
@@ -37,7 +37,7 @@ class AccessPointModel(gobject.GObject):
|
||||
self._strength_changed_cb)
|
||||
|
||||
def _strength_changed_cb(self, nm_network):
|
||||
self.notity('strength')
|
||||
self.notify('strength')
|
||||
|
||||
def get_id(self):
|
||||
return self._nm_network.get_op()
|
||||
|
||||
@@ -15,8 +15,8 @@ class Device(device.Device):
|
||||
self._nm_device.connect('strength-changed',
|
||||
self._strength_changed_cb)
|
||||
|
||||
def _strength_changed_cb(self, nm_device):
|
||||
self.notity('strength')
|
||||
def _strength_changed_cb(self, nm_device, strength):
|
||||
self.notify('strength')
|
||||
|
||||
def do_get_property(self, pspec):
|
||||
if pspec.name == 'strength':
|
||||
|
||||
@@ -31,6 +31,12 @@ class AccessPointView(CanvasIcon):
|
||||
self._model = model
|
||||
|
||||
self.connect('activated', self._activate_cb)
|
||||
|
||||
model.connect('notify::strength', self._strength_changed_cb)
|
||||
|
||||
self._update_icon()
|
||||
|
||||
def _strength_changed_cb(self, model, pspec):
|
||||
self._update_icon()
|
||||
|
||||
def _activate_cb(self, icon):
|
||||
|
||||
Reference in New Issue
Block a user