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

Modified Files:
        childapp.py 
Log Message:
return False when there are no handler

Index: childapp.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/application/childapp.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** childapp.py 5 Aug 2005 17:22:04 -0000       1.10
--- childapp.py 5 Aug 2005 18:09:46 -0000       1.11
***************
*** 94,100 ****
              log.error('child already running')
              return False
!         if self.fullscreen and self.has_display:
!             self.show()
!         self.__child = Process(cmd, self, prio, self.has_display)
          self.__stop_cmd = stop_cmd
          return True
--- 94,128 ----
              log.error('child already running')
              return False
! 
!         if self.has_display:
!             if self.fullscreen:
!                 self.show()
!             gui.display.hide()
! 
!         if hasattr(self, 'item'):
!             # send PLAY_START event
!             PLAY_START.post(self.item)
! 
!         # get a name for debug logging of the process
!         logname = cmd[0]
!         if logname.rfind('/') > 0:
!             logname = logname[ logname.rfind( '/' ) + 1 : ]
!         logname = sysconfig.logfile(logname)
!         
!       # start the process
!         self.__child = kaa.notifier.Process(cmd, logname)
! 
!         # connect to signals
!         self.__child.signals["stdout"].connect(self.child_stdout)
!         self.__child.signals["stderr"].connect(self.child_stderr)
!         if self.has_display:
!             self.__child.signals["died"].connect(gui.display.show)
!         self.__child.signals["died"].connect(self.child_finished)
! 
!         # renice the process
!         if prio and config.CONF.renice:
!             os.system('%s %s -p %s 2>/dev/null >/dev/null' % \
!                       (config.CONF.renice, prio, self.__child.child.pid))
!         
          self.__stop_cmd = stop_cmd
          return True
***************
*** 139,143 ****
          stdout from the child process.
          """
!         pass
  
  
--- 167,171 ----
          stdout from the child process.
          """
!         return False
  
  
***************
*** 147,151 ****
          stderr from the child process.
          """
!         pass
  
  
--- 175,179 ----
          stderr from the child process.
          """
!         return False
  
  
***************
*** 161,199 ****
              event.post(self.item)
          self.__child = None
- 
- 
- class Process(kaa.notifier.Process):
-     """
-     Process wrapping a kaa notifier process into an application.
-     Also takes care of basic event sending on start and stop.
-     """
-     def __init__(self, cmd, handler, prio=0, has_display=False):
-         """
-         Init the object and start the process.
-         """
-         if has_display:
-             gui.display.hide()
-         
-         if hasattr(handler, 'item'):
-             # send PLAY_START event
-             PLAY_START.post(handler.item)
- 
-         # get a name for debug logging of the process
-         logname = cmd[0]
-         if logname.rfind('/') > 0:
-             logname = logname[ logname.rfind( '/' ) + 1 : ]
-         logname = sysconfig.logfile(logname)
- 
-       # start the process
-         kaa.notifier.Process.__init__(self, cmd, logname)
- 
-         self.signals["stdout"].connect(handler.child_stdout)
-         self.signals["stderr"].connect(handler.child_stderr)
-         if has_display:
-             self.signals["died"].connect(gui.display.show)
-         self.signals["died"].connect(handler.child_finished)
- 
-         # renice the process
-         if prio and config.CONF.renice:
-             os.system('%s %s -p %s 2>/dev/null >/dev/null' % \
-                       (config.CONF.renice, prio, self.child.pid))
--- 189,190 ----



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to