base: drop the separate function for bluez updates
A lambda does the job here without increasing the class profile
This commit is contained in:
parent
08e3ec532e
commit
92a9628adf
|
@ -309,8 +309,10 @@ class Tuhi(GObject.Object):
|
||||||
for dev in self.bluez.devices:
|
for dev in self.bluez.devices:
|
||||||
self._add_device(self.bluez, dev)
|
self._add_device(self.bluez, dev)
|
||||||
|
|
||||||
self.bluez.connect('device-added', self._on_bluez_device_updated)
|
self.bluez.connect('device-added',
|
||||||
self.bluez.connect('device-updated', self._on_bluez_device_updated)
|
lambda mgr, dev: self._add_device(mgr, dev, True))
|
||||||
|
self.bluez.connect('device-updated',
|
||||||
|
lambda mgr, dev: self._add_device(mgr, dev, True))
|
||||||
|
|
||||||
def _on_tuhi_bus_name_lost(self, dbus_server):
|
def _on_tuhi_bus_name_lost(self, dbus_server):
|
||||||
self.mainloop.quit()
|
self.mainloop.quit()
|
||||||
|
@ -401,9 +403,6 @@ class Tuhi(GObject.Object):
|
||||||
elif d.listening:
|
elif d.listening:
|
||||||
d.listen()
|
d.listen()
|
||||||
|
|
||||||
def _on_bluez_device_updated(self, manager, bluez_device):
|
|
||||||
self._add_device(manager, bluez_device, True)
|
|
||||||
|
|
||||||
def _on_listening_updated(self, tuhi_dbus_device, pspec):
|
def _on_listening_updated(self, tuhi_dbus_device, pspec):
|
||||||
listen = self._search_stop_handler is not None
|
listen = self._search_stop_handler is not None
|
||||||
for dev in self.devices.values():
|
for dev in self.devices.values():
|
||||||
|
|
Loading…
Reference in New Issue