Fix up propagation of the state property changes
This commit is contained in:
parent
dd74d030c3
commit
6fadbde8bc
@ -224,6 +224,7 @@ class Device(gobject.GObject):
|
|||||||
if op == active_op:
|
if op == active_op:
|
||||||
self.set_active_network(net)
|
self.set_active_network(net)
|
||||||
|
|
||||||
|
self.emit('network-appeared', net)
|
||||||
|
|
||||||
def _update_error_cb(self, err):
|
def _update_error_cb(self, err):
|
||||||
logging.debug("Device(%s): failed to update. (%s)" % (self._op, err))
|
logging.debug("Device(%s): failed to update. (%s)" % (self._op, err))
|
||||||
|
@ -90,9 +90,9 @@ class MeshModel(gobject.GObject):
|
|||||||
for nm_device in network_manager.get_devices():
|
for nm_device in network_manager.get_devices():
|
||||||
self._add_network_device(nm_device)
|
self._add_network_device(nm_device)
|
||||||
network_manager.connect('device-added',
|
network_manager.connect('device-added',
|
||||||
self._nm_device_activated_cb)
|
self._nm_device_added_cb)
|
||||||
|
|
||||||
def _nm_device_activated_cb(self, manager, nm_device):
|
def _nm_device_added_cb(self, manager, nm_device):
|
||||||
self._add_network_device(nm_device)
|
self._add_network_device(nm_device)
|
||||||
|
|
||||||
def _nm_network_appeared_cb(self, nm_device, nm_network):
|
def _nm_network_appeared_cb(self, nm_device, nm_network):
|
||||||
@ -104,6 +104,7 @@ class MeshModel(gobject.GObject):
|
|||||||
def _add_network_device(self, nm_device):
|
def _add_network_device(self, nm_device):
|
||||||
for nm_network in nm_device.get_networks():
|
for nm_network in nm_device.get_networks():
|
||||||
self._add_access_point(nm_device, nm_network)
|
self._add_access_point(nm_device, nm_network)
|
||||||
|
|
||||||
nm_device.connect('network-appeared',
|
nm_device.connect('network-appeared',
|
||||||
self._nm_network_appeared_cb)
|
self._nm_network_appeared_cb)
|
||||||
nm_device.connect('network-disappeared',
|
nm_device.connect('network-disappeared',
|
||||||
|
@ -43,6 +43,7 @@ class AccessPointView(CanvasIcon):
|
|||||||
|
|
||||||
model.connect('notify::strength', self._strength_changed_cb)
|
model.connect('notify::strength', self._strength_changed_cb)
|
||||||
model.connect('notify::name', self._name_changed_cb)
|
model.connect('notify::name', self._name_changed_cb)
|
||||||
|
model.connect('notify::state', self._state_changed_cb)
|
||||||
|
|
||||||
self._update_icon()
|
self._update_icon()
|
||||||
self._update_name()
|
self._update_name()
|
||||||
|
Loading…
Reference in New Issue
Block a user