From 6fadbde8bc5f7b0d706ad684ee2f7bcee275b1b9 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Mon, 26 Feb 2007 13:20:36 +0100 Subject: [PATCH] Fix up propagation of the state property changes --- shell/hardware/nmclient.py | 1 + shell/model/MeshModel.py | 5 +++-- shell/view/home/MeshBox.py | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/shell/hardware/nmclient.py b/shell/hardware/nmclient.py index 3bcc4332..1be01ed8 100644 --- a/shell/hardware/nmclient.py +++ b/shell/hardware/nmclient.py @@ -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)) diff --git a/shell/model/MeshModel.py b/shell/model/MeshModel.py index c6247a89..17c071d2 100644 --- a/shell/model/MeshModel.py +++ b/shell/model/MeshModel.py @@ -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', diff --git a/shell/view/home/MeshBox.py b/shell/view/home/MeshBox.py index 2618c805..d7f7b8b2 100644 --- a/shell/view/home/MeshBox.py +++ b/shell/view/home/MeshBox.py @@ -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()