Fix up propagation of the state property changes

This commit is contained in:
Marco Pesenti Gritti 2007-02-26 13:20:36 +01:00
parent dd74d030c3
commit 6fadbde8bc
3 changed files with 5 additions and 2 deletions

View File

@ -224,6 +224,7 @@ class Device(gobject.GObject):
if op == active_op:
self.set_active_network(net)
self.emit('network-appeared', net)
def _update_error_cb(self, err):
logging.debug("Device(%s): failed to update. (%s)" % (self._op, err))

View File

@ -90,9 +90,9 @@ class MeshModel(gobject.GObject):
for nm_device in network_manager.get_devices():
self._add_network_device(nm_device)
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)
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):
for nm_network in nm_device.get_networks():
self._add_access_point(nm_device, nm_network)
nm_device.connect('network-appeared',
self._nm_network_appeared_cb)
nm_device.connect('network-disappeared',

View File

@ -43,6 +43,7 @@ class AccessPointView(CanvasIcon):
model.connect('notify::strength', self._strength_changed_cb)
model.connect('notify::name', self._name_changed_cb)
model.connect('notify::state', self._state_changed_cb)
self._update_icon()
self._update_name()