mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Also disable menubar during long jobs
This commit is contained in:
parent
3b146a9b5e
commit
3212e5f2a2
@ -62,7 +62,9 @@ class BlockingJob(QWidget):
|
|||||||
# Prevent any actions from being triggerred by key presses
|
# Prevent any actions from being triggerred by key presses
|
||||||
for child in self.parent().findChildren(QAction):
|
for child in self.parent().findChildren(QAction):
|
||||||
child.blockSignals(True)
|
child.blockSignals(True)
|
||||||
|
self.parent().menuBar().setEnabled(False)
|
||||||
self.raise_()
|
self.raise_()
|
||||||
|
self.setFocus(Qt.OtherFocusReason)
|
||||||
self.pi.startAnimation()
|
self.pi.startAnimation()
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
@ -70,6 +72,7 @@ class BlockingJob(QWidget):
|
|||||||
self.setVisible(False)
|
self.setVisible(False)
|
||||||
for child in self.parent().findChildren(QAction):
|
for child in self.parent().findChildren(QAction):
|
||||||
child.blockSignals(False)
|
child.blockSignals(False)
|
||||||
|
self.parent().menuBar().setEnabled(True)
|
||||||
|
|
||||||
def job_done(self, callback, job):
|
def job_done(self, callback, job):
|
||||||
del job.callback
|
del job.callback
|
||||||
|
Loading…
x
Reference in New Issue
Block a user