diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2007-10-28 19:03:59 (GMT) |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2007-10-28 19:03:59 (GMT) |
commit | 60d58406d0d43190c0caaf2cf29d574b152dae53 (patch) | |
tree | 2a0ff06dfba46e0d2f5d1c6a9fdada000fab3e75 | |
parent | ea684743daa0c198ab327d07832eca48a9578c68 (diff) | |
download | cpython-60d58406d0d43190c0caaf2cf29d574b152dae53.zip cpython-60d58406d0d43190c0caaf2cf29d574b152dae53.tar.gz cpython-60d58406d0d43190c0caaf2cf29d574b152dae53.tar.bz2 |
Add confirmation dialog before printing. Patch 1717170 Tal Einat.
-rw-r--r-- | Lib/idlelib/IOBinding.py | 12 | ||||
-rw-r--r-- | Lib/idlelib/NEWS.txt | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/Lib/idlelib/IOBinding.py b/Lib/idlelib/IOBinding.py index 37aa08e..01d278e 100644 --- a/Lib/idlelib/IOBinding.py +++ b/Lib/idlelib/IOBinding.py @@ -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) diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 5d165bb..c1290f4 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -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. |