Fix bulk convert queueing dialog becoming very long if any of the books have a very long title. Fixes #1076191 (Conversion progress bar outsizes screen)

This commit is contained in:
Kovid Goyal 2012-11-08 08:58:43 +05:30
parent 6365c9adc6
commit aae48be9f5

View File

@ -196,6 +196,8 @@ class QueueBulk(QProgressDialog):
dtitle = unicode(mi.title)
except:
dtitle = repr(mi.title)
if len(dtitle) > 50:
dtitle = dtitle[:50].rpartition(' ')[0]+'...'
self.setLabelText(_('Queueing ')+dtitle)
desc = _('Convert book %(num)d of %(tot)d (%(title)s)') % dict(
num=self.i, tot=len(self.book_ids), title=dtitle)