Add ssid tooltip to the home too. Not working yet.
This commit is contained in:
parent
10bfe004a8
commit
e803f6534f
@ -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]
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user