Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/hardware/nmclient.py
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-02-25 10:39:35 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-02-25 10:39:35 (GMT)
commit06e09236879b0fa12b102ebf570fd717000553e9 (patch)
treebc4521ac15bfbd2e09916d1d41dca3377d74eba4 /shell/hardware/nmclient.py
parent6a4170a51e2be4f0f3d2ba45aac19819a9aee7f0 (diff)
First go at access points on the mesh view
Diffstat (limited to 'shell/hardware/nmclient.py')
-rw-r--r--shell/hardware/nmclient.py24
1 files changed, 20 insertions, 4 deletions
diff --git a/shell/hardware/nmclient.py b/shell/hardware/nmclient.py
index 8bd2999..b3b05c8 100644
--- a/shell/hardware/nmclient.py
+++ b/shell/hardware/nmclient.py
@@ -126,10 +126,19 @@ class Network(gobject.GObject):
class Device(gobject.GObject):
__gsignals__ = {
- 'init-failed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])),
- 'activated': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])),
- 'strength-changed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT]))
+ 'init-failed': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE, ([])),
+ 'activated': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE, ([])),
+ 'strength-changed': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([gobject.TYPE_PYOBJECT])),
+ 'network-appeared': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([gobject.TYPE_PYOBJECT])),
+ 'network-disappeared': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE,
+ ([gobject.TYPE_PYOBJECT]))
}
def __init__(self, op):
@@ -195,6 +204,9 @@ class Device(gobject.GObject):
def get_op(self):
return self._op
+ def get_networks(self):
+ return self._networks.values()
+
def get_network(self, op):
if self._networks.has_key(op):
return self._networks[op]
@@ -223,12 +235,16 @@ class Device(gobject.GObject):
net = Network(network)
self._networks[network] = net
net.connect('init-failed', self._net_init_failed)
+ self.emit('network-appeared', net)
def network_disappeared(self, network):
if not self._networks.has_key(network):
return
if network == self._active_net:
self._active_net = None
+
+ self.emit('network-disappeared', self._networks[network])
+
del self._networks[network]
def get_active(self):