From 83a86e0ea1b6ce3f990552f0d0d599a04ef6411d Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 29 Mar 2007 15:01:46 -0400 Subject: [PATCH] Add a 'device activating' signal --- shell/hardware/nmclient.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shell/hardware/nmclient.py b/shell/hardware/nmclient.py index 7691e722..d1178f25 100644 --- a/shell/hardware/nmclient.py +++ b/shell/hardware/nmclient.py @@ -390,6 +390,9 @@ class NMClient(gobject.GObject): 'device-activated' : (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([gobject.TYPE_PYOBJECT])), + 'device-activating': (gobject.SIGNAL_RUN_FIRST, + gobject.TYPE_NONE, + ([gobject.TYPE_PYOBJECT])), 'device-removed' : (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([gobject.TYPE_PYOBJECT])) @@ -454,7 +457,9 @@ class NMClient(gobject.GObject): op = dev.get_op() if not self._devices.has_key(op) or not dev.is_valid(): return - if dev.get_state() != DEVICE_STATE_INACTIVE: + if dev.get_state() == DEVICE_STATE_ACTIVATING: + self.emit('device-activating', dev) + elif dev.get_state() == DEVICE_STATE_ACTIVATED: self.emit('device-activated', dev) def get_device(self, dev_op):