Fix cancellation of Terminalshot dialog

This commit is contained in:
Chris Jones 2010-06-10 14:51:24 +01:00
parent 6229de7387
commit 3c0d7bd566
1 changed files with 3 additions and 1 deletions

View File

@ -47,7 +47,9 @@ class TerminalShot(plugin.MenuItem):
savedialog.show_all()
response = savedialog.run()
if response not in [gtk.RESPONSE_NONE, gtk.RESPONSE_DELETE_EVENT]:
path = None
if response not in [gtk.RESPONSE_NONE, gtk.RESPONSE_DELETE_EVENT,
gtk.RESPONSE_CANCEL]:
path = os.path.join(savedialog.get_current_folder(),
savedialog.get_filename())
savedialog.destroy()