Update of /cvsroot/freevo/freevo/src/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2496

Modified Files:
        command.py 
Log Message:
add more doc and add <stdout> to supress showing the stdout

Index: command.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/plugins/command.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** command.py  14 Feb 2004 15:05:49 -0000      1.5
--- command.py  14 Feb 2004 15:44:21 -0000      1.6
***************
*** 15,18 ****
--- 15,21 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.6  2004/02/14 15:44:21  dischi
+ # add more doc and add <stdout> to supress showing the stdout
+ #
  # Revision 1.5  2004/02/14 15:05:49  dischi
  # make it possible to put command fxd files in every menu
***************
*** 209,212 ****
--- 212,216 ----
        self.spawnwm = config.COMMAND_SPAWN_WM
        self.killwm  = config.COMMAND_KILL_WM
+         self.stdout  = True
        if command and directory:
              self.name = command
***************
*** 254,277 ****
              message = _('Command Completed')
  
!         if not self.stoposd:
              CommandOptions(text=message).show()
          
  
  def fxdparser(fxd, node):
!     '''
      parse commands out of a fxd file
!                                                                                 
!     <?xml version="1.0" ?>
!     <freevo>
!       <command title="Mozilla">
!         <cmd>/usr/local/bin/mozilla</cmd>
!         <stoposd>1</stoposd>
!         <spawnwm>1</spawnwm>
!         <info>
!           <description>Unleash mozilla on the www</description>
!         </info>
!       </command>
!     </freevo>
!     '''
      item = CommandItem()
      item.name    = fxd.getattr(node, 'title')
--- 258,269 ----
              message = _('Command Completed')
  
!         if not self.stoposd and self.stdout:
              CommandOptions(text=message).show()
          
  
  def fxdparser(fxd, node):
!     """
      parse commands out of a fxd file
!     """
      item = CommandItem()
      item.name    = fxd.getattr(node, 'title')
***************
*** 280,289 ****
      item.stoposd = fxd.childcontent(node, 'stoposd')
      item.use_wm  = fxd.childcontent(node, 'spawnwm')
      
      # parse <info> tag
      fxd.parse_info(fxd.get_children(node, 'info', 1), item)
      fxd.getattr(None, 'items', []).append(item)
-     if fxd.getattr(None, 'parent'):
-         item.name = Unicode(_('Execute command: ')) + item.name
      
  
--- 272,284 ----
      item.stoposd = fxd.childcontent(node, 'stoposd')
      item.use_wm  = fxd.childcontent(node, 'spawnwm')
+     try:
+         if fxd.childcontent(node, 'stdout'):
+             item.stdout = int(fxd.childcontent(node, 'stdout'))
+     except Exception, e:
+         print e
      
      # parse <info> tag
      fxd.parse_info(fxd.get_children(node, 'info', 1), item)
      fxd.getattr(None, 'items', []).append(item)
      
  
***************
*** 354,357 ****
--- 349,355 ----
      freevo_config.py for the level of the other Menu Items if you wish to place it
      in a particular location.
+ 
+     This plugin also activates <command> tag support in all menus, see information
+     from command.fxdhandler for details.
      """
      def __init__(self):
***************
*** 384,389 ****
        <command title="Mozilla">
          <cmd>/usr/local/bin/mozilla</cmd>
!         <stoposd>1</stoposd>
!         <spawnwm>1</spawnwm>
          <info>
            <description>Unleash mozilla on the www</description>
--- 382,388 ----
        <command title="Mozilla">
          <cmd>/usr/local/bin/mozilla</cmd>
!         <stoposd>1</stoposd> <!-- stop osd before starting -->
!         <spawnwm>1</spawnwm> <!-- start windowmanager -->
!         <stdout>0</stdout>   <!-- do not show stdout on exit -->
          <info>
            <description>Unleash mozilla on the www</description>
***************
*** 391,394 ****
--- 390,396 ----
        </command>
      </freevo>
+ 
+     Putting a <command> in a folder.fxd will add this command to the list of
+     item actions for that directory.
      """
      def __init__(self):



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to