Merge remote branch 'origin/acid-burn/virtualkeyboard' into experimental
[vuplus_dvbapp] / lib / python / Screens / TaskView.py
index 6e1b752..5dd744f 100644 (file)
@@ -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.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
 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):
                        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)
                        self.job.cancel()
                else:
                        self.close(False)