#1720 nmclient.Device was not returning the ssid of the active network.

This commit is contained in:
Tomeu Vizoso 2007-07-11 12:40:23 +02:00
parent dde018a63e
commit 0c1a017932
3 changed files with 7 additions and 2 deletions

1
NEWS
View File

@ -1,3 +1,4 @@
* #1720 Show the name of the wireless network to which we are connected. (tomeu)
* #1888 Fix opening items from the clipboard. (tomeu)
* #1984 Fix removing items from the clipboard. (tomeu)

View File

@ -211,7 +211,6 @@ class Device(gobject.GObject):
self._networks = {}
self._caps = 0
self._state = DEVICE_STATE_INACTIVE
self._ssid = None
self._active_network = None
obj = sys_bus.get_object(NM_SERVICE, self._op)
@ -401,7 +400,10 @@ class Device(gobject.GObject):
error_handler=self._get_active_net_error_cb)
def get_ssid(self):
return self._ssid
if self._active_network and self._active_network.is_valid():
return self._active_network.get_ssid()
elif not self._active_network:
return None
def get_type(self):
return self._type

View File

@ -54,6 +54,8 @@ class Device(device.Device):
if pspec.name == 'strength':
return self._nm_device.get_strength()
elif pspec.name == 'name':
import logging
logging.debug('wireless.Device.props.name: %s' % self._nm_device.get_ssid())
return self._nm_device.get_ssid()
elif pspec.name == 'state':
nm_state = self._nm_device.get_state()