mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #815
This commit is contained in:
parent
86171e5f60
commit
051ebfc449
@ -381,10 +381,19 @@ class JobManager(QAbstractTableModel):
|
|||||||
_('Cannot kill already completed jobs.')).exec_()
|
_('Cannot kill already completed jobs.')).exec_()
|
||||||
return
|
return
|
||||||
if status == 1:
|
if status == 1:
|
||||||
error_dialog(gui_parent, _('Cannot kill job'),
|
self.update_lock.lock()
|
||||||
_('Cannot kill waiting jobs.')).exec_()
|
try:
|
||||||
return
|
self.waiting_jobs.remove(job)
|
||||||
|
self.finished_jobs.append(job)
|
||||||
|
self.emit(SIGNAL('job_done(int)'), job.id)
|
||||||
|
job.result = self.process_server.KILL_RESULT
|
||||||
|
finally:
|
||||||
|
self.update_lock.unlock()
|
||||||
|
else:
|
||||||
self.process_server.kill(job.id)
|
self.process_server.kill(job.id)
|
||||||
|
self.reset()
|
||||||
|
if len(self.running_jobs) + len(self.waiting_jobs) == 0:
|
||||||
|
self.emit(SIGNAL('no_more_jobs()'))
|
||||||
|
|
||||||
class DetailView(QDialog, Ui_Dialog):
|
class DetailView(QDialog, Ui_Dialog):
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ class JobsView(TableView):
|
|||||||
|
|
||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
TableView.__init__(self, parent)
|
TableView.__init__(self, parent)
|
||||||
self.connect(self, SIGNAL('activated(QModelIndex)'), self.show_details)
|
self.connect(self, SIGNAL('doubleClicked(QModelIndex)'), self.show_details)
|
||||||
|
|
||||||
def show_details(self, index):
|
def show_details(self, index):
|
||||||
row = index.row()
|
row = index.row()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user