[TaskView] fix cancel of waiting (not yet started) jobs
authorFraxinas <andreas.frisch@multimedia-labs.de>
Mon, 11 Apr 2011 16:01:00 +0000 (18:01 +0200)
committerFraxinas <andreas.frisch@multimedia-labs.de>
Mon, 11 Apr 2011 16:01:00 +0000 (18:01 +0200)
lib/python/Screens/TaskView.py

index 660fb27..6e1b752 100644 (file)
@@ -108,10 +108,10 @@ class JobView(InfoBarNotifications, Screen, ConfigListScreen):
                        self.close(False)
 
        def abort(self):
-               if self.job.status in (self.job.FINISHED, self.job.FAILED):
-                       self.close(False)
-               if self["cancelable"].boolean == True:
+               if self.job.status == self.job.IN_PROGRESS and self["cancelable"].boolean == True:
                        self.job.cancel()
+               else:
+                       self.close(False)
 
        def performAfterEvent(self):
                self["config"].hide()