Mercurial > code > home > repos > light9
changeset 268:d5858e9fa689
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.
author | David McClosky <dmcc@bigasterisk.com> |
---|---|
date | Fri, 17 Jun 2005 02:21:19 +0000 |
parents | 9de7bbf50267 |
children | 34db49e1bc20 |
files | bin/keyboardcomposer |
diffstat | 1 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/keyboardcomposer Fri Jun 17 03:49:07 2005 +0000 +++ b/bin/keyboardcomposer Fri Jun 17 02:21:19 2005 +0000 @@ -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 @@ 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 @@ ls = LevelServer(kc.name_to_subtk) reactor.listenTCP(8050, server.Site(ls)) - root.bind("<Destroy>",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()