diff options
author | Steven M. Gava <elguavas@python.net> | 2001-07-12 06:46:53 (GMT) |
---|---|---|
committer | Steven M. Gava <elguavas@python.net> | 2001-07-12 06:46:53 (GMT) |
commit | 42f6c64816b87411dd7c20467963487456442248 (patch) | |
tree | a56e1f317133c4ae5e7a8a3e5b1751f41a496113 | |
parent | 9713992badb42e02ec62415cd29ddc08d91924ea (diff) | |
download | cpython-42f6c64816b87411dd7c20467963487456442248.zip cpython-42f6c64816b87411dd7c20467963487456442248.tar.gz cpython-42f6c64816b87411dd7c20467963487456442248.tar.bz2 |
py-cvs merge, better error dialog
-rw-r--r-- | Lib/idlelib/ScriptBinding.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/idlelib/ScriptBinding.py b/Lib/idlelib/ScriptBinding.py index aa46c68..b54dfc4 100644 --- a/Lib/idlelib/ScriptBinding.py +++ b/Lib/idlelib/ScriptBinding.py @@ -34,13 +34,13 @@ To fix case 2, change all tabs to spaces by using Select All followed \ by Untabify Region (both in the Edit menu).""" class ScriptBinding: - + keydefs = { '<<check-module>>': ['<Alt-F5>', '<Meta-F5>'], '<<import-module>>': ['<F5>'], '<<run-script>>': ['<Control-F5>'], } - + menudefs = [ ('edit', [None, ('Check module', '<<check-module>>'), @@ -152,8 +152,12 @@ class ScriptBinding: # Logic to make sure we have a saved filename # XXX Better logic would offer to save! if not self.editwin.get_saved(): + name = (self.editwin.short_title() or + self.editwin.long_title() or + "Untitled") self.errorbox("Not saved", - "Please save first!") + "The buffer for %s is not saved.\n" % name + + "Please save it first!") self.editwin.text.focus_set() return filename = self.editwin.io.filename |