Merge branch 'master' of git://git.opendreambox.org/git/acidburn/enigma2-master
authorFelix Domke <tmbinc@elitedvb.net>
Sun, 15 Feb 2009 22:07:02 +0000 (23:07 +0100)
committerFelix Domke <tmbinc@elitedvb.net>
Sun, 15 Feb 2009 22:07:02 +0000 (23:07 +0100)
lib/python/Components/Console.py [changed mode: 0644->0755]
lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py

old mode 100644 (file)
new mode 100755 (executable)
index f1f3fd9..7efdf64
@@ -55,3 +55,8 @@ class Console(object):
                if self.callbacks[name]:
                        self.callbacks[name](data,retval,extra_args)
                del self.callbacks[name]
+
+       def kill(self,name):
+               if self.appContainers.has_key(name):
+                       print "[Console] killing: ",self.appContainers[name]
+                       self.appContainers[name].kill()
index 3215dbce3345fd3bf5cd02ba4d1e1d09e7f37ab5..d8ccd5a5a3a8e3c1a95420efe3b377751da36393 100755 (executable)
@@ -16,6 +16,7 @@ from Components.config import config,getConfigListEntry, ConfigSubsection, Confi
 from Components.Console import Console
 from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmapAlphaTest
 from Components.SelectionList import SelectionList
+from Components.PluginComponent import plugins
 from Tools.Directories import fileExists, resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE
 from Tools.LoadPixmap import LoadPixmap
 from enigma import eTimer, quitMainloop, RT_HALIGN_LEFT, RT_VALIGN_CENTER, eListboxPythonMultiContent, eListbox, gFont
@@ -324,8 +325,8 @@ class PacketManager(Screen):
                self["shortcuts"] = ActionMap(["ShortcutActions", "WizardActions"], 
                {
                        "ok": self.go,
-                       "back": self.close,
-                       "red": self.close,
+                       "back": self.exit,
+                       "red": self.exit,
                        "green": self.reload,
                }, -1)
                
@@ -350,7 +351,15 @@ class PacketManager(Screen):
                self.ipkg.addCallback(self.ipkgCallback)
                self.onShown.append(self.setWindowTitle)
                self.onLayoutFinish.append(self.rebuildList)
-               self.onClose.append(self.cleanup)
+               #self.onClose.append(self.cleanup)
+
+       def exit(self):
+               self.ipkg.stop()
+               if self.Console is not None:
+                       if len(self.Console.appContainers):
+                               for name in self.Console.appContainers.keys():
+                                       self.Console.kill(name)
+               self.close()
 
        def cleanup(self):
                self.ipkg.stop()