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_()
|
||||
return
|
||||
if status == 1:
|
||||
error_dialog(gui_parent, _('Cannot kill job'),
|
||||
_('Cannot kill waiting jobs.')).exec_()
|
||||
return
|
||||
self.process_server.kill(job.id)
|
||||
self.update_lock.lock()
|
||||
try:
|
||||
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.reset()
|
||||
if len(self.running_jobs) + len(self.waiting_jobs) == 0:
|
||||
self.emit(SIGNAL('no_more_jobs()'))
|
||||
|
||||
class DetailView(QDialog, Ui_Dialog):
|
||||
|
||||
|
@ -231,7 +231,7 @@ class JobsView(TableView):
|
||||
|
||||
def __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):
|
||||
row = index.row()
|
||||
|
Loading…
x
Reference in New Issue
Block a user