Author: duncan
Date: Mon Dec 17 15:35:48 2007
New Revision: 10214

Log:
Corrected/Added plug-in config()


Modified:
   branches/rel-1-7/freevo/src/audio/plugins/coversearch.py
   branches/rel-1-7/freevo/src/audio/plugins/xmradio.py
   branches/rel-1-7/freevo/src/plugins/command.py
   branches/rel-1-7/freevo/src/plugins/idlebar/system.py
   branches/rel-1/freevo/src/audio/plugins/coversearch.py
   branches/rel-1/freevo/src/audio/plugins/xmradio.py
   branches/rel-1/freevo/src/plugins/command.py
   branches/rel-1/freevo/src/plugins/idlebar/system.py

Modified: branches/rel-1-7/freevo/src/audio/plugins/coversearch.py
==============================================================================
--- branches/rel-1-7/freevo/src/audio/plugins/coversearch.py    (original)
+++ branches/rel-1-7/freevo/src/audio/plugins/coversearch.py    Mon Dec 17 
15:35:48 2007
@@ -1,6 +1,6 @@
 # -*- coding: iso-8859-1 -*-
 # -----------------------------------------------------------------------
-# coverserarch.py - Plugin for album cover support
+# Plugin for album cover support
 # -----------------------------------------------------------------------
 # $Id$
 #
@@ -107,6 +107,13 @@
         plugin.ItemPlugin.__init__(self)
 
 
+    def config(self):
+        return [
+            ('AMAZON_LOCALE', 'us', 'The location is one of: de, jp, uk, us'),
+            ('AMAZON_QUERY_ENCODING', 'latin-1', 'The character encoding of 
web pages'),
+        ]
+
+
     def actions(self, item):
         self.item = item
 
@@ -294,8 +301,7 @@
 
         #filename = os.path.splitext(self.item.filename)[0]
         if self.item.type == 'audiocd':
-            filename = '%s/disc/metadata/%s.jpg' % (config.OVERLAY_DIR,
-                                                    self.item.info['id'])
+            filename = '%s/disc/metadata/%s.jpg' % (config.OVERLAY_DIR, 
self.item.info['id'])
         elif self.item.type == 'dir':
             filename = os.path.join(self.item.dir, 'cover.jpg')
         else:

Modified: branches/rel-1-7/freevo/src/audio/plugins/xmradio.py
==============================================================================
--- branches/rel-1-7/freevo/src/audio/plugins/xmradio.py        (original)
+++ branches/rel-1-7/freevo/src/audio/plugins/xmradio.py        Mon Dec 17 
15:35:48 2007
@@ -155,5 +155,13 @@
     | ]
     """
 
+    def config(self):
+        return [
+            ('XM_USER', None, 'your email address'),
+            ('XM_PASS', None, 'your xmradio password'),
+            ('XM_RATE', 'high', 'rating for xmradio'),
+            ('XM_STATIONS', [], 'Your list of xmradio stations'),
+        ]
+
     def items(self, parent):
         return [ XmRadioMainMenuItem(parent) ]

Modified: branches/rel-1-7/freevo/src/plugins/command.py
==============================================================================
--- branches/rel-1-7/freevo/src/plugins/command.py      (original)
+++ branches/rel-1-7/freevo/src/plugins/command.py      Mon Dec 17 15:35:48 2007
@@ -1,8 +1,7 @@
 # -*- coding: iso-8859-1 -*-
 # -----------------------------------------------------------------------
-# command.py - a simple plugin to run arbitrary commands from a directory.
-#               it determines success or failure of command based on its
-#               exit status.
+# a simple plugin to run arbitrary commands from a directory.
+# it determines success or failure of command based on its exit status.
 # -----------------------------------------------------------------------
 # $Id$
 #
@@ -361,9 +360,10 @@
         return [ CommandMenuItem(parent) ]
 
     def config(self):
-        return [ ('COMMANDS_DIR', '/usr/local/bin', 'The directory to show 
commands from.'),
-                 ('COMMAND_SPAWN_WM', '', 'command to start window manager.'),
-                 ('COMMAND_KILL_WM', '', 'command to stop window manager.'),
+        return [
+            ('COMMANDS_DIR', '/usr/local/bin', 'The directory to show commands 
from.'),
+            ('COMMAND_SPAWN_WM', '', 'command to start window manager.'),
+            ('COMMAND_KILL_WM', '', 'command to stop window manager.'),
         ]
 
 
@@ -375,19 +375,20 @@
     to activate it, put the following in your local_conf.py:
     plugin.activate('command.fxdhandler')
 
-    Sample fxd file starting mozilla:
-    <?xml version="1.0" ?>
-    <freevo>
-      <command title="Mozilla">
-        <cmd>/usr/local/bin/mozilla</cmd>
-        <stoposd />  <!-- stop osd before starting -->
-        <spawnwm />  <!-- start windowmanager -->
-        <nostdout /> <!-- do not show stdout on exit -->
-        <info>
-          <description>Unleash mozilla on the www</description>
-        </info>
-      </command>
-    </freevo>
+    Sample fxd file starting mozilla::
+
+        <?xml version="1.0" ?>
+        <freevo>
+          <command title="Mozilla">
+            <cmd>/usr/local/bin/mozilla</cmd>
+            <stoposd />  <!-- stop osd before starting -->
+            <spawnwm />  <!-- start windowmanager -->
+            <nostdout /> <!-- do not show stdout on exit -->
+            <info>
+              <description>Unleash mozilla on the www</description>
+            </info>
+          </command>
+        </freevo>
 
     Putting a <command> in a folder.fxd will add this command to the list of
     item actions for that directory.
@@ -398,6 +399,8 @@
         plugin.register_callback('fxditem', [], 'command', fxdparser)
         plugin.Plugin.__init__(self)
 
+
+
 class CommandMainMenuItem(plugin.MainMenuPlugin):
     """
     A small plugin to put a command in the main menu.
