remove non working wrapper class to add a (unneeded) .get() call to
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Tue, 28 Oct 2008 19:52:04 +0000 (19:52 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Tue, 28 Oct 2008 19:52:04 +0000 (19:52 +0000)
eConsoleAppContainers.. so now all external plugins must remove this .get()
calls...
example:
cont = eConsoleAppContainer()
cont.appClosed.append(cb_func) # old was
cont.appClosed.get().append(cb_func)

13 files changed:
lib/base/console.cpp
lib/python/Components/Console.py
lib/python/Components/DreamInfoHandler.py
lib/python/Components/Ipkg.py
lib/python/Components/Network.py
lib/python/Components/Task.py
lib/python/Plugins/Extensions/DVDBurn/Process.py
lib/python/Plugins/Extensions/TuxboxPlugins/pluginrunner.py
lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py
lib/python/Plugins/SystemPlugins/NFIFlash/flasher.py
lib/python/Screens/Console.py
lib/python/Screens/PluginBrowser.py
lib/python/Screens/ScanSetup.py

index 9204bcca3520fd39820ac4596751308022f4ca61..830855fc9433df0f3604becebea4e1a1f5661493 100644 (file)
@@ -333,152 +333,6 @@ struct eConsolePy
        PyObject *in_weakreflist; /* List of weak references */
 };
 
        PyObject *in_weakreflist; /* List of weak references */
 };
 
