destroy FileChooserDialog when we press cancel.

This commit is contained in:
Yann Leboulanger 2006-09-16 15:52:52 +00:00
parent f69cd8ad5c
commit bcf163324e
1 changed files with 4 additions and 0 deletions

View File

@ -851,12 +851,16 @@ class FileChooserDialog(gtk.FileChooserDialog):
self.response_cancel[0](dialog, *self.response_cancel[1:]) self.response_cancel[0](dialog, *self.response_cancel[1:])
else: else:
self.response_cancel(dialog) self.response_cancel(dialog)
else:
self.just_destroy(dialog)
elif response == gtk.RESPONSE_OK: elif response == gtk.RESPONSE_OK:
if self.response_ok: if self.response_ok:
if isinstance(self.response_ok, tuple): if isinstance(self.response_ok, tuple):
self.response_ok[0](dialog, *self.response_ok[1:]) self.response_ok[0](dialog, *self.response_ok[1:])
else: else:
self.response_ok(dialog) self.response_ok(dialog)
else:
self.just_destroy(dialog)
def just_destroy(self, widget): def just_destroy(self, widget):
self.destroy() self.destroy()