mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -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
|
||||
for child in self.parent().findChildren(QAction):
|
||||
child.blockSignals(True)
|
||||
self.parent().menuBar().setEnabled(False)
|
||||
self.raise_()
|
||||
self.setFocus(Qt.OtherFocusReason)
|
||||
self.pi.startAnimation()
|
||||
|
||||
def stop(self):
|
||||
@ -70,6 +72,7 @@ class BlockingJob(QWidget):
|
||||
self.setVisible(False)
|
||||
for child in self.parent().findChildren(QAction):
|
||||
child.blockSignals(False)
|
||||
self.parent().menuBar().setEnabled(True)
|
||||
|
||||
def job_done(self, callback, job):
|
||||
del job.callback
|
||||
|
Loading…
x
Reference in New Issue
Block a user