Commit 60d58406 authored by Kurt B. Kaiser's avatar Kurt B. Kaiser

Add confirmation dialog before printing. Patch 1717170 Tal Einat.

parent ea684743
......@@ -465,13 +465,23 @@ class IOBinding:
self.text.insert("end-1c", "\n")
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
saved = self.get_saved()
if saved:
filename = self.filename
# shell undo is reset after every prompt, looks saved, probably isn't
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_')
filename = tempfilename
os.close(tfd)
......
......@@ -3,6 +3,8 @@ What's New in IDLE 2.6a1?
*Release date: XX-XXX-200X*
- Add confirmation dialog before printing. Patch 1717170 Tal Einat.
- Show paste position if > 80 col. Patch 1659326 Tal Einat.
- Update cursor color without restarting. Patch 1725576 Tal Einat.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment