[pygtk] Fix response signal in pygtk-demo/print_editor



commit 368c3a972b47b8fca5608e50a3c9024d158fcb10
Author: John Stowers <john stowers gmail com>
Date:   Sat Oct 16 12:59:59 2010 +1300

    Fix response signal in pygtk-demo/print_editor
    
    	* fixes bug 614720

 examples/pygtk-demo/demos/print_editor.py |    6 +++---
 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 6ed7f8d..b360474 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:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]