summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJohn Stowers <john.stowers@gmail.com>2010-10-16 12:59:59 +1300
committerJohn Stowers <john.stowers@gmail.com>2010-10-16 12:59:59 +1300
commit368c3a972b47b8fca5608e50a3c9024d158fcb10 (patch)
tree469ca45ee18f134b25b4c7eefc3ac2ac952acd7b /examples
parent3f0d8b9716deb2621f9aef2c81f156a03dfb3b57 (diff)
downloadpygtk-368c3a972b47b8fca5608e50a3c9024d158fcb10.tar.gz
Fix response signal in pygtk-demo/print_editor
* fixes bug 614720
Diffstat (limited to 'examples')
-rw-r--r--examples/pygtk-demo/demos/print_editor.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/pygtk-demo/demos/print_editor.py b/examples/pygtk-demo/demos/print_editor.py
index 6ed7f8d5..b3604741 100644
--- a/examples/pygtk-demo/demos/print_editor.py
+++ b/examples/pygtk-demo/demos/print_editor.py
@@ -88,7 +88,7 @@ def load_file(open_filename):
else:
set_text(contents)
if error_dialog is not None:
- error_dialog.connect("response", gtk.Widget.destroy)
+ error_dialog.connect("response", lambda w,resp: w.destroy())
error_dialog.show()
@@ -121,7 +121,7 @@ def save_file(save_filename):
"Error saving to file %s:\n%s" %
(open_filename,
str(ex)))
- error_dialog.connect("response", gtk.Widget.destroy)
+ error_dialog.connect("response", lambda w,resp: w.destroy())
error_dialog.show()
else:
if save_filename != filename:
@@ -254,7 +254,7 @@ def do_print(action):
gtk._MESSAGE_ERROR,
gtk.BUTTONS_CLOSE,
("Error printing file:\n%s" % str(ex)))
- error_dialog.connect("response", gtk.Widget.destroy)
+ error_dialog.connect("response", lambda w,resp: w.destroy())
error_dialog.show()
else:
if res == gtk.PRINT_OPERATION_RESULT_APPLY: