--- ../pygobject.svn.trunk/gobject/pygsource.c	2008-03-27 16:12:25.000000000 -0500
+++ gobject/pygsource.c	2008-03-27 16:27:36.000000000 -0500
@@ -381,11 +381,27 @@
     return PyInt_FromLong(g_source_get_id(self->source));
 }
 
+static PyObject *
+pyg_source_get_is_destroyed(PyGSource *self, void *closure)
+{
+    if (!self->source)
+    {
+        PyErr_SetString(PyExc_ValueError, "operation on deallocated source");
+
+        return NULL;
+    }
+    else if (g_source_is_destroyed(self->source))
+        Py_RETURN_TRUE;
+    else
+        Py_RETURN_FALSE;
+}
+
 static PyGetSetDef pyg_source_getsets[] = {
     { "__dict__", (getter)pyg_source_get_dict,  (setter)0 },
     {"priority", (getter)pyg_source_get_priority, (setter)pyg_source_set_priority },
     {"can_recurse", (getter)pyg_source_get_can_recurse, (setter)pyg_source_set_can_recurse },
     {"id", (getter)pyg_source_get_id, (setter)0 },
+    {"is_destroyed", (getter)pyg_source_get_is_destroyed, (setter)0 },
     {NULL, 0, 0}
 };
 
