Changeset - 54774cba50c9
[Not reviewed]
default
1 2 1
Drew Perttula - 20 years ago 2005-06-17 17:52:56
drewp@bigasterisk.com
revive kcclient and fix subcomposer so kcclient works through refreshes
3 files changed with 16 insertions and 5 deletions:
0 comments (0 inline, 0 general)
bin/kcclient
Show inline comments
 
file renamed from flax/kcclient to bin/kcclient
 
@@ -3,6 +3,8 @@
 
"""send KeyboardComposer a fade request, for use from the shell"""
 

	
 
import sys,xmlrpclib
 
import run_local
 
from light9 import networking
 

	
 
subname = sys.argv[1]
 
level = float(sys.argv[2])
 
@@ -10,7 +12,9 @@ fadesecs = 0
 
if len(sys.argv)>3:
 
    fadesecs = float(sys.argv[3])
 

	
 
levelserver = xmlrpclib.ServerProxy("http://localhost:8050")
 
levelserver = xmlrpclib.ServerProxy("http://%s:%s" %
 
                                    (networking.kcServer(),
 
                                     networking.kcPort()))
 

	
 
levelserver.fadesub(subname,level,fadesecs)
 

	
bin/keyboardcomposer
Show inline comments
 
@@ -12,9 +12,10 @@ import run_local
 
from light9.Fadable import Fadable
 
from light9.Submaster import Submasters, sub_maxes
 
from light9.subclient import SubClient
 
from light9 import dmxclient, showconfig
 
from light9 import dmxclient, showconfig, networking
 
from light9.uihelpers import toplevelat
 

	
 

	
 
nudge_keys = {
 
    'up' : list('qwertyuiop'),
 
    'down' : list('asdfghjkl')
 
@@ -59,7 +60,7 @@ class KeyboardComposer(Frame, SubClient)
 
        Frame.__init__(self, root, bg='black')
 
        SubClient.__init__(self)
 
        self.submasters = submasters
 

	
 
        self.name_to_subtk = {}
 
        self.current_sub_levels = {}
 
        if current_sub_levels:
 
            self.current_sub_levels = current_sub_levels
 
@@ -76,7 +77,7 @@ class KeyboardComposer(Frame, SubClient)
 
        self.rows = [] # this holds Tk Frames for each row
 
        self.slider_vars = {} # this holds subname:sub Tk vars
 
        self.slider_table = {} # this holds coords:sub Tk vars
 
        self.name_to_subtk = {} # subname : SubmasterTk instance
 
        self.name_to_subtk.clear() # subname : SubmasterTk instance
 
        self.current_row = 0
 
        
 
        self.make_key_hints()
 
@@ -261,7 +262,7 @@ if __name__ == "__main__":
 
    kc.pack(fill=BOTH, expand=1)
 

	
 
    ls = LevelServer(kc.name_to_subtk)
 
    reactor.listenTCP(8050, server.Site(ls))
 
    reactor.listenTCP(networking.kcPort(), server.Site(ls))
 

	
 
    root.protocol('WM_DELETE_WINDOW', reactor.stop)
 
    reactor.addSystemEventTrigger('after', 'shutdown', kc.save)
light9/networking.py
Show inline comments
 
@@ -18,3 +18,9 @@ def musicPort():
 
def mpdServer():
 
    """servername, port"""
 
    return 'dash',6600
 

	
 
def kcPort():
 
    return 8050
 

	
 
def kcServer():
 
    return 'dash'
0 comments (0 inline, 0 general)