Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-python/pygtk/ChangeLog,v
retrieving revision 1.674
diff -u -p -r1.674 ChangeLog
--- ChangeLog	4 Sep 2003 15:25:46 -0000	1.674
+++ ChangeLog	18 Sep 2003 17:38:47 -0000
@@ -1,3 +1,16 @@
+2003-09-18  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* pygobject.c (pygobject_get_property): Get pspec from the real
+	class, not from self->obj's class.
+	(pygobject_set_property): idem.
+	(pygobject_connect): Get signal ID from the real class, not from
+	self->obj's class.
+	(pygobject_connect_after): idem.
+	(pygobject_connect_object): idem
+	(pygobject_connect_object_after): idem.
+	(pygobject_emit): idem.
+	(pygobject_stop_emission): idem.
+
 2003-09-04  James Henstridge  <james@daa.com.au>
 
 	* gtk/gtk.override (headers): add defs for GdkDisplay and GdkScreen
Index: gobjectmodule.c
===================================================================
RCS file: /cvs/gnome/gnome-python/pygtk/gobjectmodule.c,v
retrieving revision 1.121
diff -u -p -r1.121 gobjectmodule.c
--- gobjectmodule.c	24 Jul 2003 15:06:07 -0000	1.121
+++ gobjectmodule.c	18 Sep 2003 17:38:48 -0000
@@ -750,6 +750,8 @@ create_signal (GType instance_type, cons
     GType *param_types;
     guint signal_id;
 
+    g_message("registering signal '%s' for gtype %s", signal_name, g_type_name(instance_type));
+
     if (!PyArg_ParseTuple(tuple, "iOO", &signal_flags, &py_return_type,
 			  &py_param_types)) {
 	gchar buf[128];
@@ -790,6 +792,8 @@ create_signal (GType instance_type, cons
 			      (GSignalCMarshaller)0,
 			      return_type, n_params, param_types);
     g_free(param_types);
+
+    g_message("registering signal '%s': %i", signal_name, signal_id);
 
     if (signal_id == 0) {
 	gchar buf[128];
Index: pygobject.c
===================================================================
RCS file: /cvs/gnome/gnome-python/pygtk/pygobject.c,v
retrieving revision 1.19
diff -u -p -r1.19 pygobject.c
--- pygobject.c	31 Jul 2003 13:17:33 -0000	1.19
+++ pygobject.c	18 Sep 2003 17:38:48 -0000
@@ -514,7 +514,8 @@ pygobject_get_property(PyGObject *self, 
 
     if (!PyArg_ParseTuple(args, "s:GObject.get_property", &param_name))
 	return NULL;
-    pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(self->obj),
+    pspec = g_object_class_find_property((GObjectClass *) g_type_class_peek(
+					     pyg_type_from_object((PyObject *) self)),
 					 param_name);
     if (!pspec) {
 	PyErr_SetString(PyExc_TypeError,
@@ -539,7 +540,7 @@ pygobject_set_property(PyGObject *self, 
     if (!PyArg_ParseTuple(args, "sO:GObject.set_property", &param_name,
 			  &pvalue))
 	return NULL;
-    pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(self->obj),
+    pspec = g_object_class_find_property((GObjectClass *) g_type_class_peek(pyg_type_from_object((PyObject *) self)),
 					 param_name);
     if (!pspec) {
 	PyErr_SetString(PyExc_TypeError,
@@ -647,7 +648,7 @@ pygobject_connect(PyGObject *self, PyObj
 	PyErr_SetString(PyExc_TypeError, "second argument must be callable");
 	return NULL;
     }
-    if (!g_signal_parse_name(name, G_OBJECT_TYPE(self->obj),
+    if (!g_signal_parse_name(name, pyg_type_from_object((PyObject *) self),
 			     &sigid, &detail, TRUE)) {
 	PyErr_SetString(PyExc_TypeError, "unknown signal name");
 	return NULL;
@@ -689,7 +690,7 @@ pygobject_connect_after(PyGObject *self,
 	PyErr_SetString(PyExc_TypeError, "second argument must be callable");
 	return NULL;
     }
-    if (!g_signal_parse_name(name, G_OBJECT_TYPE(self->obj),
+    if (!g_signal_parse_name(name, pyg_type_from_object((PyObject *) self),
 			     &sigid, &detail, TRUE)) {
 	PyErr_SetString(PyExc_TypeError, "unknown signal name");
 	return NULL;
@@ -731,7 +732,7 @@ pygobject_connect_object(PyGObject *self
 	PyErr_SetString(PyExc_TypeError, "second argument must be callable");
 	return NULL;
     }
-    if (!g_signal_parse_name(name, G_OBJECT_TYPE(self->obj),
+    if (!g_signal_parse_name(name, pyg_type_from_object((PyObject *) self),
 			     &sigid, &detail, TRUE)) {
 	PyErr_SetString(PyExc_TypeError, "unknown signal name");
 	return NULL;
@@ -773,7 +774,7 @@ pygobject_connect_object_after(PyGObject
 	PyErr_SetString(PyExc_TypeError, "second argument must be callable");
 	return NULL;
     }
-    if (!g_signal_parse_name(name, G_OBJECT_TYPE(self->obj),
+    if (!g_signal_parse_name(name, pyg_type_from_object((PyObject *) self),
 			     &sigid, &detail, TRUE)) {
 	PyErr_SetString(PyExc_TypeError, "unknown signal name");
 	return NULL;
@@ -861,7 +862,7 @@ pygobject_emit(PyGObject *self, PyObject
 	return NULL;
     }
     Py_DECREF(first);
-    if (!g_signal_parse_name(name, G_OBJECT_TYPE(self->obj),
+    if (!g_signal_parse_name(name, pyg_type_from_object((PyObject *) self),
 			     &signal_id, &detail, TRUE)) {
 	PyErr_SetString(PyExc_TypeError, "unknown signal name");
 	return NULL;
@@ -926,7 +927,7 @@ pygobject_stop_emission(PyGObject *self,
 
     if (!PyArg_ParseTuple(args, "s:GObject.stop_emission", &signal))
 	return NULL;
-    if (!g_signal_parse_name(signal, G_OBJECT_TYPE(self->obj),
+    if (!g_signal_parse_name(signal, pyg_type_from_object((PyObject *) self),
 			     &signal_id, &detail, TRUE)) {
 	PyErr_SetString(PyExc_TypeError, "unknown signal name");
 	return NULL;
