mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
...
This commit is contained in:
parent
347c276aa9
commit
f9fbb6e6fc
@ -9,7 +9,7 @@ Logic for setting up conversion jobs
|
|||||||
|
|
||||||
import cPickle, os
|
import cPickle, os
|
||||||
|
|
||||||
from PyQt4.Qt import QDialog, QProgressDialog, QString, QTimer, SIGNAL
|
from PyQt4.Qt import QDialog, QProgressDialog, QString, QTimer
|
||||||
|
|
||||||
from calibre.ptempfile import PersistentTemporaryFile
|
from calibre.ptempfile import PersistentTemporaryFile
|
||||||
from calibre.gui2 import warning_dialog, question_dialog
|
from calibre.gui2 import warning_dialog, question_dialog
|
||||||
@ -125,14 +125,11 @@ class QueueBulk(QProgressDialog):
|
|||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.use_saved_single_settings = use_saved_single_settings
|
self.use_saved_single_settings = use_saved_single_settings
|
||||||
self.i, self.bad, self.jobs, self.changed = 0, [], [], False
|
self.i, self.bad, self.jobs, self.changed = 0, [], [], False
|
||||||
self.timer = QTimer(self)
|
QTimer.singleShot(0, self.do_book)
|
||||||
self.connect(self.timer, SIGNAL('timeout()'), self.do_book)
|
|
||||||
self.timer.start()
|
|
||||||
self.exec_()
|
self.exec_()
|
||||||
|
|
||||||
def do_book(self):
|
def do_book(self):
|
||||||
if self.i >= len(self.book_ids):
|
if self.i >= len(self.book_ids):
|
||||||
self.timer.stop()
|
|
||||||
return self.do_queue()
|
return self.do_queue()
|
||||||
book_id = self.book_ids[self.i]
|
book_id = self.book_ids[self.i]
|
||||||
self.i += 1
|
self.i += 1
|
||||||
@ -191,6 +188,7 @@ class QueueBulk(QProgressDialog):
|
|||||||
self.setValue(self.i)
|
self.setValue(self.i)
|
||||||
except NoSupportedInputFormats:
|
except NoSupportedInputFormats:
|
||||||
self.bad.append(book_id)
|
self.bad.append(book_id)
|
||||||
|
QTimer.singleShot(0, self.do_book)
|
||||||
|
|
||||||
def do_queue(self):
|
def do_queue(self):
|
||||||
self.hide()
|
self.hide()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user