diff options
| author | Fraxinas <andreas.frisch@multimedia-labs.de> | 2011-04-11 18:40:36 +0200 |
|---|---|---|
| committer | ghost <andreas.monzner@multimedia-labs.de> | 2011-09-14 22:58:36 +0200 |
| commit | 9d1c22ed6298d6fa303f7e129d937df06e1bac7d (patch) | |
| tree | cfb2e0d1ad86397ee6319271718a0ff1878b1a81 /lib/python/Screens/TaskView.py | |
| parent | 2d3dfd7793532da77fc3f2cdb2b5bc282703dc15 (diff) | |
| download | enigma2-9d1c22ed6298d6fa303f7e129d937df06e1bac7d.tar.gz enigma2-9d1c22ed6298d6fa303f7e129d937df06e1bac7d.zip | |
[TaskView] upon cancelling waiting jobs, remove them from jobmanager queue all the way
Diffstat (limited to 'lib/python/Screens/TaskView.py')
| -rw-r--r-- | lib/python/Screens/TaskView.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/python/Screens/TaskView.py b/lib/python/Screens/TaskView.py index 6e1b752d..5dd744fa 100644 --- a/lib/python/Screens/TaskView.py +++ b/lib/python/Screens/TaskView.py @@ -2,6 +2,7 @@ from Screen import Screen from Components.ConfigList import ConfigListScreen from Components.config import config, ConfigSubsection, ConfigSelection, getConfigListEntry from Components.SystemInfo import SystemInfo +from Components.Task import job_manager from InfoBarGenerics import InfoBarNotifications import Screens.Standby from Tools import Notifications @@ -108,7 +109,10 @@ class JobView(InfoBarNotifications, Screen, ConfigListScreen): self.close(False) def abort(self): - if self.job.status == self.job.IN_PROGRESS and self["cancelable"].boolean == True: + if self.job.status == self.job.NOT_STARTED: + job_manager.active_jobs.remove(self.job) + self.close(False) + elif self.job.status == self.job.IN_PROGRESS and self["cancelable"].boolean == True: self.job.cancel() else: self.close(False) |
