Author: duncan
Date: Wed Mar 28 18:56:38 2007
New Revision: 9408

Added:
   branches/rel-1/freevo/share/icons/status/check.png
      - copied unchanged from r9407, 
/branches/rel-1/freevo/share/images/check.png
   branches/rel-1/freevo/share/icons/status/cross.png
      - copied unchanged from r9407, 
/branches/rel-1/freevo/share/images/cross.png
Removed:
   branches/rel-1/freevo/share/images/check.png
   branches/rel-1/freevo/share/images/cross.png
Modified:
   branches/rel-1/freevo/ChangeLog
   branches/rel-1/freevo/src/plugins/idlebar/progactive.py

Log:
Corrected progactive plug-in to use the status directory
Added progactive to Changelog


Modified: branches/rel-1/freevo/ChangeLog
==============================================================================
--- branches/rel-1/freevo/ChangeLog     (original)
+++ branches/rel-1/freevo/ChangeLog     Wed Mar 28 18:56:38 2007
@@ -19,6 +19,7 @@
  * Added ALSA mixer plug-in (F#1685326)
  * Added Anamorphic widescreen "Panorama" skin (F#1669994)
  * Added MusicIP Mixer Plug-in (F#1676991)
+ * Added progactive idlebar plug-in (F#1689358)
  * Added TV recording manager (F#1672003)
  * Added VIDEO_SEND_XINE_CMD event to send specific commands to xine 
(F#1683699)
  * Updated and fixed German translations (B#1672040)
@@ -26,6 +27,7 @@
  * Updated and fixed video selection of audio, subtitles and chapters 
(B#1677364)
  * Updated xine event handling to accept SEND_VIDEO_XINE_CMD (F#1683699)
  * Fixed audio item correctly processing files without media tags (B#1678392)
+ * Fixed audio covers not working when a .directory file is on the path 
(B#1687649)
  * Fixed audio directory containing accented characters (B#1679595)
  * Fixed autoshutdown processing of return coded (B#1612257)
  * Fixed command plug-in for long running commands (B#1683533)

Modified: branches/rel-1/freevo/src/plugins/idlebar/progactive.py
==============================================================================
--- branches/rel-1/freevo/src/plugins/idlebar/progactive.py     (original)
+++ branches/rel-1/freevo/src/plugins/idlebar/progactive.py     Wed Mar 28 
18:56:38 2007
@@ -21,11 +21,6 @@
 # This program is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of MER-
 # CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-"""
-
-done by despeyer >> www.despeyer.de >> [EMAIL PROTECTED]
-if you got questions, ideas, etc., please mail me !!!
-"""
 
 import time
 import os
@@ -37,50 +32,53 @@
 from pygame import image, transform
 from plugins.idlebar import IdleBarPlugin
 
-__version__="1.0"
-__author__="[EMAIL PROTECTED]"
-__doc__="""Display an Icon if prog (defined in local_conf.py) is active or not.
+__version__='1.0'
+__author__='[EMAIL PROTECTED]'
+__doc__='''Display an Icon if prog (defined in local_conf.py) is active or not.
 The Prog-Name is also drawn over the icon.
-"""
+'''
 
 class PluginInterface(IdleBarPlugin):
-    """
+    '''
     Display an Icon if prog is active, put following Lines in local_conf.py:
     plugin.activate('idlebar.progactive')
-    """
+    '''
     def __init__(self):
         IdleBarPlugin.__init__(self)
         self.plugin_name='idlebar.progactive'
         self.time = 0
-        self.progname = config.PROG_NAME
+        self.progname = config.PROGACTIVE_PROGRAM
+        icondir = os.path.join(config.ICON_DIR, 'status')
+        self.images = {}
+        self.images['cross'] = os.path.join(icondir, 'cross.png')
+        self.images['check'] = os.path.join(icondir, 'check.png')
+        self.image = self.images['cross']
         
     def config(self):
         '''config is called automatically, for default settings run:
         freevo plugins -i idlebar.progactive'''
-        return [ ('PROG_NAME', None, 'Program that you want to monitor') ]
+        return [ ('PROGACTIVE_PROGRAM', None, 'Program that you want to 
monitor') ]
 
     def getstatus(self):
-        """
+        '''
         Update every 30 secs
-        """
+        '''
         if (time.time()-self.time) > 30:
             self.time = time.time()
-            cmd = "ps -A | grep " + self.progname
+            cmd = 'ps -A | grep ' + self.progname
             fin, fout = os.popen4(cmd)
             result = fout.read()
-            if result == "":
-                self.image = 'cross.png'
+            if result == '':
+                self.image = self.images['cross']
             else:
-                self.image = 'check.png'
+                self.image = self.images['check']
         
     def draw(self, (type, object), x, osd):
         self.getstatus()
         font = osd.get_font('small0')
-        widthmt = 0
-        widthmt = font.stringsize(config.PROG_NAME)
-        image = self.image
-        osd.write_text(config.PROG_NAME, font, None, x + 15, osd.y + 55 - 
font.h, widthmt, font.h, 'left', 'top')
+        widthmt = font.stringsize(config.PROGACTIVE_PROGRAM)
+        osd.write_text(config.PROGACTIVE_PROGRAM, font, None, x + 15, osd.y + 
55 - font.h, \
+            widthmt, font.h, 'left', 'top')
+        if not self.image:
+            return widthmt + 15
         return osd.drawimage(self.image, (x, osd.y + 10, -1, 45))[0]
-        return widthmt + 15
-
-

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