changeset 16:7dbe8067acea

fixed bug with channel levels not displaying fixed bug with channel levels not displaying moved an import from rsn to io
author drewp
date Sun, 07 Jul 2002 06:33:29 +0000
parents c76b62eccdec
children 43aa1ee8b3a9
files light8/io.py light8/panels.py light8/rsn.py
diffstat 3 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/light8/io.py	Sun Jul 07 06:18:40 2002 +0000
+++ b/light8/io.py	Sun Jul 07 06:33:29 2002 +0000
@@ -1,9 +1,13 @@
+
+
+from parport import *
 
 DUMMY=1
 
 def init(DUMMY_in):
     global DUMMY
     if not DUMMY_in:
+        
         getparport()
         DUMMY=0
 
--- a/light8/panels.py	Sun Jul 07 06:18:40 2002 +0000
+++ b/light8/panels.py	Sun Jul 07 06:33:29 2002 +0000
@@ -43,23 +43,23 @@
         self.frame.focus()
 
 class Leveldisplay:
-    def __init__(self,parent,_oldlevels):
-        global channel_levels
+    def __init__(self,parent,_oldlevels,channel_levels):
         
         frames = (make_frame(parent), make_frame(parent))
-        channel_levels=[]
+        channel_levels[:]=[]
         for channel in range(1, 69):
             f=Frame(frames[channel > 34])
             Label(f,text=str(channel), width=3, bg='lightPink', 
                 font=stdfont, padx=0, pady=0, bd=0, height=1).pack(side='left')
             Label(f,text=Patch.get_channel_name(channel), width=8, 
                 font=stdfont, anchor='w', padx=0, pady=0, bd=0, height=1).pack(side='left')
-            l=Label(f,text=_oldlevels[channel-1], width=3, bg='lightBlue', 
+            l=Label(f, width=3, bg='lightBlue', #text=_oldlevels[channel-1],
                 font=stdfont, anchor='e', padx=1, pady=0, bd=0, height=1)
             l.pack(side='left')
             colorlabel(l)
             channel_levels.append(l)
             f.pack(side='top')
+        # channel_levels is an output - changelevel will use it to access these labels
 
 class Subpanels:
     def __init__(self,scenesparent,effectsparent,scalelevels,Subs,xfader,changelevel):
--- a/light8/rsn.py	Sun Jul 07 06:18:40 2002 +0000
+++ b/light8/rsn.py	Sun Jul 07 06:33:29 2002 +0000
@@ -2,7 +2,6 @@
 from __future__ import nested_scopes
 
 from Tkinter import *
-from parport import *
 from time import sleep
 from signal import *
 import sys, thread, cPickle
@@ -55,7 +54,7 @@
             levels[ch-1] = max(levels[ch-1], fadelev)
 
     levels = [int(l) for l in levels]
-    
+
     for lev,lab,oldlev in zip(levels, channel_levels, _oldlevels):
         if lev != oldlev:
             lab.config(text="%d" % lev)
@@ -112,7 +111,7 @@
     leveldisplay=toplevelat(873,400)
     leveldisplay.bind('<Escape>', sys.exit)
 
-    Leveldisplay(leveldisplay,_oldlevels)
+    Leveldisplay(leveldisplay,_oldlevels,channel_levels)
 
     Console()