comparison light8/uihelpers.py @ 132:4136e92829e3

toplevelat is smarter now...and even more confusing toplevelat is smarter now...and even more confusing yay legacy names!
author dmcc
date Sat, 14 Jun 2003 14:56:44 +0000
parents e04f7b552bcd
children
comparison
equal deleted inserted replaced
131:35e0c467a292 132:4136e92829e3
39 39
40 # this would get called repeatedly for each child of the window (i 40 # this would get called repeatedly for each child of the window (i
41 # dont know why) so we unbind after the first Destroy event 41 # dont know why) so we unbind after the first Destroy event
42 tl.unbind("<Destroy>",tl._toplevelat_funcid) 42 tl.unbind("<Destroy>",tl._toplevelat_funcid)
43 43
44 def toplevelat(name): 44 def toplevelat(name, existingtoplevel=None):
45 tl = Toplevel() 45 tl = existingtoplevel or Toplevel()
46 tl.title(name)
46 47
47 try: 48 try:
48 f=open(".light9-window-geometry-%s" % name.replace(' ','_')) 49 f=open(".light9-window-geometry-%s" % name.replace(' ','_'))
49 windowlocations[name]=f.read() # file has no newline 50 windowlocations[name]=f.read() # file has no newline
50 except: 51 except: