Commit 42f6c648 authored by Steven M. Gava's avatar Steven M. Gava

py-cvs merge, better error dialog

parent 9713992b
...@@ -34,13 +34,13 @@ To fix case 2, change all tabs to spaces by using Select All followed \ ...@@ -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).""" by Untabify Region (both in the Edit menu)."""
class ScriptBinding: class ScriptBinding:
keydefs = { keydefs = {
'<<check-module>>': ['<Alt-F5>', '<Meta-F5>'], '<<check-module>>': ['<Alt-F5>', '<Meta-F5>'],
'<<import-module>>': ['<F5>'], '<<import-module>>': ['<F5>'],
'<<run-script>>': ['<Control-F5>'], '<<run-script>>': ['<Control-F5>'],
} }
menudefs = [ menudefs = [
('edit', [None, ('edit', [None,
('Check module', '<<check-module>>'), ('Check module', '<<check-module>>'),
...@@ -152,8 +152,12 @@ class ScriptBinding: ...@@ -152,8 +152,12 @@ class ScriptBinding:
# Logic to make sure we have a saved filename # Logic to make sure we have a saved filename
# XXX Better logic would offer to save! # XXX Better logic would offer to save!
if not self.editwin.get_saved(): if not self.editwin.get_saved():
name = (self.editwin.short_title() or
self.editwin.long_title() or
"Untitled")
self.errorbox("Not saved", 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() self.editwin.text.focus_set()
return return
filename = self.editwin.io.filename filename = self.editwin.io.filename
......
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