Rename WHERE_SETUP to WHERE_MENU and patch all local plugins to follow this (patch...
authorFelix Domke <tmbinc@elitedvb.net>
Sun, 7 Oct 2007 10:35:19 +0000 (10:35 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Sun, 7 Oct 2007 10:35:19 +0000 (10:35 +0000)
lib/python/Components/PluginComponent.py
lib/python/Plugins/Extensions/MediaPlayer/plugin.py
lib/python/Plugins/Plugin.py
lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py
lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py
lib/python/Plugins/SystemPlugins/Satfinder/plugin.py
lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py

index 44fe896..590f428 100644 (file)
@@ -101,7 +101,7 @@ class PluginComponent:
 
        def getPluginsForMenu(self, menuid):
                res = [ ]
-               for p in self.getPlugins(PluginDescriptor.WHERE_SETUP):
+               for p in self.getPlugins(PluginDescriptor.WHERE_MENU):
                        res += p(menuid)
                return res
 
index 0de820c..3207c09 100644 (file)
@@ -750,6 +750,6 @@ def filescan(**kwargs):
 from Plugins.Plugin import PluginDescriptor
 def Plugins(**kwargs):
        return [
-               PluginDescriptor(name = "MediaPlayer", description = "Play back media files", where = PluginDescriptor.WHERE_SETUP, fnc = menu),
+               PluginDescriptor(name = "MediaPlayer", description = "Play back media files", where = PluginDescriptor.WHERE_MENU, fnc = menu),
                PluginDescriptor(name = "MediaPlayer", where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan)
        ]
index b80dcad..a2ee9fe 100644 (file)
@@ -22,8 +22,8 @@ class PluginDescriptor:
        WHERE_PLUGINMENU  = 2
        # argument: session, serviceref (currently selected)
        WHERE_MOVIELIST = 3
-       # ...
-       WHERE_SETUP    = 4
+       # argument: menuid. Fnc must return list with menuitems (2-tuple of name, fnc to call)
+       WHERE_MENU = 4
        
        # reason (0: start, 1: end)
        WHERE_AUTOSTART = 5
index 25cad5c..048722c 100644 (file)
@@ -575,6 +575,6 @@ def PositionerSetupStart(menuid, **kwargs):
 
 def Plugins(**kwargs):
        if (nimmanager.hasNimType("DVB-S")):
-               return PluginDescriptor(name=_("Positioner setup"), description="Setup your positioner", where = PluginDescriptor.WHERE_SETUP, fnc=PositionerSetupStart)
+               return PluginDescriptor(name=_("Positioner setup"), description="Setup your positioner", where = PluginDescriptor.WHERE_MENU, fnc=PositionerSetupStart)
        else:
                return []
index faa9b05..77c4d0a 100644 (file)
@@ -67,6 +67,6 @@ def SecSetupStart(menuid):
 
 def Plugins(**kwargs):
        if (nimmgr.hasNimType("DVB-S")):
-               return PluginDescriptor(name=_("Satellite Equipment Setup"), description="Setup your satellite equipment", where = PluginDescriptor.WHERE_SETUP, fnc=SecSetupStart)
+               return PluginDescriptor(name=_("Satellite Equipment Setup"), description="Setup your satellite equipment", where = PluginDescriptor.WHERE_MENU, fnc=SecSetupStart)
        else:
                return []
index 93a0526..9ad1130 100644 (file)
@@ -278,6 +278,6 @@ def SatfinderStart(menuid, **kwargs):
 
 def Plugins(**kwargs):
        if (nimmanager.hasNimType("DVB-S")):
-               return PluginDescriptor(name=_("Satfinder"), description="Helps setting up your dish", where = PluginDescriptor.WHERE_SETUP, fnc=SatfinderStart)
+               return PluginDescriptor(name=_("Satfinder"), description="Helps setting up your dish", where = PluginDescriptor.WHERE_MENU, fnc=SatfinderStart)
        else:
                return []
index d922117..ecebe76 100755 (executable)
@@ -136,4 +136,4 @@ def SkinSelSetup(menuid, **kwargs):
                return []
 
 def Plugins(**kwargs):
-       return PluginDescriptor(name="Skinselector", description="Select Your Skin", where = PluginDescriptor.WHERE_SETUP, fnc=SkinSelSetup)
+       return PluginDescriptor(name="Skinselector", description="Select Your Skin", where = PluginDescriptor.WHERE_MENU, fnc=SkinSelSetup)