From 3c0d7bd5663ef39845784b3a174edd4cf81c2970 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Thu, 10 Jun 2010 14:51:24 +0100 Subject: [PATCH] Fix cancellation of Terminalshot dialog --- terminatorlib/plugins/terminalshot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/terminatorlib/plugins/terminalshot.py b/terminatorlib/plugins/terminalshot.py index 529a432b..31785295 100755 --- a/terminatorlib/plugins/terminalshot.py +++ b/terminatorlib/plugins/terminalshot.py @@ -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()