mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add signal to indicate that the metadata for books on the connected device is available
This commit is contained in:
parent
b368790f13
commit
204b952892
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user