mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Do not display conversion error messages when minimized to tray
This commit is contained in:
parent
b1785e31d2
commit
573bd09555
@ -437,12 +437,14 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, # {{{
|
||||
def job_exception(self, job):
|
||||
if not hasattr(self, '_modeless_dialogs'):
|
||||
self._modeless_dialogs = []
|
||||
minz = self.is_minimized_to_tray
|
||||
if self.isVisible():
|
||||
for x in list(self._modeless_dialogs):
|
||||
if not x.isVisible():
|
||||
self._modeless_dialogs.remove(x)
|
||||
try:
|
||||
if 'calibre.ebooks.DRMError' in job.details:
|
||||
if not minz:
|
||||
d = error_dialog(self, _('Conversion Error'),
|
||||
_('<p>Could not convert: %s<p>It is a '
|
||||
'<a href="%s">DRM</a>ed book. You must first remove the '
|
||||
@ -454,6 +456,7 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, # {{{
|
||||
self._modeless_dialogs.append(d)
|
||||
return
|
||||
if 'calibre.web.feeds.input.RecipeDisabled' in job.details:
|
||||
if not minz:
|
||||
msg = job.details
|
||||
msg = msg[msg.find('calibre.web.feeds.input.RecipeDisabled:'):]
|
||||
msg = msg.partition(':')[-1]
|
||||
@ -471,6 +474,7 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, # {{{
|
||||
prints(job.details, file=sys.stderr)
|
||||
except:
|
||||
pass
|
||||
if not minz:
|
||||
d = error_dialog(self, _('Conversion Error'),
|
||||
_('<b>Failed</b>')+': '+unicode(job.description),
|
||||
det_msg=job.details)
|
||||
|
Loading…
x
Reference in New Issue
Block a user