mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Add confirmation dialog before printing. Patch 1717170 Tal Einat.
This commit is contained in:
parent
ea684743da
commit
60d58406d0
2 changed files with 13 additions and 1 deletions
|
@ -465,13 +465,23 @@ class IOBinding:
|
||||||
self.text.insert("end-1c", "\n")
|
self.text.insert("end-1c", "\n")
|
||||||
|
|
||||||
def print_window(self, event):
|
def print_window(self, event):
|
||||||
|
m = tkMessageBox.Message(
|
||||||
|
title="Print",
|
||||||
|
message="Print to Default Printer",
|
||||||
|
icon=tkMessageBox.QUESTION,
|
||||||
|
type=tkMessageBox.OKCANCEL,
|
||||||
|
default=tkMessageBox.OK,
|
||||||
|
master=self.text)
|
||||||
|
reply = m.show()
|
||||||
|
if reply != tkMessageBox.OK:
|
||||||
|
self.text.focus_set()
|
||||||
|
return "break"
|
||||||
tempfilename = None
|
tempfilename = None
|
||||||
saved = self.get_saved()
|
saved = self.get_saved()
|
||||||
if saved:
|
if saved:
|
||||||
filename = self.filename
|
filename = self.filename
|
||||||
# shell undo is reset after every prompt, looks saved, probably isn't
|
# shell undo is reset after every prompt, looks saved, probably isn't
|
||||||
if not saved or filename is None:
|
if not saved or filename is None:
|
||||||
# XXX KBK 08Jun03 Wouldn't it be better to ask the user to save?
|
|
||||||
(tfd, tempfilename) = tempfile.mkstemp(prefix='IDLE_tmp_')
|
(tfd, tempfilename) = tempfile.mkstemp(prefix='IDLE_tmp_')
|
||||||
filename = tempfilename
|
filename = tempfilename
|
||||||
os.close(tfd)
|
os.close(tfd)
|
||||||
|
|
|
@ -3,6 +3,8 @@ What's New in IDLE 2.6a1?
|
||||||
|
|
||||||
*Release date: XX-XXX-200X*
|
*Release date: XX-XXX-200X*
|
||||||
|
|
||||||
|
- Add confirmation dialog before printing. Patch 1717170 Tal Einat.
|
||||||
|
|
||||||
- Show paste position if > 80 col. Patch 1659326 Tal Einat.
|
- Show paste position if > 80 col. Patch 1659326 Tal Einat.
|
||||||
|
|
||||||
- Update cursor color without restarting. Patch 1725576 Tal Einat.
|
- Update cursor color without restarting. Patch 1725576 Tal Einat.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue