Author: dmeyer
Date: Mon Jan 29 20:41:37 2007
New Revision: 9082

Modified:
   trunk/ui/src/plugin.py
   trunk/ui/src/plugins/mbus.py

Log:
plugin cleanup, games now completly broken

Modified: trunk/ui/src/plugin.py
==============================================================================
--- trunk/ui/src/plugin.py      (original)
+++ trunk/ui/src/plugin.py      Mon Jan 29 20:41:37 2007
@@ -58,37 +58,6 @@
         self._plugin_special = False
 
 
-    def plugin_activate(self):
-        """
-        Execute on activation of the plugin.
-        """
-        pass
-
-
-    def plugin_decativate(self):
-        """
-        Execute when the plugin is deactivated.
-        """
-        pass
-
-
-    def shutdown(self):
-        """
-        Execute on plugin shutdown (== system shutdown)
-        """
-        pass
-
-
-    def plugin_activate(self):
-        """
-        Execute on activation of the plugin.
-        """
-        # register shutdown handler
-        if self.__class__.shutdown != Plugin.shutdown:
-            # plugin has a self defined shutdown function
-            kaa.notifier.signals['shutdown'].connect( self.shutdown )
-
-
 
 class MainMenuPlugin(Plugin):
     """
@@ -188,16 +157,6 @@
         return None
 
 
-#
-# Some plugin names to avoid typos
-#
-
-AUDIO_PLAYER   = 'AUDIO_PLAYER'
-RADIO_PLAYER   = 'RADIO_PLAYER'
-VIDEO_PLAYER   = 'VIDEO_PLAYER'
-TV             = 'TV'
-GAMES          = 'GAMES'
-
 class PluginLoader(object):
     """
     Class for handling the different plugins.
@@ -325,27 +284,18 @@
         return self.types[type]
 
 
-    def getbyname(self, name, multiple_choises=False):
+    def getbyname(self, name):
         """
         Get a plugin by it's name
         """
-        if self.names.has_key(name):
-            return self.names[name]
-        if multiple_choises:
-            return []
-        return None
+        return self.names.get(name, None)
 
 
-    def register(self, plugin, name, multiple_choises=False):
+    def register(self, plugin, name):
         """
         Register an object as a named plugin
         """
-        if multiple_choises:
-            if not self.names.has_key(name):
-                self.names[name] = []
-            self.names[name].append(plugin)
-        else:
-            self.names[name] = plugin
+        self.names[name] = plugin
 
 
     def __find_plugin_file(self, filename):
@@ -439,7 +389,6 @@
             else:
                 p = name
 
-            p.plugin_activate()
             p._plugin_level = level
 
             if type:

Modified: trunk/ui/src/plugins/mbus.py
==============================================================================
--- trunk/ui/src/plugins/mbus.py        (original)
+++ trunk/ui/src/plugins/mbus.py        Mon Jan 29 20:41:37 2007
@@ -30,13 +30,6 @@
         self.status.set('idle', 0)
         self.status.set('playing', '')
 
-        
-    def plugin_activate(self):
-        """
-        Execute on activation of the plugin.
-        """
-        plugin.Plugin.plugin_activate(self)
-        self.idle_time = 0
         self.__events.register()
         self.__timer.start(60)
 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to