summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Henstridge <james@daa.com.au>2003-07-31 13:17:33 +0000
committerJames Henstridge <jamesh@src.gnome.org>2003-07-31 13:17:33 +0000
commite5687c0dc54011a83a97d9ec4c3676e5046b5c81 (patch)
treea87c4ef5721207187c86c88381209d59c4b89d45
parent5dde78e335bb41025520841809729401cf68ff14 (diff)
downloadpygobject-e5687c0dc54011a83a97d9ec4c3676e5046b5c81.tar.gz
pygobject-e5687c0dc54011a83a97d9ec4c3676e5046b5c81.tar.xz
pygobject-e5687c0dc54011a83a97d9ec4c3676e5046b5c81.zip
2003-07-31 James Henstridge <james@daa.com.au> * pygobject.c (pygobject_handler_is_connected): add wrapper (from bug #118676).
-rw-r--r--gobject/pygobject.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gobject/pygobject.c b/gobject/pygobject.c
index a76e35b..76e94cb 100644
--- a/gobject/pygobject.c
+++ b/gobject/pygobject.c
@@ -802,6 +802,21 @@ pygobject_disconnect(PyGObject *self, PyObject *args)
}
static PyObject *
+pygobject_handler_is_connected(PyGObject *self, PyObject *args)
+{
+ guint handler_id;
+ PyObject *ret;
+
+ if (!PyArg_ParseTuple(args, "i:GObject.handler_is_connected", &handler_id))
+ return NULL;
+
+ ret = g_signal_handler_is_connected(self->obj, handler_id)
+ ? Py_True : Py_False;
+ Py_INCREF(ret);
+ return ret;
+}
+
+static PyObject *
pygobject_handler_block(PyGObject *self, PyObject *args)
{
guint handler_id;
@@ -1012,6 +1027,7 @@ static PyMethodDef pygobject_methods[] = {
{ "connect_object_after", (PyCFunction)pygobject_connect_object_after, METH_VARARGS },
{ "disconnect", (PyCFunction)pygobject_disconnect, METH_VARARGS },
{ "handler_disconnect", (PyCFunction)pygobject_disconnect, METH_VARARGS },
+ { "handler_is_connected", (PyCFunction)pygobject_handler_is_connected, METH_VARARGS },
{ "handler_block", (PyCFunction)pygobject_handler_block, METH_VARARGS },
{ "handler_unblock", (PyCFunction)pygobject_handler_unblock,METH_VARARGS },
{ "emit", (PyCFunction)pygobject_emit, METH_VARARGS },