kete: handle Listening property changes correctly

Previously the assumption was that any change in that property is only from
True to False
pull/34/head
Peter Hutterer 2018-01-25 15:44:02 +10:00
parent ab385bd981
commit 6ad127da3a
1 changed files with 5 additions and 0 deletions

View File

@ -148,6 +148,8 @@ class TuhiKeteDevice(_DBusObject):
if 'DrawingsAvailable' in changed_props:
self.notify('drawings-available')
elif 'Listening' in changed_props:
self.notify('listening')
def __repr__(self):
return '{} - {}'.format(self.address, self.name)
@ -348,6 +350,9 @@ class Listener(GObject.Object):
raise e
def _on_device_listening(self, device, pspec):
if self.device.listening:
return
logger.info('{}: Listening stopped, exiting'.format(device))
self.manager.quit()