summaryrefslogtreecommitdiff
path: root/examples/gtk/filechooser.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/gtk/filechooser.py')
-rw-r--r--examples/gtk/filechooser.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/examples/gtk/filechooser.py b/examples/gtk/filechooser.py
index 11c62f08..283a4957 100644
--- a/examples/gtk/filechooser.py
+++ b/examples/gtk/filechooser.py
@@ -3,10 +3,6 @@ pygtk.require('2.0')
import gtk
-if gtk.pygtk_version < (2,3,90):
- print "PyGtk 2.3.90 or later required for this example"
- raise SystemExit
-
dialog = gtk.FileChooserDialog("Open..",
None,
gtk.FILE_CHOOSER_ACTION_OPEN,
@@ -34,7 +30,7 @@ dialog.add_filter(filter)
response = dialog.run()
if response == gtk.RESPONSE_OK:
print dialog.get_filename(), 'selected'
-elif response == gtk.RESPONSE:
+elif response == gtk.RESPONSE_CANCEL:
print 'Closed, no files selected'
dialog.destroy()