Author: dmeyer
Date: Mon Jan 29 20:29:09 2007
New Revision: 9079

Modified:
   trunk/ui/share/freevo_config.py
   trunk/ui/src/input/plugins/event_device.py
   trunk/ui/src/plugin.py
   trunk/ui/src/plugins/file_ops.py

Log:
Move some plugin config stuff to the global config code.
It does not belong there, but it will be cleaned up on
the config rewrite using kaa.config.


Modified: trunk/ui/share/freevo_config.py
==============================================================================
--- trunk/ui/share/freevo_config.py     (original)
+++ trunk/ui/share/freevo_config.py     Mon Jan 29 20:29:09 2007
@@ -112,6 +112,12 @@
 # delete file in menu
 plugin.activate('file_ops', level=20)
 
+# Add delete image to the menu
+FILE_OPS_ALLOW_DELETE_IMAGE = True
+
+# Add delete info to the menu
+FILE_OPS_ALLOW_DELETE_INFO = True
+
 # support for settings bookmarks (key RECORD) while playing. Also
 # auto bookmarking when playback is stopped
 plugin.activate('video.bookmarker', level=0)
@@ -462,6 +468,12 @@
     plugin.activate('input.lirc')
     
 
+# plugin.activate('input.event_device')
+EVDEV_NAME = 'Hauppauge PVR-250/350 IR remote'
+EVDEV_DEVICE = '/dev/input/event0'
+EVDEV_REPEAT_IGNORE = 400
+EVDEV_REPEAT_RATE = 100
+
 # ======================================================================
 # Freevo TV settings:
 # ======================================================================

Modified: trunk/ui/src/input/plugins/event_device.py
==============================================================================
--- trunk/ui/src/input/plugins/event_device.py  (original)
+++ trunk/ui/src/input/plugins/event_device.py  Mon Jan 29 20:29:09 2007
@@ -145,21 +145,6 @@
         kaa.notifier.SocketDispatcher(self.handle).register(self.fd)
 
 
-    def config(self):
-        # XXX TODO: Autodetect which type of device it is so we don't need
-        #           to set EVDEV_NAME, or have the user pick it from a list.
-        #           Right now it is called something pretty to make it easier
-        #           for users to choose the right one.
-
-        return [
-                ( 'EVDEV_NAME', 'Hauppauge PVR-250/350 IR remote', 'Long name 
of device.' ),
-                ( 'EVDEV_DEVICE', '/dev/input/event0', 'Input device to use.' 
),
-                ( 'EVDEV_REPEAT_IGNORE', 400, 
-                  'Time before first repeat (miliseconds).' ),
-                ( 'EVDEV_REPEAT_RATE',  100, 
-                  'Time between consecutive repeats (miliseconds).' ), ]
-
-
     def handle( self ):
         S_EVDATA = '@llHHi'
         c = os.read(self.fd, 16)

Modified: trunk/ui/src/plugin.py
==============================================================================
--- trunk/ui/src/plugin.py      (original)
+++ trunk/ui/src/plugin.py      Mon Jan 29 20:29:09 2007
@@ -35,9 +35,6 @@
 # kaa imports
 import kaa.notifier
 
-# freevo imports
-import config
-
 # plugin loader
 from plugin_loader import *
 import plugin_loader
@@ -51,24 +48,6 @@
     """
     Basic plugin class.
     """
-    def __init__(self, name=''):
-        """
-        Execute on activation of the plugin.
-        """
-        for var, val, desc in self.config():
-            if not hasattr(config, var):
-                setattr(config, var, val)
-        plugin_loader.Plugin.__init__(self, name)
-
-
-    def config(self):
-        """
-        return a list of config variables this plugin needs to be set in
-        in freevo_config.py. Each variable in again a list and contains
-        (varname, default value, description)
-        """
-        return []
-
 
     def shutdown(self):
         """

Modified: trunk/ui/src/plugins/file_ops.py
==============================================================================
--- trunk/ui/src/plugins/file_ops.py    (original)
+++ trunk/ui/src/plugins/file_ops.py    Mon Jan 29 20:29:09 2007
@@ -51,12 +51,6 @@
     Small plugin to delete files
     """
 
-    def config(self):
-        return [ ('FILE_OPS_ALLOW_DELETE_IMAGE', True,
-                  'Add delete image to the menu.'),
-                ('FILE_OPS_ALLOW_DELETE_INFO', True,
-                  'Add delete info to the menu.') ]
-
     def actions(self, item):
         """
         Create list of possible actions

-------------------------------------------------------------------------
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