# HG changeset patch # User David McClosky # Date 2005-06-17 02:21:19 # Node ID d5858e9fa68932585018ab67c296a83f63e22e41 # Parent 9de7bbf50267d59496427ffd83ad9072f6fbcb74 keyboardcomposer destroy fix and cleanups - We were destroying KeyboardComposer a little too much. Fortunately, we weren't passing the right number of arguments, so this was merely an error. - About the TODO comment removed: we don't need to use combine_dict since Submaster logic will be changed entirely when we/if we move to a SubServer world and keyboard composer will not be the wiser. diff --git a/bin/keyboardcomposer b/bin/keyboardcomposer --- a/bin/keyboardcomposer +++ b/bin/keyboardcomposer @@ -1,9 +1,9 @@ #!/usr/bin/python -from __future__ import division,nested_scopes +from __future__ import division, nested_scopes import sys, time -from twisted.internet import reactor,tksupport +from twisted.internet import reactor, tksupport from twisted.web import xmlrpc, server from Tix import * import pickle @@ -205,7 +205,6 @@ class KeyboardComposer(Frame, SubClient) return dict([(name, slidervar.get()) for name, slidervar in self.slider_vars.items()]) def get_levels_as_sub(self): - # TODO this should be adapted to use Submaster.combine_subdict scaledsubs = [self.submasters.get_sub_by_name(sub) * level \ for sub, level in self.get_levels().items()] @@ -264,10 +263,8 @@ if __name__ == "__main__": ls = LevelServer(kc.name_to_subtk) reactor.listenTCP(8050, server.Site(ls)) - root.bind("",reactor.stop) root.protocol('WM_DELETE_WINDOW', reactor.stop) - reactor.addSystemEventTrigger('after','shutdown',kc.save) - + reactor.addSystemEventTrigger('after', 'shutdown', kc.save) tksupport.install(root,ms=10) reactor.run()