@@ -405,7 +408,7 @@
     All output is logged in the freevo logdir.
     to activate it, put the following in your local_conf.py:
 
-    plugin.activate('command.CommandMainMenuItem', 
args=(/usr/local/freevo_data/Commands/Mozilla.fxd', ), level=45)
+    | plugin.activate('command.CommandMainMenuItem', 
args=(/usr/local/freevo_data/Commands/Mozilla.fxd',), level=45)
 
     The level argument is used to influence the placement in the Main Menu.
     consult freevo_config.py for the level of the other Menu Items if you
@@ -415,10 +418,12 @@
         plugin.MainMenuPlugin.__init__(self)
         self.cmd_xml = commandxmlfile
 
+
     def config(self):
         return [ ('COMMAND_SPAWN_WM', '', 'command to start window manager.'),
                  ('COMMAND_KILL_WM', '', 'command to stop window manager.') ]
 
+
     def items(self, parent):
         command_items = []
         parser = util.fxdparser.FXD(self.cmd_xml)

Modified: branches/rel-1-7/freevo/src/plugins/idlebar/system.py
==============================================================================
--- branches/rel-1-7/freevo/src/plugins/idlebar/system.py       (original)
+++ branches/rel-1-7/freevo/src/plugins/idlebar/system.py       Mon Dec 17 
15:35:48 2007
@@ -65,6 +65,14 @@
         self.lastused = 0
         self.lastuptime = 0
 
+
+    def config(self):
+        return [
+            ( 'SENSORS_PLATFORM_PATH', '/sys/devices/platform', 'path to the 
sensor devices' ),
+            ( 'SENSORS_I2CDEV_PATH', '/sys/bus/i2c/devices', 'path to the i2c 
devices' ),
+        ]
+
+
     def getStats(self):
         """
         Don't get the stats for each update
@@ -199,11 +207,6 @@
             self.hotstack = hotstack
             self.washot = False
 
-        def config(self):
-            return [
-                ( 'SENSORS_PLATFORM_PATH', '/sys/devices/platform', 'path to 
the sensor devices' ),
-                ( 'SENSORS_I2CDEV_PATH', '/sys/bus/i2c/devices', 'path to the 
i2c devices' ),
-            ]
 
         def temp(self):
             def temp_compute (rawvalue):

Modified: branches/rel-1/freevo/src/audio/plugins/coversearch.py
==============================================================================
--- branches/rel-1/freevo/src/audio/plugins/coversearch.py      (original)
+++ branches/rel-1/freevo/src/audio/plugins/coversearch.py      Mon Dec 17 
15:35:48 2007
@@ -1,6 +1,6 @@
 # -*- coding: iso-8859-1 -*-
 # -----------------------------------------------------------------------
-# coverserarch.py - Plugin for album cover support
+# Plugin for album cover support
 # -----------------------------------------------------------------------
 # $Id$
 #
@@ -107,6 +107,13 @@
         plugin.ItemPlugin.__init__(self)
 
 
+    def config(self):
+        return [
+            ('AMAZON_LOCALE', 'us', 'The location is one of: de, jp, uk, us'),
+            ('AMAZON_QUERY_ENCODING', 'latin-1', 'The character encoding of 
web pages'),
+        ]
+
+
     def actions(self, item):
         self.item = item
 
@@ -294,8 +301,7 @@
 
         #filename = os.path.splitext(self.item.filename)[0]
         if self.item.type == 'audiocd':
-            filename = '%s/disc/metadata/%s.jpg' % (config.OVERLAY_DIR,
-                                                    self.item.info['id'])
+            filename = '%s/disc/metadata/%s.jpg' % (config.OVERLAY_DIR, 
self.item.info['id'])
         elif self.item.type == 'dir':
             filename = os.path.join(self.item.dir, 'cover.jpg')
         else:

Modified: branches/rel-1/freevo/src/audio/plugins/xmradio.py
==============================================================================
--- branches/rel-1/freevo/src/audio/plugins/xmradio.py  (original)
+++ branches/rel-1/freevo/src/audio/plugins/xmradio.py  Mon Dec 17 15:35:48 2007
@@ -155,5 +155,13 @@
     | ]
     """
 
+    def config(self):
+        return [
+            ('XM_USER', None, 'your email address'),
+            ('XM_PASS', None, 'your xmradio password'),
+            ('XM_RATE', 'high', 'rating for xmradio'),
+            ('XM_STATIONS', [], 'Your list of xmradio stations'),
+        ]
+
     def items(self, parent):
         return [ XmRadioMainMenuItem(parent) ]

Modified: branches/rel-1/freevo/src/plugins/command.py
==============================================================================
--- branches/rel-1/freevo/src/plugins/command.py        (original)
+++ branches/rel-1/freevo/src/plugins/command.py        Mon Dec 17 15:35:48 2007
@@ -1,8 +1,7 @@
 # -*- coding: iso-8859-1 -*-
 # -----------------------------------------------------------------------
-# command.py - a simple plugin to run arbitrary commands from a directory.
-#               it determines success or failure of command based on its
-#               exit status.
+# a simple plugin to run arbitrary commands from a directory.
+# it determines success or failure of command based on its exit status.
 # -----------------------------------------------------------------------
 # $Id$
 #
@@ -361,9 +360,10 @@
         return [ CommandMenuItem(parent) ]
 
     def config(self):
-        return [ ('COMMANDS_DIR', '/usr/local/bin', 'The directory to show 
commands from.'),
-                 ('COMMAND_SPAWN_WM', '', 'command to start window manager.'),
-                 ('COMMAND_KILL_WM', '', 'command to stop window manager.'),
+        return [
+            ('COMMANDS_DIR', '/usr/local/bin', 'The directory to show commands 
from.'),
+            ('COMMAND_SPAWN_WM', '', 'command to start window manager.'),
+            ('COMMAND_KILL_WM', '', 'command to stop window manager.'),
         ]
 
 
@@ -375,19 +375,20 @@
     to activate it, put the following in your local_conf.py:
     plugin.activate('command.fxdhandler')
 
-    Sample fxd file starting mozilla:
-    <?xml version="1.0" ?>
-    <freevo>
-      <command title="Mozilla">
-        <cmd>/usr/local/bin/mozilla</cmd>
-        <stoposd />  <!-- stop osd before starting -->
-        <spawnwm />  <!-- start windowmanager -->
-        <nostdout /> <!-- do not show stdout on exit -->
-        <info>
-          <description>Unleash mozilla on the www</description>
-        </info>
-      </command>
-    </freevo>
+    Sample fxd file starting mozilla::
+
+        <?xml version="1.0" ?>
+        <freevo>
+          <command title="Mozilla">
+            <cmd>/usr/local/bin/mozilla</cmd>
+            <stoposd />  <!-- stop osd before starting -->
+            <spawnwm />  <!-- start windowmanager -->
+            <nostdout /> <!-- do not show stdout on exit -->
+            <info>
+              <description>Unleash mozilla on the www</description>
+            </info>
+          </command>
+        </freevo>
 
     Putting a <command> in a folder.fxd will add this command to the list of
     item actions for that directory.
@@ -398,6 +399,8 @@
         plugin.register_callback('fxditem', [], 'command', fxdparser)
         plugin.Plugin.__init__(self)
 
+
+
 class CommandMainMenuItem(plugin.MainMenuPlugin):
     """
     A small plugin to put a command in the main menu.
@@ -405,7 +408,7 @@
     All output is logged in the freevo logdir.
     to activate it, put the following in your local_conf.py:
 
-    plugin.activate('command.CommandMainMenuItem', 
args=(/usr/local/freevo_data/Commands/Mozilla.fxd', ), level=45)
+    | plugin.activate('command.CommandMainMenuItem', 
args=(/usr/local/freevo_data/Commands/Mozilla.fxd',), level=45)
 
     The level argument is used to influence the placement in the Main Menu.
     consult freevo_config.py for the level of the other Menu Items if you
@@ -415,10 +418,12 @@
         plugin.MainMenuPlugin.__init__(self)
         self.cmd_xml = commandxmlfile
 
+
     def config(self):
         return [ ('COMMAND_SPAWN_WM', '', 'command to start window manager.'),
                  ('COMMAND_KILL_WM', '', 'command to stop window manager.') ]
 
+
     def items(self, parent):
         command_items = []
         parser = util.fxdparser.FXD(self.cmd_xml)

Modified: branches/rel-1/freevo/src/plugins/idlebar/system.py
==============================================================================
--- branches/rel-1/freevo/src/plugins/idlebar/system.py (original)
+++ branches/rel-1/freevo/src/plugins/idlebar/system.py Mon Dec 17 15:35:48 2007
@@ -65,6 +65,14 @@
         self.lastused = 0
         self.lastuptime = 0
 
+
+    def config(self):
+        return [
+            ( 'SENSORS_PLATFORM_PATH', '/sys/devices/platform', 'path to the 
sensor devices' ),
+            ( 'SENSORS_I2CDEV_PATH', '/sys/bus/i2c/devices', 'path to the i2c 
devices' ),
+        ]
+
+
     def getStats(self):
         """
         Don't get the stats for each update
@@ -197,11 +205,6 @@
             self.hotstack = hotstack
             self.washot = False
 
-        def config(self):
-            return [
-                ( 'SENSORS_PLATFORM_PATH', '/sys/devices/platform', 'path to 
the sensor devices' ),
-                ( 'SENSORS_I2CDEV_PATH', '/sys/bus/i2c/devices', 'path to the 
i2c devices' ),
-            ]
 
         def temp(self):
             def temp_compute (rawvalue):

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to