Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/jarabe/desktop/meshbox.py
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2008-12-16 18:23:54 (GMT)
committer Simon Schampijer <simon@schampijer.de>2008-12-16 18:23:54 (GMT)
commit1b2a2789f459765f66cb81925f6ee9b55fcd00f9 (patch)
tree8a9a457eb4db2e7271bc60dd704a6092a36cb519 /src/jarabe/desktop/meshbox.py
parent383c7c877fff405e7b9df026fab58e60a8f5a9bf (diff)
Only create a keydialog for the activating connection
This fixes the issue when we have already an active connection (wired, another wireless device) and want to authenticate with another AP
Diffstat (limited to 'src/jarabe/desktop/meshbox.py')
-rw-r--r--src/jarabe/desktop/meshbox.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/jarabe/desktop/meshbox.py b/src/jarabe/desktop/meshbox.py
index 43506e2..e650ba7 100644
--- a/src/jarabe/desktop/meshbox.py
+++ b/src/jarabe/desktop/meshbox.py
@@ -647,10 +647,15 @@ class NetworkManagerObserver(object):
for conn_o in active_connections_o:
obj = self._bus.get_object(_NM_IFACE, conn_o)
props = dbus.Interface(obj, 'org.freedesktop.DBus.Properties')
- ap_o = props.Get(_NM_ACTIVE_CONN_IFACE, 'SpecificObject')
-
- ap_view = self._box.access_points[ap_o]
- ap_view.create_keydialog(kwargs['response'])
+ state = props.Get(_NM_ACTIVE_CONN_IFACE, 'State')
+ if state == network.NM_ACTIVE_CONNECTION_STATE_ACTIVATING:
+ ap_o = props.Get(_NM_ACTIVE_CONN_IFACE, 'SpecificObject')
+ if ap_o != '/':
+ ap_view = self._box.access_points[ap_o]
+ ap_view.create_keydialog(kwargs['response'])
+ else:
+ logging.error('Could not determine AP for'
+ ' specific object %s' % conn_o)
def __get_devices_reply_cb(self, devices_o):
for dev_o in devices_o: