fix nl subtitle selected string and layout
[enigma2.git] / tests / enigma.py
index 2f6acc6..e82aa49 100644 (file)
@@ -25,8 +25,10 @@ class eTimer:
        def __init__(self):
                self.timeout = slot()
                self.next_activation = None
+               print "NEW TIMER"
        
        def start(self, msec, singleshot = False):
+               print "start timer", msec
                self.next_activation = time.time() + msec / 1000.0
                self.msec = msec
                self.singleshot = singleshot
@@ -49,6 +51,8 @@ def runIteration():
        assert len(running_timers), "no running timers, so nothing will ever happen!"
        running_timers.sort(key=lambda x: x.next_activation)
        
+       print "running:", running_timers
+       
        next_timer = running_timers[0]
 
        now = time.time()
@@ -71,7 +75,7 @@ def stop():
 def run(duration = 1000):
        stoptimer = eTimer()
        stoptimer.start(duration * 1000.0)
-       stoptimer.timeout.get().append(stop)
+       stoptimer.callback.append(stop)
        while not stopped:
                runIteration()
 
@@ -92,6 +96,7 @@ eWindowStyleSkinned = None
 eButton = None
 eListboxPythonStringContent = None
 eListbox = None
+eSubtitleWidget = None
 
 class eEPGCache:
        @classmethod
@@ -127,6 +132,9 @@ class pNavigation:
        def playService(self, service):
                return None
 
+       def __repr__(self):
+               return "pNavigation"
+
 eRCInput = None
 getPrevAsciiCode = None
 
@@ -274,19 +282,11 @@ class eServiceCenter:
 
 eServiceCenter()
 
-##################### ENIGMA CONFIG
-
-import Components.config
-
-my_config = [
-"config.skin.primary_skin=None\n"
-]
-
-Components.config.config.unpickle(my_config)
-
 ##################### ENIGMA CHROOT
 
+print "import directories"
 import Tools.Directories
+print "done"
 
 chroot="."
 
@@ -294,6 +294,19 @@ for (x, (y, z)) in Tools.Directories.defaultPaths.items():
        Tools.Directories.defaultPaths[x] = (chroot + y, z)
 
 Tools.Directories.defaultPaths[Tools.Directories.SCOPE_SKIN] = ("../data/", Tools.Directories.PATH_DONTCREATE)
+Tools.Directories.defaultPaths[Tools.Directories.SCOPE_CONFIG] = ("/etc/enigma2/", Tools.Directories.PATH_DONTCREATE)
+
+##################### ENIGMA CONFIG
+
+print "import config"
+import Components.config
+print "done"
+
+my_config = [
+"config.skin.primary_skin=None\n"
+]
+
+Components.config.config.unpickle(my_config)
 
 ##################### ENIGMA ACTIONS
 
@@ -305,14 +318,17 @@ class eActionMap:
 ##################### ENIGMA STARTUP:
 
 def init_nav():
+       print "init nav"
        import Navigation, NavigationInstance
        NavigationInstance.instance = Navigation.Navigation()
 
 def init_record_config():
+       print "init recording"
        import Components.RecordingConfig
        Components.RecordingConfig.InitRecordingConfig()
 
 def init_parental_control():
+       print "init parental"
        from Components.ParentalControl import InitParentalControl
        InitParentalControl()
 
@@ -344,7 +360,5 @@ def init_all():
        import Components.RFmod
        Components.RFmod.InitRFmod()
 
-       import Components.NimManager
-
        import Screens.Ci
        Screens.Ci.InitCiConfig()