This commit is contained in:
Kovid Goyal 2008-06-24 03:24:11 -07:00
parent 86171e5f60
commit 051ebfc449
2 changed files with 14 additions and 5 deletions

View File

@ -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):

View File

@ -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()