diff --git a/gtk/gtksignal.c b/gtk/gtksignal.c index 1f4de6be71..18f938ae0c 100644 --- a/gtk/gtksignal.c +++ b/gtk/gtksignal.c @@ -268,7 +268,6 @@ gtk_signal_newv (const gchar *r_name, gchar *name; g_return_val_if_fail (r_name != NULL, 0); - g_return_val_if_fail (marshaller != NULL, 0); g_return_val_if_fail (nparams < MAX_SIGNAL_PARAMS, 0); if (nparams) g_return_val_if_fail (params != NULL, 0); @@ -1673,10 +1672,17 @@ gtk_signal_connect_by_type (GtkObject *object, GtkObjectClass *class; GtkHandler *handler; gint found_it; - + GtkSignal *signal; + g_return_val_if_fail (object != NULL, 0); g_return_val_if_fail (object->klass != NULL, 0); + /* A signal without a default marshaller can only take no_marshal + handlers. */ + + signal = LOOKUP_SIGNAL_ID (signal_id); + g_return_val_if_fail (signal->marshaller || no_marshal, 0); + /* Search through the signals for this object and make * sure the one we are adding is valid. We need to perform * the lookup on the objects parents as well. If it isn't diff --git a/gtk/gtktypeutils.c b/gtk/gtktypeutils.c index b7fcf60f5e..e515df6a19 100644 --- a/gtk/gtktypeutils.c +++ b/gtk/gtktypeutils.c @@ -257,6 +257,23 @@ gtk_type_unique (GtkType parent_type, return new_type; } +gboolean +gtk_type_get_info (GtkType type, + GtkTypeInfo *info) +{ + GtkTypeNode *node; + + if (info == NULL) + return FALSE; + + LOOKUP_TYPE_NODE (node, type); + if (node == NULL) + return FALSE; + + *info = node->type_info; + return TRUE; +} + gchar* gtk_type_name (GtkType type) { diff --git a/gtk/gtktypeutils.h b/gtk/gtktypeutils.h index 40e70c2c40..54e5137f9c 100644 --- a/gtk/gtktypeutils.h +++ b/gtk/gtktypeutils.h @@ -313,6 +313,8 @@ struct _GtkEnumValue void gtk_type_init (void); GtkType gtk_type_unique (GtkType parent_type, const GtkTypeInfo *type_info); +gboolean gtk_type_get_info (GtkType type, + GtkTypeInfo *info); void gtk_type_set_chunk_alloc (GtkType type, guint n_chunks); gchar* gtk_type_name (guint type);