mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-30 23:00:21 -04:00
Make auto-convert a question so the user can easily stop it.
This commit is contained in:
parent
9845f5847e
commit
6a88a4989b
@ -19,7 +19,7 @@ from calibre.utils.ipc.job import BaseJob
|
||||
from calibre.devices.scanner import DeviceScanner
|
||||
from calibre.gui2 import config, error_dialog, Dispatcher, dynamic, \
|
||||
pixmap_to_data, warning_dialog, \
|
||||
info_dialog
|
||||
question_dialog
|
||||
from calibre.ebooks.metadata import authors_to_string
|
||||
from calibre import sanitize_file_name, preferred_encoding
|
||||
from calibre.utils.filenames import ascii_filename
|
||||
@ -582,10 +582,10 @@ class DeviceGUI(object):
|
||||
else:
|
||||
autos = [self.library_view.model().db.title(id, index_is_id=True) for id in auto]
|
||||
autos = '\n'.join('%s'%i for i in autos)
|
||||
info_dialog(self, _('No suitable formats'),
|
||||
_('Auto converting the following books before sending via '
|
||||
'email:'), det_msg=autos, show=True)
|
||||
self.auto_convert_mail(to, fmts, delete_from_library, auto, format)
|
||||
if question_dialog(self, _('No suitable formats'),
|
||||
_('Auto convert the following books before sending via '
|
||||
'email?'), det_msg=autos):
|
||||
self.auto_convert_mail(to, fmts, delete_from_library, auto, format)
|
||||
|
||||
if bad:
|
||||
bad = '\n'.join('%s'%(i,) for i in bad)
|
||||
@ -680,10 +680,10 @@ class DeviceGUI(object):
|
||||
if format is not None:
|
||||
autos = [self.library_view.model().db.title(id, index_is_id=True) for id in auto]
|
||||
autos = '\n'.join('%s'%i for i in autos)
|
||||
info_dialog(self, _('No suitable formats'),
|
||||
_('Auto converting the following books before uploading to '
|
||||
'the device:'), det_msg=autos, show=True)
|
||||
self.auto_convert_news(auto, format)
|
||||
if question_dialog(self, _('No suitable formats'),
|
||||
_('Auto convert the following books before uploading to '
|
||||
'the device?'), det_msg=autos):
|
||||
self.auto_convert_news(auto, format)
|
||||
files = [f for f in files if f is not None]
|
||||
if not files:
|
||||
dynamic.set('news_to_be_synced', set([]))
|
||||
@ -792,10 +792,10 @@ class DeviceGUI(object):
|
||||
else:
|
||||
autos = [self.library_view.model().db.title(id, index_is_id=True) for id in auto]
|
||||
autos = '\n'.join('%s'%i for i in autos)
|
||||
info_dialog(self, _('No suitable formats'),
|
||||
_('Auto converting the following books before uploading to '
|
||||
'the device:'), det_msg=autos, show=True)
|
||||
self.auto_convert(auto, on_card, format)
|
||||
if question_dialog(self, _('No suitable formats'),
|
||||
_('Auto convert the following books before uploading to '
|
||||
'the device?'), det_msg=autos):
|
||||
self.auto_convert(auto, on_card, format)
|
||||
|
||||
if bad:
|
||||
bad = '\n'.join('%s'%(i,) for i in bad)
|
||||
|
Loading…
x
Reference in New Issue
Block a user