fixes bug #283
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sat, 7 Nov 2009 11:43:22 +0000 (12:43 +0100)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Thu, 12 Nov 2009 17:43:47 +0000 (18:43 +0100)
if nothing is connected to any nim, don't die entering scan setup

data/skin_default.xml
lib/python/Screens/ScanSetup.py

index 72dc357..16504ab 100755 (executable)
@@ -803,9 +803,9 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
                <widget name="config" position="10,165" size="500,225" scrollbarMode="showOnDemand" />
        </screen>
        <!-- Scan setup -->
                <widget name="config" position="10,165" size="500,225" scrollbarMode="showOnDemand" />
        </screen>
        <!-- Scan setup -->
-       <screen name="ScanSetup" position="center,center" size="520,390" title="Service scan">
+       <screen name="ScanSetup" position="center,center" size="520,450" title="Service scan">
                <widget name="config" position="10,10" size="500,350" scrollbarMode="showOnDemand" />
                <widget name="config" position="10,10" size="500,350" scrollbarMode="showOnDemand" />
-               <widget name="introduction" position="10,365" size="500,25" font="Regular;20" halign="center" />
+               <widget name="introduction" position="10,365" size="500,75" font="Regular;20" halign="center" />
        </screen>
        <!-- Scan simple -->
        <screen name="ScanSimple" position="center,center" size="420,350" title="Service scan">
        </screen>
        <!-- Scan simple -->
        <screen name="ScanSimple" position="center,center" size="420,350" title="Service scan">
index d0af8f7..bea0872 100644 (file)
@@ -295,9 +295,11 @@ class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport):
 
                self.list = []
                ConfigListScreen.__init__(self, self.list)
 
                self.list = []
                ConfigListScreen.__init__(self, self.list)
-               self.createSetup()
-
-               self["introduction"] = Label(_("Press OK to start the scan"))
+               if not self.scan_nims.value == "":
+                       self.createSetup()
+                       self["introduction"] = Label(_("Press OK to start the scan"))
+               else:
+                       self["introduction"] = Label(_("Nothing to scan!\nPlease setup your tuner settings before you start a service scan."))
 
        def runAsync(self, finished_cb):
                self.finished_cb = finished_cb
 
        def runAsync(self, finished_cb):
                self.finished_cb = finished_cb
@@ -709,6 +711,8 @@ class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport):
                tlist.append(buildTerTransponder(*args, **kwargs))
 
        def keyGo(self):
                tlist.append(buildTerTransponder(*args, **kwargs))
 
        def keyGo(self):
+               if self.scan_nims.value == "":
+                       return
                tlist = []
                flags = None
                startScan = True
                tlist = []
                flags = None
                startScan = True