Changeset - 317c2d2e22da
[Not reviewed]
default
0 2 0
drewp@bigasterisk.com - 12 years ago 2012-07-18 10:07:22
drewp@bigasterisk.com
SC channel sort
Ignore-this: e97aabaf8011f385a661a519bdb3dd84
2 files changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
bin/subcomposer
Show inline comments
 
#!bin/python
 

	
 
from __future__ import division, nested_scopes
 
import sys,os,time,atexit
 
from optparse import OptionParser
 
import Tkinter as tk
 
import louie as dispatcher
 
from twisted.internet import reactor, tksupport, task
 

	
 
import run_local
 
from light9.dmxchanedit import Levelbox
 
from light9 import dmxclient, Patch, Submaster, showconfig, prof
 
from light9.uihelpers import toplevelat
 
from light9.rdfdb.syncedgraph import SyncedGraph
 

	
 
class Subcomposer(tk.Frame):
light9/dmxchanedit.py
Show inline comments
 
@@ -125,24 +125,25 @@ class Levelbox(tk.Frame):
 
        tk.Frame.__init__(self,parent)
 

	
 
        self.graph = graph
 
        graph.addHandler(self.updateChannels)
 

	
 
    def updateChannels(self):
 
        """(re)make Onelevel boxes for the defined channels"""
 

	
 
        [ch.destroy() for ch in self.winfo_children()]
 
        self.levels = [] # Onelevel objects
 

	
 
        chans = list(self.graph.subjects(RDF.type, L9.Channel))
 
        chans.sort(key=lambda c: int(self.graph.value(c, L9.output).rsplit('/c')[-1]))
 
        cols = 2
 
        rows = len(chans) // cols
 

	
 
        def make_frame(parent):
 
             f = tk.Frame(parent, bd=0, bg='black')
 
             f.pack(side='left')
 
             return f
 
        
 
        columnFrames = [make_frame(self) for x in range(cols)]
 

	
 
        for i, channel in enumerate(chans): # sort?
 
            # frame for this channel
0 comments (0 inline, 0 general)