diff --git a/bin/keyboardcomposer b/bin/keyboardcomposer --- a/bin/keyboardcomposer +++ b/bin/keyboardcomposer @@ -212,7 +212,10 @@ class KeyboardComposer(Frame, SubClient) col = 0 last_group = None graph = showconfig.getGraph() - for sub in self.submasters.get_all_subs(): + withgroups = sorted((graph.value(sub.uri, L9['group']), sub) + for sub in self.submasters.get_all_subs()) + + for group, sub in withgroups: group = graph.value(sub.uri, L9['group']) if col == 0 or group != last_group: # make new row diff --git a/light9/Submaster.py b/light9/Submaster.py --- a/light9/Submaster.py +++ b/light9/Submaster.py @@ -173,7 +173,7 @@ class Submaster: return xfaded_sub def __cmp__(self, other): - raise NotImplementedError + """Compare by sub repr (name, hopefully)""" return cmp(repr(self), repr(other)) def __hash__(self): raise NotImplementedError