Close the window when receiving a close request; turn time into int.

This commit is contained in:
Guido van Rossum 1993-01-13 12:45:41 +00:00
parent e89341250d
commit 7b74176762

View file

@ -68,6 +68,7 @@ def cdispatch(event):
setdimensions(win) setdimensions(win)
elif type == WE_CLOSE: elif type == WE_CLOSE:
mainloop.unregister(win) mainloop.unregister(win)
win.close()
def setdimensions(win): def setdimensions(win):
width, height = win.getwinsize() width, height = win.getwinsize()
@ -198,6 +199,6 @@ def dd(n):
return '0'*(2-len(s)) + s return '0'*(2-len(s)) + s
def getlocaltime(): def getlocaltime():
return time.time() - TZDIFF return int(time.time() - TZDIFF)
main() main()