Changeset - c58e781829a3
[Not reviewed]
default
0 1 0
David McClosky - 18 years ago 2007-06-15 20:45:35
dmcc@bigasterisk.com
keyboardcomposer: sort subs by group, then order, then name
1 file changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
bin/keyboardcomposer
Show inline comments
 
@@ -175,7 +175,6 @@ class KeyboardComposer(Frame, SubClient)
 
        row = self.rows[self.current_row]
 
        self.keyhints.pack_configure(before=row)
 

	
 
        
 
        for col in range(8):
 
            try:
 
                subtk = self.slider_table[(self.current_row, col)]
 
@@ -187,7 +186,6 @@ class KeyboardComposer(Frame, SubClient)
 
                continue
 
            self.send_to_hw(subtk.name, col + 1)
 

	
 
            
 
    def got_nudger(self, number, direction, full=0):
 
        subtk = self.slider_table[(self.current_row, number)]
 
        if direction == 'up':
 
@@ -216,10 +214,12 @@ class KeyboardComposer(Frame, SubClient)
 
        col = 0
 
        last_group = None
 
        graph = showconfig.getGraph()
 
        withgroups = sorted((graph.value(sub.uri, L9['group']), sub)
 
        withgroups = sorted((graph.value(sub.uri, L9['group']), 
 
                             graph.value(sub.uri, L9['order']), 
 
                             sub)
 
            for sub in self.submasters.get_all_subs())
 

	
 
        for group, sub in withgroups:
 
        for group, order, sub in withgroups:
 
            group = graph.value(sub.uri, L9['group'])
 

	
 
            if col == 0 or group != last_group: # make new row
0 comments (0 inline, 0 general)