Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-python/pygtk/ChangeLog,v
retrieving revision 1.478
diff -u -u -r1.478 ChangeLog
--- ChangeLog	17 Oct 2002 03:12:10 -0000	1.478
+++ ChangeLog	4 Nov 2002 19:29:17 -0000
@@ -1,3 +1,16 @@
+2002-11-04  Johan Dahlin  <jdahlin@async.com.br>
+
+	* gtk/gtkmodule.c (init_gtk): Added a timeout that calls
+	python_do_pending_calls every 100 ms.
+	(python_do_pending_calls): Call PyErr_CheckSignals, so Ctrl-C
+	works as expected inside of gtk_main().
+
+2002-10-22  Johan Dahlin  <jdahlin@telia.com>
+
+	* gtk/gtkmodule.c (init_gtk): Add a timeout add, that makes sure 
+	KeyboardInterrupt is called if the user presses controll C. Fixes
+	#96018 and #72333.
+
 2002-10-17  Johan Dahlin  <jdahlin@telia.com>
 
 	* gtk/gtk.override: s/arg/argument/ in exception strings.
Index: gtk/gtkmodule.c
===================================================================
RCS file: /cvs/gnome/gnome-python/pygtk/gtk/gtkmodule.c,v
retrieving revision 1.37
diff -u -u -r1.37 gtkmodule.c
--- gtk/gtkmodule.c	18 Aug 2002 02:55:19 -0000	1.37
+++ gtk/gtkmodule.c	4 Nov 2002 19:29:17 -0000
@@ -9,6 +9,7 @@
 /* include this first, before NO_IMPORT_PYGOBJECT is defined */
 #include <pygobject.h>
 #include "pygtk-private.h"
+#include <pyerrors.h>
 
 void _pygtk_register_boxed_types(PyObject *moddict);
 void pygtk_register_classes(PyObject *d);
@@ -34,6 +35,17 @@
     }
 }
 
+static gboolean
+python_do_pending_calls(gpointer data)
+{
+    if (PyErr_CheckSignals() == -1) {
+	PyErr_SetNone(PyExc_KeyboardInterrupt);
+	gtk_main_quit();
+    }
+    
+    return TRUE;
+}
+
 DL_EXPORT(void)
 init_gtk(void)
 {
@@ -153,5 +165,6 @@
 
     if (PyErr_Occurred())
 	Py_FatalError("can't initialise module _gtk");
-
+    
+    gtk_timeout_add(100, python_do_pending_calls, NULL);
 }
