Add ssid tooltip to the home too. Not working yet.

This commit is contained in:
Marco Pesenti Gritti 2007-02-25 15:24:04 +01:00
parent 10bfe004a8
commit e803f6534f
3 changed files with 13 additions and 1 deletions

View File

@ -218,6 +218,9 @@ class Device(gobject.GObject):
def get_networks(self):
return self._networks.values()
def get_active_network(self):
return self.get_network(self._active_net)
def get_network(self, op):
if self._networks.has_key(op):
return self._networks[op]

View File

@ -27,3 +27,10 @@ class Device(device.Device):
def get_id(self):
return self._nm_device.get_op()
def get_name(self):
active_net = self._nm_device.get_active_network()
if active_net:
return active_net.get_ssid()
else:
return None

View File

@ -5,9 +5,11 @@ class DeviceView(deviceview.DeviceView):
deviceview.DeviceView.__init__(self, model)
self._model = model
self._update_icon()
model.connect('notify::strength', self._strength_changed_cb)
self.props.tooltip = model.get_name()
self._update_icon()
def _strength_changed_cb(self, model, pspec):
self._update_icon()