From 204b95289276a73ff54a3352c43a829f702602d1 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Mon, 18 Apr 2011 19:23:53 +0100 Subject: [PATCH] Add signal to indicate that the metadata for books on the connected device is available --- src/calibre/gui2/device.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/device.py b/src/calibre/gui2/device.py index 4d4f66eab1..f012028c8a 100644 --- a/src/calibre/gui2/device.py +++ b/src/calibre/gui2/device.py @@ -607,6 +607,8 @@ class DeviceMenu(QMenu): # {{{ class DeviceMixin(object): # {{{ + device_metadata_available = pyqtSignal() + def __init__(self): self.device_error_dialog = error_dialog(self, _('Error'), _('Error communicating with device'), ' ') @@ -791,6 +793,7 @@ class DeviceMixin(object): # {{{ self.sync_news() self.sync_catalogs() self.refresh_ondevice() + self.device_metadata_available.emit() def refresh_ondevice(self, reset_only = False): ''' @@ -892,7 +895,7 @@ class DeviceMixin(object): # {{{ sub_dest_parts.append('') to = sub_dest_parts[0] fmts = sub_dest_parts[1] - subject = ';'.join(sub_dest_parts[2:]) + subject = ';'.join(sub_dest_parts[2:]) fmts = [x.strip().lower() for x in fmts.split(',')] self.send_by_mail(to, fmts, delete, subject=subject)