some changes for new default skin
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 14 Sep 2007 22:11:19 +0000 (22:11 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 14 Sep 2007 22:11:19 +0000 (22:11 +0000)
data/no_coverArt.png
lib/components/scan.cpp
lib/components/scan.h
lib/dvb/scan.cpp
lib/dvb/scan.h
lib/python/Components/ServiceScan.py
lib/python/Components/Sources/FrontendStatus.py
lib/python/Plugins/SystemPlugins/Satfinder/plugin.py
lib/python/Screens/ServiceScan.py
lib/python/enigma_python.i

index 4de7011..e69de29 100644 (file)
Binary files a/data/no_coverArt.png and b/data/no_coverArt.png differ
index 2870388..79fe2ef 100644 (file)
@@ -114,6 +114,14 @@ int eComponentScan::start(int feid, int flags)
        return 0;
 }
 
+RESULT eComponentScan::getFrontend(ePtr<iDVBFrontend> &fe)
+{
+       if (m_scan)
+               return m_scan->getFrontend(fe);
+       fe = 0;
+       return -1;
+}
+
 int eComponentScan::getProgress()
 {
        if (!m_scan)
index fb6b921..e4bb41e 100644 (file)
@@ -46,7 +46,8 @@ public:
        
                /* please keep the flags in sync with lib/dvb/scan.h ! */
        enum { scanNetworkSearch=1, scanRemoveServices=4, scanDontRemoveFeeds=8, clearToScanOnFirstNIT = 16 };
-       int start(int feid, int flags=0);
+       int start(int feid, int flags=0 );
+       SWIG_VOID(RESULT) getFrontend(ePtr<iDVBFrontend> &SWIG_OUTPUT);
 };
 
 #endif
index e2bf621..3915a0c 100644 (file)
@@ -775,3 +775,11 @@ void eDVBScan::getLastServiceName(std::string &last_service_name)
        else
                last_service_name = m_last_service->second->m_service_name;
 }
+
+RESULT eDVBScan::getFrontend(ePtr<iDVBFrontend> &fe)
+{
+       if (m_channel)
+               return m_channel->getFrontend(fe);
+       fe = 0;
+       return -1;
+}
\ No newline at end of file
index 96a1528..ab7f3b5 100644 (file)
@@ -86,6 +86,7 @@ public:
        
        void getStats(int &transponders_done, int &transponders_total, int &services);
        void getLastServiceName(std::string &name);
+       RESULT getFrontend(ePtr<iDVBFrontend> &);
 };
 
 #endif
index 0949871..26ce763 100644 (file)
@@ -46,18 +46,19 @@ class ServiceScan:
                                self.run += 1
                                self.execBegin()
        
-       def __init__(self, progressbar, text, servicelist, passNumber, scanList):
+       def __init__(self, progressbar, text, servicelist, passNumber, scanList, frontendInfo):
                self.foundServices = 0
                self.progressbar = progressbar
                self.text = text
                self.servicelist = servicelist
                self.passNumber = passNumber
                self.scanList = scanList
+               self.frontendInfo = frontendInfo
                self.run = 0
-               
+
        def doRun(self):
                self.scan = eComponentScan()
-               
+               self.frontendInfo.frontend_source = lambda : self.scan.getFrontend()
                self.feid = self.scanList[self.run]["feid"]
                self.flags = self.scanList[self.run]["flags"]
                self.state = self.Idle
@@ -79,10 +80,10 @@ class ServiceScan:
                self.servicelist.clear()
                self.state = self.Running
                err = self.scan.start(self.feid, self.flags)
+               self.frontendInfo.updateFrontendData()
                if err:
                        self.state = self.Error
                        self.errorcode = 0
-
                self.scanStatusChanged()
        
        def execEnd(self):
index e1623ae..5e09618 100644 (file)
@@ -29,11 +29,11 @@ class FrontendStatus(Source):
 
        def getFrontendStatus(self):
                if self.frontend_source:
-                       frontend = self.frontend_source
+                       frontend = self.frontend_source()
+                       dict = { }
                        if frontend:
-                               dict = { }
                                frontend.getFrontendStatus(dict)
-                               return dict
+                       return dict
                elif self.service_source:
                        service = self.service_source()
                        feinfo = service and service.frontendInfo()
index 6d177e4..3c86734 100644 (file)
@@ -113,7 +113,7 @@ class Satfinder(ScanSetup):
                ScanSetup.__init__(self, session)
                self.tuner = Tuner(self.frontend)
                self["introduction"].setText("")
-               self["Frontend"] = FrontendStatus(frontend_source = self.frontend, update_interval = 100)
+               self["Frontend"] = FrontendStatus(frontend_source = lambda : self.frontend, update_interval = 100)
                self.initcomplete = True
 
        def createSetup(self):
index 772141a..a529e71 100644 (file)
@@ -4,6 +4,7 @@ from Components.ProgressBar import ProgressBar
 from Components.Label import Label
 from Components.ActionMap import ActionMap
 from Components.FIFOList import FIFOList
+from Components.Sources.FrontendInfo import FrontendInfo
 
 class ServiceScan(Screen):
        def ok(self):
@@ -23,7 +24,8 @@ class ServiceScan(Screen):
                self["scan_state"] = Label(_("scan state"))
                self["pass"] = Label("")
                self["servicelist"] = FIFOList(len=7)
-               self["scan"] = CScan(self["scan_progress"], self["scan_state"], self["servicelist"], self["pass"], scanList)
+               self["FrontendInfo"] = FrontendInfo()
+               self["scan"] = CScan(self["scan_progress"], self["scan_state"], self["servicelist"], self["pass"], scanList, self["FrontendInfo"])
 
                self["actions"] = ActionMap(["OkCancelActions"], 
                        {
index cef97c3..01a7310 100644 (file)
@@ -86,6 +86,8 @@ is usually caused by not marking PSignals as immutable.
 #include <lib/dvb/frontendparms.h>
 #include <lib/dvb/dvbtime.h>
 #include <lib/dvb/pmt.h>
+#include <lib/components/scan.h>
+#include <lib/components/file_eraser.h>
 #include <lib/driver/avswitch.h>
 #include <lib/driver/rfmod.h>
 #include <lib/driver/misc_options.h>
@@ -185,8 +187,6 @@ typedef long time_t;
 %include <lib/gui/ewidgetanimation.h>
 %include <lib/gui/evideo.h>
 %include <lib/service/listboxservice.h>
-%include <lib/components/scan.h>
-%include <lib/components/file_eraser.h>
 %include <lib/nav/pcore.h>
 %include <lib/actions/action.h>
 %include <lib/gdi/gfont.h>
@@ -200,6 +200,8 @@ typedef long time_t;
 %include <lib/dvb/dvb.h>
 %include <lib/dvb/frontend.h>
 %include <lib/dvb/pmt.h>
+%include <lib/components/scan.h>
+%include <lib/components/file_eraser.h>
 %include <lib/driver/avswitch.h>
 %include <lib/driver/rfmod.h>
 %include <lib/driver/misc_options.h>