Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar

This commit is contained in:
Marco Pesenti Gritti 2007-07-11 12:35:34 +02:00
commit 85cac7c071
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) * #1888 Fix opening items from the clipboard. (tomeu)
* #1984 Fix removing 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._networks = {}
self._caps = 0 self._caps = 0
self._state = DEVICE_STATE_INACTIVE self._state = DEVICE_STATE_INACTIVE
self._ssid = None
self._active_network = None self._active_network = None
obj = sys_bus.get_object(NM_SERVICE, self._op) 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) error_handler=self._get_active_net_error_cb)
def get_ssid(self): 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): def get_type(self):
return self._type return self._type

View File

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