From: Steven M. Gava Date: Thu, 12 Jul 2001 06:46:53 +0000 (+0000) Subject: py-cvs merge, better error dialog X-Git-Tag: v2.2a3~1255 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=42f6c64816b87411dd7c20467963487456442248;p=python py-cvs merge, better error dialog --- diff --git a/Lib/idlelib/ScriptBinding.py b/Lib/idlelib/ScriptBinding.py index aa46c680b8..b54dfc4c79 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 = { '<>': ['', ''], '<>': [''], '<>': [''], } - + menudefs = [ ('edit', [None, ('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