mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Close the window when receiving a close request; turn time into int.
This commit is contained in:
parent
e89341250d
commit
7b74176762
1 changed files with 2 additions and 1 deletions
|
@ -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()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue