[Jahshaka-cvs] jah/jahtools/jcapture jcapture_admin.py,1.6,1.7
Status: Beta
Brought to you by:
jahshaka
From: Charles Y. <lil...@us...> - 2007-05-07 06:41:44
|
Update of /cvsroot/jahshaka/jah/jahtools/jcapture In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30143 Modified Files: jcapture_admin.py Log Message: + Hideous and getting worse.. provides a hook up with the many mini tools... Index: jcapture_admin.py =================================================================== RCS file: /cvsroot/jahshaka/jah/jahtools/jcapture/jcapture_admin.py,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- jcapture_admin.py 25 Apr 2007 08:08:15 -0000 1.6 +++ jcapture_admin.py 7 May 2007 06:41:40 -0000 1.7 @@ -1,6 +1,5 @@ #!/usr/bin/env python -import bootstrap import Tkinter import tkFileDialog import urllib2 @@ -182,8 +181,12 @@ self.panel = frame frame.pack( fill = Tkinter.BOTH ) Tkinter.Label( frame, text = self.title ).pack( side = Tkinter.TOP, fill = Tkinter.NONE, anchor = Tkinter.NW ) - self.b_client = Tkinter.Button( frame, text = "Client", command = self.client ) - self.b_client.pack( side = Tkinter.RIGHT, anchor = Tkinter.E ) + self.b_fx = Tkinter.Button( frame, text = "FX", command = self.fx ) + self.b_fx.pack( side = Tkinter.RIGHT, anchor = Tkinter.E ) + self.b_console = Tkinter.Button( frame, text = "Console", command = self.console ) + self.b_console.pack( side = Tkinter.RIGHT, anchor = Tkinter.E ) + self.b_transport = Tkinter.Button( frame, text = "Transport", command = self.transport ) + self.b_transport.pack( side = Tkinter.RIGHT, anchor = Tkinter.E ) self.b_browse = Tkinter.Button( frame, text = "Browse", command = self.browse ) self.b_browse.pack( side = Tkinter.RIGHT, anchor = Tkinter.E ) self.b_stop = Tkinter.Button( frame, text = "Stop", command = self.stop ) @@ -201,14 +204,18 @@ def show_state( self ): if self.running: - self.b_client.config( state = Tkinter.NORMAL ) + self.b_fx.config( state = Tkinter.NORMAL ) + self.b_console.config( state = Tkinter.NORMAL ) + self.b_transport.config( state = Tkinter.NORMAL ) self.b_browse.config( state = Tkinter.NORMAL ) self.b_home.config( state = Tkinter.DISABLED ) self.b_stop.config( state = Tkinter.NORMAL ) self.b_start.config( state = Tkinter.DISABLED ) self.b_secure.config( state = Tkinter.DISABLED ) else: - self.b_client.config( state = Tkinter.DISABLED ) + self.b_fx.config( state = Tkinter.DISABLED ) + self.b_console.config( state = Tkinter.DISABLED ) + self.b_transport.config( state = Tkinter.DISABLED ) self.b_browse.config( state = Tkinter.DISABLED ) self.b_home.config( state = Tkinter.NORMAL ) self.b_stop.config( state = Tkinter.DISABLED ) @@ -244,13 +251,19 @@ self.dir = dir def browse( self ): - os.spawnvpe( os.P_NOWAIT, "firefox", [ "firefox", "http://" + self.server + ":" + str( self.jcap_port ) ], os.environ ) + os.spawnvpe( os.P_NOWAIT, "python", [ "python", "jbatch_select.py", "--host=%s" % self.server, "--port=%d" % self.jbat_port ], os.environ ) def play( self ): - os.spawnvpe( os.P_NOWAIT, "jbatch_tk", [ "jbatch_tk", "oml:http://" + self.server + ":" + str( self.jcap_port ) + self.uri ], os.environ ) + os.spawnvpe( os.P_NOWAIT, "python", [ "python", "jbatch_tk", "oml:http://" + self.server + ":" + str( self.jcap_port ) + self.uri ], os.environ ) - def client( self ): - os.spawnvpe( os.P_NOWAIT, "jbatch_ui", [ "jbatch_ui", "--port=%d" % self.jbat_port ], os.environ ) + def fx( self ): + os.spawnvpe( os.P_NOWAIT, "python", [ "python", "jbatch_ui.py", "--port=%d" % self.jbat_port ], os.environ ) + + def transport( self ): + os.spawnvpe( os.P_NOWAIT, "python", [ "python", "jbatch_transport.py", "--port=%d" % self.jbat_port ], os.environ ) + + def console( self ): + os.spawnvpe( os.P_NOWAIT, "python", [ "python", "jbatch_console.py", "--port=%d" % self.jbat_port ], os.environ ) class local_render( local_audio ): def __init__( self, master ): @@ -273,8 +286,12 @@ self.panel = frame frame.pack( fill = Tkinter.BOTH ) Tkinter.Label( frame, text = self.title ).pack( side = Tkinter.TOP, fill = Tkinter.NONE, anchor = Tkinter.NW ) - self.b_client = Tkinter.Button( frame, text = "Client", command = self.client ) - self.b_client.pack( side = Tkinter.RIGHT, anchor = Tkinter.E ) + self.b_fx = Tkinter.Button( frame, text = "FX", command = self.fx ) + self.b_fx.pack( side = Tkinter.RIGHT, anchor = Tkinter.E ) + self.b_console = Tkinter.Button( frame, text = "Console", command = self.console ) + self.b_console.pack( side = Tkinter.RIGHT, anchor = Tkinter.E ) + self.b_transport = Tkinter.Button( frame, text = "Transport", command = self.transport ) + self.b_transport.pack( side = Tkinter.RIGHT, anchor = Tkinter.E ) self.b_play = Tkinter.Button( frame, text = "Play", command = self.play ) self.b_play.pack( side = Tkinter.RIGHT, anchor = Tkinter.E ) self.b_browse = Tkinter.Button( frame, text = "Browse", command = self.browse ) @@ -291,7 +308,9 @@ def show_state( self ): if self.running: - self.b_client.config( state = Tkinter.NORMAL ) + self.b_fx.config( state = Tkinter.NORMAL ) + self.b_transport.config( state = Tkinter.NORMAL ) + self.b_console.config( state = Tkinter.NORMAL ) self.b_play.config( state = Tkinter.NORMAL ) self.b_browse.config( state = Tkinter.NORMAL ) self.b_home.config( state = Tkinter.DISABLED ) @@ -299,7 +318,9 @@ self.b_start.config( state = Tkinter.DISABLED ) self.b_secure.config( state = Tkinter.DISABLED ) else: - self.b_client.config( state = Tkinter.DISABLED ) + self.b_fx.config( state = Tkinter.DISABLED ) + self.b_console.config( state = Tkinter.DISABLED ) + self.b_transport.config( state = Tkinter.DISABLED ) self.b_play.config( state = Tkinter.DISABLED ) self.b_browse.config( state = Tkinter.DISABLED ) self.b_home.config( state = Tkinter.NORMAL ) @@ -343,8 +364,12 @@ self.panel = frame frame.pack( fill = Tkinter.BOTH ) Tkinter.Label( frame, text = self.title ).pack( side = Tkinter.TOP, fill = Tkinter.NONE, anchor = Tkinter.NW ) - self.b_client = Tkinter.Button( frame, text = "Client", command = self.client ) - self.b_client.pack( side = Tkinter.RIGHT, anchor = Tkinter.E ) + self.b_fx = Tkinter.Button( frame, text = "FX", command = self.fx ) + self.b_fx.pack( side = Tkinter.RIGHT, anchor = Tkinter.E ) + self.b_console = Tkinter.Button( frame, text = "Console", command = self.console ) + self.b_console.pack( side = Tkinter.RIGHT, anchor = Tkinter.E ) + self.b_transport = Tkinter.Button( frame, text = "Transport", command = self.transport ) + self.b_transport.pack( side = Tkinter.RIGHT, anchor = Tkinter.E ) self.b_browse = Tkinter.Button( frame, text = "Browse", command = self.browse ) self.b_browse.pack( side = Tkinter.RIGHT, anchor = Tkinter.E ) self.b_stop = Tkinter.Button( frame, text = "Stop", command = self.stop ) @@ -362,14 +387,18 @@ def show_state( self ): if self.running: - self.b_client.config( state = Tkinter.NORMAL ) + self.b_fx.config( state = Tkinter.NORMAL ) + self.b_console.config( state = Tkinter.NORMAL ) + self.b_transport.config( state = Tkinter.NORMAL ) self.b_browse.config( state = Tkinter.NORMAL ) self.b_home.config( state = Tkinter.DISABLED ) self.b_stop.config( state = Tkinter.NORMAL ) self.b_start.config( state = Tkinter.DISABLED ) self.b_secure.config( state = Tkinter.DISABLED ) else: - self.b_client.config( state = Tkinter.DISABLED ) + self.b_fx.config( state = Tkinter.DISABLED ) + self.b_console.config( state = Tkinter.DISABLED ) + self.b_transport.config( state = Tkinter.DISABLED ) self.b_browse.config( state = Tkinter.DISABLED ) self.b_home.config( state = Tkinter.NORMAL ) self.b_stop.config( state = Tkinter.DISABLED ) @@ -423,7 +452,7 @@ os.spawnvpe( os.P_NOWAIT, "jbatch_tk", [ "jbatch_tk", "oml:http://" + self.server + self.info[ "capture" ] ], os.environ ) def browse( self ): - os.spawnvpe( os.P_NOWAIT, "firefox", [ "firefox", "http://" + self.server ], os.environ ) + os.spawnvpe( os.P_NOWAIT, "python", [ "python", "jbatch_select.py", "--host=%s" % self.server, "--port=%d" % self.jcap_port ], os.environ ) class App( Tkinter.Frame ): |