-#define COMPATIBILITY_MODE
-// with COMPATIBILITY_MODE enabled the callback list is accessed via console.appClosed.get()
-// we remove this code after next enigma2 release... then the list should be accessed via console.appClosed ( without .get() )
-
-#ifdef COMPATIBILITY_MODE
-struct eListCompatibilityWrapper
-{
-       PyObject_HEAD
-       PyObject *list;
-       PyObject *in_weakreflist; /* List of weak references */
-};
-
-static int
-eListCompatibilityWrapper_traverse(eListCompatibilityWrapper *self, visitproc visit, void *arg)
-{
-       Py_VISIT(self->list);
-       return 0;
-}
-
-static int
-eListCompatibilityWrapper_clear(eListCompatibilityWrapper *self)
-{
-       Py_CLEAR(self->list);
-       return 0;
-}
-
-static void
-eListCompatibilityWrapper_dealloc(eListCompatibilityWrapper* self)
-{
-       if (self->in_weakreflist != NULL)
-               PyObject_ClearWeakRefs((PyObject *) self);
-       eListCompatibilityWrapper_clear(self);
-       Org_Py_DECREF(self->list);
-       self->ob_type->tp_free((PyObject*)self);
-}
-
-static PyObject *
-eListCompatibilityWrapper_get(eListCompatibilityWrapper *self, void *closure)
-{
-       Org_Py_INCREF(self->list);
-       return self->list;
-}
-
-static PyMethodDef eListCompatibilityWrapper_methods[] = {
-       {"get", (PyCFunction)eListCompatibilityWrapper_get, METH_NOARGS,
-        "returns the list"
-       },
-       {NULL}  /* Sentinel */
-};
-
-static PyGetSetDef eListCompatibilityWrapper_getseters[] = {
-       {NULL} /* Sentinel */
-};
-
-static PyTypeObject eListCompatibilityWrapperType = {
-       PyObject_HEAD_INIT(NULL)
-       0, /*ob_size*/
-       "eConsoleImpl.eListCompatibilityWrapper", /*tp_name*/
-       sizeof(eListCompatibilityWrapper), /*tp_basicsize*/
-       0, /*tp_itemsize*/
-       (destructor)eListCompatibilityWrapper_dealloc, /*tp_dealloc*/
-       0, /*tp_print*/
-       0, /*tp_getattr*/
-       0, /*tp_setattr*/
-       0, /*tp_compare*/
-       0, /*tp_repr*/
-       0, /*tp_as_number*/
-       0, /*tp_as_sequence*/
-       0, /*tp_as_mapping*/
-       0, /*tp_hash */
-       0, /*tp_call*/
-       0, /*tp_str*/
-       0, /*tp_getattro*/
-       0, /*tp_setattro*/
-       0, /*tp_as_buffer*/
-       Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-       "eListCompatibilityWrapper objects", /* tp_doc */
-       (traverseproc)eListCompatibilityWrapper_traverse, /* tp_traverse */
-       (inquiry)eListCompatibilityWrapper_clear, /* tp_clear */
-       0, /* tp_richcompare */
-       offsetof(eListCompatibilityWrapper, in_weakreflist), /* tp_weaklistoffset */
-       0, /* tp_iter */
-       0, /* tp_iternext */
-       eListCompatibilityWrapper_methods, /* tp_methods */
-       0, /* tp_members */
-       eListCompatibilityWrapper_getseters, /* tp_getset */
-       0, /* tp_base */
-       0, /* tp_dict */
-       0, /* tp_descr_get */
-       0, /* tp_descr_set */
-       0, /* tp_dictoffset */
-       0, /* tp_init */
-       0, /* tp_alloc */
-       0, /* tp_new */
-};
-
-static PyObject *
-eConsolePy_dataAvail(eConsolePy *self, void *closure)
-{
-       eListCompatibilityWrapper *wrapper = (eListCompatibilityWrapper *)eListCompatibilityWrapperType.tp_alloc(&eListCompatibilityWrapperType, 0);
-       Org_Py_INCREF((PyObject*)wrapper);
-       wrapper->list = self->cont->dataAvail.get();
-       wrapper->in_weakreflist = NULL;
-       return (PyObject*)wrapper;
-}
-
-static PyObject *
-eConsolePy_stdoutAvail(eConsolePy *self, void *closure)
-{
-       eListCompatibilityWrapper *wrapper = (eListCompatibilityWrapper *)eListCompatibilityWrapperType.tp_alloc(&eListCompatibilityWrapperType, 0);
-       Org_Py_INCREF((PyObject*)wrapper);
-       wrapper->list = self->cont->stdoutAvail.get();
-       wrapper->in_weakreflist = NULL;
-       return (PyObject*)wrapper;
-}
-
-static PyObject *
-eConsolePy_stderrAvail(eConsolePy *self, void *closure)
-{
-       eListCompatibilityWrapper *wrapper = (eListCompatibilityWrapper *)eListCompatibilityWrapperType.tp_alloc(&eListCompatibilityWrapperType, 0);
-       Org_Py_INCREF((PyObject*)wrapper);
-       wrapper->list = self->cont->stderrAvail.get();
-       wrapper->in_weakreflist = NULL;
-       return (PyObject*)wrapper;
-}
-
-static PyObject *
-eConsolePy_dataSent(eConsolePy *self, void *closure)
-{
-       eListCompatibilityWrapper *wrapper = (eListCompatibilityWrapper *)eListCompatibilityWrapperType.tp_alloc(&eListCompatibilityWrapperType, 0);
-       Org_Py_INCREF((PyObject*)wrapper);
-       wrapper->list = self->cont->dataSent.get();
-       wrapper->in_weakreflist = NULL;
-       return (PyObject*)wrapper;
-}
-
-static PyObject *
-eConsolePy_appClosed(eConsolePy *self, void *closure)
-{
-       eListCompatibilityWrapper *wrapper = (eListCompatibilityWrapper *)eListCompatibilityWrapperType.tp_alloc(&eListCompatibilityWrapperType, 0);
-       Org_Py_INCREF((PyObject*)wrapper);
-       wrapper->list = self->cont->appClosed.get();
-       wrapper->in_weakreflist = NULL;
-       return (PyObject*)wrapper;
-}
-#else
 static PyObject *
 eConsolePy_dataAvail(eConsolePy *self, void *closure)
 {
 static PyObject *
 eConsolePy_dataAvail(eConsolePy *self, void *closure)
 {
@@ -508,7 +362,6 @@ eConsolePy_appClosed(eConsolePy *self, void *closure)
 {
        return self->cont->appClosed.get();
 }
 {
        return self->cont->appClosed.get();
 }
-#endif
 
 static PyGetSetDef eConsolePy_getseters[] = {
        {"dataAvail",
 
 static PyGetSetDef eConsolePy_getseters[] = {
        {"dataAvail",
@@ -828,13 +681,6 @@ void eConsoleInit(void)
        if (m == NULL)
                return;
 
        if (m == NULL)
                return;
 
-#ifdef COMPATIBILITY_MODE
-       if (!PyType_Ready(&eListCompatibilityWrapperType))
-       {
-               Org_Py_INCREF((PyObject*)&eListCompatibilityWrapperType);
-               PyModule_AddObject(m, "eListCompatibilityWrapper", (PyObject*)&eListCompatibilityWrapperType);
-       }
-#endif
        if (!PyType_Ready(&eConsolePyType))
        {
                Org_Py_INCREF((PyObject*)&eConsolePyType);
        if (!PyType_Ready(&eConsolePyType))
        {
                Org_Py_INCREF((PyObject*)&eConsolePyType);
index 45da72f2a20601ff40eee32757df15e724cc2f43..c451eba79914e1acc43d94deec25e2166862e40f 100644 (file)
@@ -19,8 +19,8 @@ class Console(object):
                self.extra_args[name] = extra_args
                self.callbacks[name] = callback
                self.appContainers[name] = eConsoleAppContainer()
                self.extra_args[name] = extra_args
                self.callbacks[name] = callback
                self.appContainers[name] = eConsoleAppContainer()
-               self.appContainers[name].dataAvail.get().append(boundFunction(self.dataAvailCB,name))
-               self.appContainers[name].appClosed.get().append(boundFunction(self.finishedCB,name))
+               self.appContainers[name].dataAvail.append(boundFunction(self.dataAvailCB,name))
+               self.appContainers[name].appClosed.append(boundFunction(self.finishedCB,name))
                retval = self.appContainers[name].execute(cmd)
                if retval:
                        self.finishedCB(name, retval)
                retval = self.appContainers[name].execute(cmd)
                if retval:
                        self.finishedCB(name, retval)
@@ -29,8 +29,8 @@ class Console(object):
                self.appResults[name] += data
 
        def finishedCB(self, name, retval):
                self.appResults[name] += data
 
        def finishedCB(self, name, retval):
-               del self.appContainers[name].dataAvail.get()[:]
-               del self.appContainers[name].appClosed.get()[:]
+               del self.appContainers[name].dataAvail[:]
+               del self.appContainers[name].appClosed[:]
                data = self.appResults[name]
                extra_args = self.extra_args[name]
                del self.appContainers[name]
                data = self.appResults[name]
                extra_args = self.extra_args[name]
                del self.appContainers[name]
index 900a2180d94337508cb49318949cee11610f48c5..c5f82629998b8b6aee907aebdcfffb2600243674 100644 (file)
@@ -110,7 +110,7 @@ class DreamInfoHandler:
                self.currentlyInstallingMetaIndex = None
                
                self.console = eConsoleAppContainer()
                self.currentlyInstallingMetaIndex = None
                
                self.console = eConsoleAppContainer()
-               self.console.appClosed.get().append(self.installNext)
+               self.console.appClosed.append(self.installNext)
                self.reloadFavourites = False
                
                self.statusCallback = statusCallback
                self.reloadFavourites = False
                
                self.statusCallback = statusCallback
index 79389b4df0ee30aa99bd03845ab87cf966e2b298..31889bcf0ecae0532c004f1a1b1c0404b7f1d96e 100644 (file)
@@ -31,8 +31,8 @@ class IpkgComponent:
                
        def runCmd(self, cmd):
                print "executing", self.ipkg, cmd
                
        def runCmd(self, cmd):
                print "executing", self.ipkg, cmd
-               self.cmd.appClosed.get().append(self.cmdFinished)
-               self.cmd.dataAvail.get().append(self.cmdData)
+               self.cmd.appClosed.append(self.cmdFinished)
+               self.cmd.dataAvail.append(self.cmdData)
                if self.cmd.execute(self.ipkg + " " + cmd):
                        self.cmdFinished(-1)
 
                if self.cmd.execute(self.ipkg + " " + cmd):
                        self.cmdFinished(-1)
 
@@ -56,8 +56,8 @@ class IpkgComponent:
        
        def cmdFinished(self, retval):
                self.callCallbacks(self.EVENT_DONE)
        
        def cmdFinished(self, retval):
                self.callCallbacks(self.EVENT_DONE)
-               self.cmd.appClosed.get().remove(self.cmdFinished)
-               self.cmd.dataAvail.get().remove(self.cmdData)
+               self.cmd.appClosed.remove(self.cmdFinished)
+               self.cmd.dataAvail.remove(self.cmdData)
 
        def cmdData(self, data):
                print "data:", data
 
        def cmdData(self, data):
                print "data:", data
index ecc547875883d0df162cf06a3a655ff61f9c0edf..9b0898e0279a0b3b7c0e2e33b0f4b76f4871081a 100644 (file)
@@ -332,13 +332,13 @@ class Network:
        def getLinkState(self,iface,callback):
                self.dataAvail = callback
                cmd = self.ethtool_bin + " " + iface
        def getLinkState(self,iface,callback):
                self.dataAvail = callback
                cmd = self.ethtool_bin + " " + iface
-               self.container.appClosed.get().append(self.cmdFinished)
-               self.container.dataAvail.get().append(callback)
+               self.container.appClosed.append(self.cmdFinished)
+               self.container.dataAvail.append(callback)
                self.container.execute(cmd)
 
        def cmdFinished(self,retval):
                self.container.execute(cmd)
 
        def cmdFinished(self,retval):
-               self.container.appClosed.get().remove(self.cmdFinished)
-               self.container.dataAvail.get().remove(self.dataAvail)
+               self.container.appClosed.remove(self.cmdFinished)
+               self.container.dataAvail.remove(self.dataAvail)
 
        def stopContainer(self):
                self.container.kill()
 
        def stopContainer(self):
                self.container.kill()
index 022ca1f14d90076fc32d5a126353b9c8cbbfe66a..7ea64f1afa1b1bf0d31beb63cad2b7705b23ec0e 100644 (file)
@@ -162,9 +162,9 @@ class Task(object):
                self.task_progress_changed = task_progress_changed
                from enigma import eConsoleAppContainer
                self.container = eConsoleAppContainer()
                self.task_progress_changed = task_progress_changed
                from enigma import eConsoleAppContainer
                self.container = eConsoleAppContainer()
-               self.container.appClosed.get().append(self.processFinished)
-               self.container.stdoutAvail.get().append(self.processStdout)
-               self.container.stderrAvail.get().append(self.processStderr)
+               self.container.appClosed.append(self.processFinished)
+               self.container.stdoutAvail.append(self.processStdout)
+               self.container.stderrAvail.append(self.processStderr)
 
                assert self.cmd is not None
                assert len(self.args) >= 1
 
                assert self.cmd is not None
                assert len(self.args) >= 1
index 2123b3763deeeceb2bc016ca890e493d0549130f..f54fcb00a5979bc6872524185bea3d5235ce6cc8 100644 (file)
@@ -12,7 +12,7 @@ class png2yuvTask(Task):
 
        def run(self, callback, task_progress_changed):
                Task.run(self, callback, task_progress_changed)
 
        def run(self, callback, task_progress_changed):
                Task.run(self, callback, task_progress_changed)
-               self.container.stdoutAvail.get().remove(self.processStdout)
+               self.container.stdoutAvail.remove(self.processStdout)
                self.container.dumpToFile(self.dumpFile)
 
        def processStderr(self, data):
                self.container.dumpToFile(self.dumpFile)
 
        def processStderr(self, data):
@@ -44,7 +44,7 @@ class spumuxTask(Task):
 
        def run(self, callback, task_progress_changed):
                Task.run(self, callback, task_progress_changed)
 
        def run(self, callback, task_progress_changed):
                Task.run(self, callback, task_progress_changed)
-               self.container.stdoutAvail.get().remove(self.processStdout)
+               self.container.stdoutAvail.remove(self.processStdout)
                self.container.dumpToFile(self.dumpFile)
                self.container.readFromFile(self.inputFile)
 
                self.container.dumpToFile(self.dumpFile)
                self.container.readFromFile(self.inputFile)
 
index 71f935cd4fca4ed16f5795653f3a299eac73a693..c8b0b383fea86f1edaaa2c6e839f8f5e72608f99 100644 (file)
@@ -10,7 +10,7 @@ class PluginRunner(Screen):
                self.skin = PluginRunner.skin
                Screen.__init__(self, session)
                self.container = eConsoleAppContainer()
                self.skin = PluginRunner.skin
                Screen.__init__(self, session)
                self.container = eConsoleAppContainer()
-               self.container.appClosed.get().append(self.finishedExecution)
+               self.container.appClosed.append(self.finishedExecution)
                self.runPlugin(pluginname)
                
        def runPlugin(self, pluginname):
                self.runPlugin(pluginname)
                
        def runPlugin(self, pluginname):
index 01b9bb9e3c0b45a5eb36c649cbcac516205b10ad..c2046af7cb3f02a741bda0afebe3ae2f8833caf6 100644 (file)
@@ -405,10 +405,10 @@ class NFIDownload(Screen):
                                md5 = self.nfo[pos+5:pos+5+32] + "  " + self.nfilocal
                                print cmd, md5
                                self.download_container.setCWD(self["destlist"].getCurrentDirectory())
                                md5 = self.nfo[pos+5:pos+5+32] + "  " + self.nfilocal
                                print cmd, md5
                                self.download_container.setCWD(self["destlist"].getCurrentDirectory())
-                               self.download_container.appClosed.get().append(self.md5finished)
+                               self.download_container.appClosed.append(self.md5finished)
                                self.download_container.execute(cmd)
                                self.download_container.write(md5)
                                self.download_container.execute(cmd)
                                self.download_container.write(md5)
-                               self.download_container.dataSent.get().append(self.md5ready)
+                               self.download_container.dataSent.append(self.md5ready)
                        else:
                                self["statusbar"].text = "Download completed."
                                self.downloading(False)
                        else:
                                self["statusbar"].text = "Download completed."
                                self.downloading(False)
@@ -421,7 +421,7 @@ class NFIDownload(Screen):
 
        def md5finished(self, retval):
                print "[md5finished]: " + str(retval)
 
        def md5finished(self, retval):
                print "[md5finished]: " + str(retval)
-               self.download_container.appClosed.get().remove(self.md5finished)
+               self.download_container.appClosed.remove(self.md5finished)
                if retval==0:
                        self["statusbar"].text = _(".NFI file passed md5sum signature check. You can safely flash this image!")
                        self.switchList(self.LIST_SOURCE)
                if retval==0:
                        self["statusbar"].text = _(".NFI file passed md5sum signature check. You can safely flash this image!")
                        self.switchList(self.LIST_SOURCE)
@@ -471,8 +471,8 @@ class NFIDownload(Screen):
        def flasherdownload_finished(self, string=""):
                print "[flasherdownload_finished] " + str(string)       
                self.container = eConsoleAppContainer()
        def flasherdownload_finished(self, string=""):
                print "[flasherdownload_finished] " + str(string)       
                self.container = eConsoleAppContainer()
-               self.container.appClosed.get().append(self.umount_finished)
-               self.container.dataAvail.get().append(self.tool_avail)
+               self.container.appClosed.append(self.umount_finished)
+               self.container.dataAvail.append(self.tool_avail)
                self.taskstring = ""
                umountdevs = ""
                from os import listdir
                self.taskstring = ""
                umountdevs = ""
                from os import listdir
@@ -488,18 +488,18 @@ class NFIDownload(Screen):
                self.taskstring += string
 
        def umount_finished(self, retval):
                self.taskstring += string
 
        def umount_finished(self, retval):
-               self.container.appClosed.get().remove(self.umount_finished)
+               self.container.appClosed.remove(self.umount_finished)
                self.session.openWithCallback(self.dmesg_clear, MessageBox, _("To make sure you intend to do this, please remove the target USB stick now and stick it back in upon prompt. Press OK when you have taken the stick out."), MessageBox.TYPE_INFO)
 
        def dmesg_clear(self, answer):
                self.session.openWithCallback(self.dmesg_clear, MessageBox, _("To make sure you intend to do this, please remove the target USB stick now and stick it back in upon prompt. Press OK when you have taken the stick out."), MessageBox.TYPE_INFO)
 
        def dmesg_clear(self, answer):
-               self.container.appClosed.get().append(self.dmesg_cleared)
+               self.container.appClosed.append(self.dmesg_cleared)
                self.taskstring = ""
                self.cmd = "dmesg -c"
                print "executing " + self.cmd
                self.container.execute(self.cmd)
 
        def dmesg_cleared(self, retval):
                self.taskstring = ""
                self.cmd = "dmesg -c"
                print "executing " + self.cmd
                self.container.execute(self.cmd)
 
        def dmesg_cleared(self, retval):
-               self.container.appClosed.get().remove(self.dmesg_cleared)
+               self.container.appClosed.remove(self.dmesg_cleared)
                self.session.openWithCallback(self.stick_back_in, MessageBox, (_("Now please insert the USB stick (minimum size is 64 MB) that you want to format and use as .NFI image flasher. Press OK after you've put the stick back in.")), MessageBox.TYPE_INFO)
 
        def stick_back_in(self, answer):
                self.session.openWithCallback(self.stick_back_in, MessageBox, (_("Now please insert the USB stick (minimum size is 64 MB) that you want to format and use as .NFI image flasher. Press OK after you've put the stick back in.")), MessageBox.TYPE_INFO)
 
        def stick_back_in(self, answer):
@@ -516,14 +516,14 @@ class NFIDownload(Screen):
                self["job_progresslabel"].text = "-%d s" % (6-self.delayCount)
                if self.delayCount > 5:
                        self.delayTimer.stop()
                self["job_progresslabel"].text = "-%d s" % (6-self.delayCount)
                if self.delayCount > 5:
                        self.delayTimer.stop()
-                       self.container.appClosed.get().append(self.dmesg_scanned)
+                       self.container.appClosed.append(self.dmesg_scanned)
                        self.taskstring = ""
                        self.cmd = "dmesg"
                        print "executing " + self.cmd
                        self.container.execute(self.cmd)
 
        def dmesg_scanned(self, retval):
                        self.taskstring = ""
                        self.cmd = "dmesg"
                        print "executing " + self.cmd
                        self.container.execute(self.cmd)
 
        def dmesg_scanned(self, retval):
-               self.container.appClosed.get().remove(self.dmesg_scanned)
+               self.container.appClosed.remove(self.dmesg_scanned)
                dmesg_lines = self.taskstring.splitlines()
                self.devicetext = None
                self.stickdevice = None
                dmesg_lines = self.taskstring.splitlines()
                self.devicetext = None
                self.stickdevice = None
@@ -545,7 +545,7 @@ class NFIDownload(Screen):
                        self["job_progressbar"].value = 100
                        self["job_progresslabel"].text = "5.00%"
                        self.taskstring = ""
                        self["job_progressbar"].value = 100
                        self["job_progresslabel"].text = "5.00%"
                        self.taskstring = ""
-                       self.container.appClosed.get().append(self.fdisk_finished)
+                       self.container.appClosed.append(self.fdisk_finished)
                        self.container.execute("fdisk " + self.stickdevice + "/disc")
                        self.container.write("d\nn\np\n1\n\n\nt\n6\nw\n")
                        self.delayTimer = eTimer()
                        self.container.execute("fdisk " + self.stickdevice + "/disc")
                        self.container.write("d\nn\np\n1\n\n\nt\n6\nw\n")
                        self.delayTimer = eTimer()
@@ -555,7 +555,7 @@ class NFIDownload(Screen):
                        self.remove_img(True)
 
        def fdisk_finished(self, retval):
                        self.remove_img(True)
 
        def fdisk_finished(self, retval):
-               self.container.appClosed.get().remove(self.fdisk_finished)
+               self.container.appClosed.remove(self.fdisk_finished)
                self.delayTimer.stop()
                if retval == 0:
                        if fileExists(self.imagefilename):
                self.delayTimer.stop()
                if retval == 0:
                        if fileExists(self.imagefilename):
@@ -564,7 +564,7 @@ class NFIDownload(Screen):
                        else:
                                self["statusbar"].text = _("Decompressing USB stick flasher boot image...")
                                self.taskstring = ""
                        else:
                                self["statusbar"].text = _("Decompressing USB stick flasher boot image...")
                                self.taskstring = ""
-                               self.container.appClosed.get().append(self.tar_finished)
+                               self.container.appClosed.append(self.tar_finished)
                                self.container.setCWD("/tmp")
                                self.cmd = "tar -xjvf nfiflasher_image.tar.bz2"
                                self.container.execute(self.cmd)
                                self.container.setCWD("/tmp")
                                self.cmd = "tar -xjvf nfiflasher_image.tar.bz2"
                                self.container.execute(self.cmd)
@@ -584,13 +584,13 @@ class NFIDownload(Screen):
 
        def tar_finished(self, retval):
                self.delayTimer.stop()
 
        def tar_finished(self, retval):
                self.delayTimer.stop()
-               if len(self.container.appClosed.get()) > 0:
-                       self.container.appClosed.get().remove(self.tar_finished)
+               if len(self.container.appClosed) > 0:
+                       self.container.appClosed.remove(self.tar_finished)
                if retval == 0:
                        self.imagefilename = "/tmp/nfiflash_" + self.box + ".img"
                        self["statusbar"].text = _("Copying USB flasher boot image to stick...")
                        self.taskstring = ""
                if retval == 0:
                        self.imagefilename = "/tmp/nfiflash_" + self.box + ".img"
                        self["statusbar"].text = _("Copying USB flasher boot image to stick...")
                        self.taskstring = ""
-                       self.container.appClosed.get().append(self.dd_finished)
+                       self.container.appClosed.append(self.dd_finished)
                        self.cmd = "dd if=%s of=%s" % (self.imagefilename,self.stickdevice+"/part1")
                        self.container.execute(self.cmd)
                        print "executing " + self.cmd
                        self.cmd = "dd if=%s of=%s" % (self.imagefilename,self.stickdevice+"/part1")
                        self.container.execute(self.cmd)
                        print "executing " + self.cmd
@@ -602,14 +602,14 @@ class NFIDownload(Screen):
 
        def dd_finished(self, retval):
                self.delayTimer.stop()
 
        def dd_finished(self, retval):
                self.delayTimer.stop()
-               self.container.appClosed.get().remove(self.dd_finished)
+               self.container.appClosed.remove(self.dd_finished)
                self.downloading(False)
                if retval == 0:
                        self["job_progressbar"].value = 950
                        self["job_progresslabel"].text = "95.00%"
                        self["statusbar"].text = _("Remounting stick partition...")
                        self.taskstring = ""
                self.downloading(False)
                if retval == 0:
                        self["job_progressbar"].value = 950
                        self["job_progresslabel"].text = "95.00%"
                        self["statusbar"].text = _("Remounting stick partition...")
                        self.taskstring = ""
-                       self.container.appClosed.get().append(self.mount_finished)
+                       self.container.appClosed.append(self.mount_finished)
                        self.cmd = "mount %s /mnt/usb -o rw,sync" % (self.stickdevice+"/part1")
                        self.container.execute(self.cmd)
                        print "executing " + self.cmd
                        self.cmd = "mount %s /mnt/usb -o rw,sync" % (self.stickdevice+"/part1")
                        self.container.execute(self.cmd)
                        print "executing " + self.cmd
@@ -617,8 +617,8 @@ class NFIDownload(Screen):
                        self.session.openWithCallback(self.remove_img, MessageBox, (self.cmd + " " + _("failed") + ":\n" + str(self.taskstring)), MessageBox.TYPE_ERROR)
 
        def mount_finished(self, retval):
                        self.session.openWithCallback(self.remove_img, MessageBox, (self.cmd + " " + _("failed") + ":\n" + str(self.taskstring)), MessageBox.TYPE_ERROR)
 
        def mount_finished(self, retval):
-               self.container.dataAvail.get().remove(self.tool_avail)
-               self.container.appClosed.get().remove(self.mount_finished)
+               self.container.dataAvail.remove(self.tool_avail)
+               self.container.appClosed.remove(self.mount_finished)
                if retval == 0:
                        self["job_progressbar"].value = 1000
                        self["job_progresslabel"].text = "100.00%"
                if retval == 0:
                        self["job_progressbar"].value = 1000
                        self["job_progresslabel"].text = "100.00%"
index 6fad1ac6114f5f0f848007109095bc11a660fd5e..6a982c5869e7331b23d811b45d2cf2096cfbc59e 100644 (file)
@@ -178,8 +178,8 @@ class NFIFlash(Screen):
                                self.session.summary.setText(_("Please wait for md5 signature verification..."))
                                self.container = eConsoleAppContainer()
                                self.container.setCWD(self["filelist"].getCurrentDirectory())
                                self.session.summary.setText(_("Please wait for md5 signature verification..."))
                                self.container = eConsoleAppContainer()
                                self.container.setCWD(self["filelist"].getCurrentDirectory())
-                               self.container.appClosed.get().append(self.md5finished)
-                               self.container.dataSent.get().append(self.md5ready)
+                               self.container.appClosed.append(self.md5finished)
+                               self.container.dataSent.append(self.md5ready)
                                self.container.execute("md5sum -cw -")
                                self.container.write(self.md5sum)
                        else:
                                self.container.execute("md5sum -cw -")
                                self.container.write(self.md5sum)
                        else:
index 0ceba3ec106808ee290055040aa0fb43127a65ef..b57f2400a5c21013928dad42715d7a1f2a9c5556 100644 (file)
@@ -33,8 +33,8 @@ class Console(Screen):
                
                self.container = eConsoleAppContainer()
                self.run = 0
                
                self.container = eConsoleAppContainer()
                self.run = 0
-               self.container.appClosed.get().append(self.runFinished)
-               self.container.dataAvail.get().append(self.dataAvail)
+               self.container.appClosed.append(self.runFinished)
+               self.container.dataAvail.append(self.dataAvail)
                self.onLayoutFinish.append(self.startRun) # dont start before gui is finished
 
        def updateTitle(self):
                self.onLayoutFinish.append(self.startRun) # dont start before gui is finished
 
        def updateTitle(self):
@@ -63,8 +63,8 @@ class Console(Screen):
        def cancel(self):
                if self.run == len(self.cmdlist):
                        self.close()
        def cancel(self):
                if self.run == len(self.cmdlist):
                        self.close()
-                       self.container.appClosed.get().remove(self.runFinished)
-                       self.container.dataAvail.get().remove(self.dataAvail)
+                       self.container.appClosed.remove(self.runFinished)
+                       self.container.dataAvail.remove(self.dataAvail)
 
        def dataAvail(self, str):
                self["text"].setText(self["text"].getText() + str)
 
        def dataAvail(self, str):
                self["text"].setText(self["text"].getText() + str)
index 3ffdbaf951ed85e63af98f3ba0d6d95a049a729b..520d6d7a4b7bc9527c8d0dc7d6f0d5994add86b7 100644 (file)
@@ -74,8 +74,8 @@ class PluginDownloadBrowser(Screen):
                self.type = type
                
                self.container = eConsoleAppContainer()
                self.type = type
                
                self.container = eConsoleAppContainer()
-               self.container.appClosed.get().append(self.runFinished)
-               self.container.dataAvail.get().append(self.dataAvail)
+               self.container.appClosed.append(self.runFinished)
+               self.container.dataAvail.append(self.dataAvail)
                self.onLayoutFinish.append(self.startRun)
                self.onShown.append(self.setWindowTitle)
                
                self.onLayoutFinish.append(self.startRun)
                self.onShown.append(self.setWindowTitle)
                
@@ -141,8 +141,8 @@ class PluginDownloadBrowser(Screen):
                
        def installFinished(self):
                plugins.readPluginList(resolveFilename(SCOPE_PLUGINS))
                
        def installFinished(self):
                plugins.readPluginList(resolveFilename(SCOPE_PLUGINS))
-               self.container.appClosed.get().remove(self.runFinished)
-               self.container.dataAvail.get().remove(self.dataAvail)
+               self.container.appClosed.remove(self.runFinished)
+               self.container.dataAvail.remove(self.dataAvail)
                self.close()
 
        def runFinished(self, retval):
                self.close()
 
        def runFinished(self, retval):
index eb7cc510a0c665d3bade47d689983fca672ab9b4..ab110a24027470017725d33b2be7013afb7b551f 100644 (file)
@@ -160,8 +160,8 @@ class CableTransponderSearchSupport:
 
        def cableTransponderSearchSessionClosed(self, *val):
                print "cableTransponderSearchSessionClosed, val", val
 
        def cableTransponderSearchSessionClosed(self, *val):
                print "cableTransponderSearchSessionClosed, val", val
-               self.cable_search_container.appClosed.get().remove(self.cableTransponderSearchClosed)
-               self.cable_search_container.dataAvail.get().remove(self.getCableTransponderData)
+               self.cable_search_container.appClosed.remove(self.cableTransponderSearchClosed)
+               self.cable_search_container.dataAvail.remove(self.getCableTransponderData)
                self.cable_search_container = None
                self.cable_search_session = None
                if val and len(val) and val[0]:
                self.cable_search_container = None
                self.cable_search_session = None
                if val and len(val) and val[0]:
@@ -207,8 +207,8 @@ class CableTransponderSearchSupport:
                                        return
                self.__tlist = [ ]
                self.cable_search_container = eConsoleAppContainer()
                                        return
                self.__tlist = [ ]
                self.cable_search_container = eConsoleAppContainer()
-               self.cable_search_container.appClosed.get().append(self.cableTransponderSearchClosed)
-               self.cable_search_container.dataAvail.get().append(self.getCableTransponderData)
+               self.cable_search_container.appClosed.append(self.cableTransponderSearchClosed)
+               self.cable_search_container.dataAvail.append(self.getCableTransponderData)
                cableConfig = config.Nims[nim_idx].cable
                cmd = "tda1002x --init --scan --verbose --wakeup --inv 2 --bus "
                #FIXMEEEEEE hardcoded i2c devices for dm7025 and dm8000
                cableConfig = config.Nims[nim_idx].cable
                cmd = "tda1002x --init --scan --verbose --wakeup --inv 2 --bus "
                #FIXMEEEEEE hardcoded i2c devices for dm7025 and dm8000