Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
0b634efc
Commit
0b634efc
authored
Oct 04, 2007
by
Kurt B. Kaiser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up EditorWindow close.
parent
85897c9b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
14 deletions
+19
-14
Lib/idlelib/EditorWindow.py
Lib/idlelib/EditorWindow.py
+14
-13
Lib/idlelib/FileList.py
Lib/idlelib/FileList.py
+1
-1
Lib/idlelib/NEWS.txt
Lib/idlelib/NEWS.txt
+4
-0
No files found.
Lib/idlelib/EditorWindow.py
View file @
0b634efc
...
@@ -560,7 +560,8 @@ class EditorWindow(object):
...
@@ -560,7 +560,8 @@ class EditorWindow(object):
def
close_hook
(
self
):
def
close_hook
(
self
):
if
self
.
flist
:
if
self
.
flist
:
self
.
flist
.
close_edit
(
self
)
self
.
flist
.
unregister_maybe_terminate
(
self
)
self
.
flist
=
None
def
set_close_hook
(
self
,
close_hook
):
def
set_close_hook
(
self
,
close_hook
):
self
.
close_hook
=
close_hook
self
.
close_hook
=
close_hook
...
@@ -827,22 +828,21 @@ class EditorWindow(object):
...
@@ -827,22 +828,21 @@ class EditorWindow(object):
if
self
.
io
.
filename
:
if
self
.
io
.
filename
:
self
.
update_recent_files_list
(
new_file
=
self
.
io
.
filename
)
self
.
update_recent_files_list
(
new_file
=
self
.
io
.
filename
)
WindowList
.
unregister_callback
(
self
.
postwindowsmenu
)
WindowList
.
unregister_callback
(
self
.
postwindowsmenu
)
if
self
.
close_hook
:
self
.
close_hook
()
self
.
flist
=
None
colorizing
=
0
self
.
unload_extensions
()
self
.
unload_extensions
()
self
.
io
.
close
();
self
.
io
=
None
self
.
io
.
close
()
self
.
undo
=
None
# XXX
self
.
io
=
None
self
.
undo
=
None
if
self
.
color
:
if
self
.
color
:
colorizing
=
self
.
color
.
colorizing
self
.
color
.
close
(
False
)
doh
=
colorizing
and
self
.
top
self
.
color
=
None
self
.
color
.
close
(
doh
)
# Cancel colorization
self
.
text
=
None
self
.
text
=
None
self
.
tkinter_vars
=
None
self
.
tkinter_vars
=
None
self
.
per
.
close
();
self
.
per
=
None
self
.
per
.
close
()
if
not
colorizing
:
self
.
per
=
None
self
.
top
.
destroy
()
self
.
top
.
destroy
()
if
self
.
close_hook
:
# unless override: unregister from flist, terminate if last window
self
.
close_hook
()
def
load_extensions
(
self
):
def
load_extensions
(
self
):
self
.
extensions
=
{}
self
.
extensions
=
{}
...
@@ -1504,6 +1504,7 @@ def test():
...
@@ -1504,6 +1504,7 @@ def test():
filename
=
None
filename
=
None
edit
=
EditorWindow
(
root
=
root
,
filename
=
filename
)
edit
=
EditorWindow
(
root
=
root
,
filename
=
filename
)
edit
.
set_close_hook
(
root
.
quit
)
edit
.
set_close_hook
(
root
.
quit
)
edit
.
text
.
bind
(
"<<close-all-windows>>"
,
edit
.
close_event
)
root
.
mainloop
()
root
.
mainloop
()
root
.
destroy
()
root
.
destroy
()
...
...
Lib/idlelib/FileList.py
View file @
0b634efc
...
@@ -50,7 +50,7 @@ class FileList:
...
@@ -50,7 +50,7 @@ class FileList:
break
break
return
"break"
return
"break"
def
close_edit
(
self
,
edit
):
def
unregister_maybe_terminate
(
self
,
edit
):
try
:
try
:
key
=
self
.
inversedict
[
edit
]
key
=
self
.
inversedict
[
edit
]
except
KeyError
:
except
KeyError
:
...
...
Lib/idlelib/NEWS.txt
View file @
0b634efc
...
@@ -3,6 +3,8 @@ What's New in IDLE 2.6a1?
...
@@ -3,6 +3,8 @@ What's New in IDLE 2.6a1?
*Release date: XX-XXX-200X*
*Release date: XX-XXX-200X*
- Clean up EditorWindow close.
- Corrected some bugs in AutoComplete. Also, Page Up/Down in ACW implemented;
- Corrected some bugs in AutoComplete. Also, Page Up/Down in ACW implemented;
mouse and cursor selection in ACWindow implemented; double Tab inserts
mouse and cursor selection in ACWindow implemented; double Tab inserts
current selection and closes ACW (similar to double-click and Return); scroll
current selection and closes ACW (similar to double-click and Return); scroll
...
@@ -24,6 +26,8 @@ What's New in IDLE 2.6a1?
...
@@ -24,6 +26,8 @@ What's New in IDLE 2.6a1?
- Bug #813342: Start the IDLE subprocess with -Qnew if the parent
- Bug #813342: Start the IDLE subprocess with -Qnew if the parent
is started with that option.
is started with that option.
- Honor the "Cancel" action in the save dialog (Debian bug #299092)
- Some syntax errors were being caught by tokenize during the tabnanny
- Some syntax errors were being caught by tokenize during the tabnanny
check, resulting in obscure error messages. Do the syntax check
check, resulting in obscure error messages. Do the syntax check
first. Bug 1562716, 1562719
first. Bug 1562716, 1562719
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment