From fc7c7f466f10d58d59426fa24fbc8741e0ec61ff Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Mon, 27 Jul 1998 01:50:16 +0000 Subject: fixup, so that enum values are looked up. Mon Jul 27 03:11:20 1998 Tim Janik * gtk/gtkbindings.c (binding_compose_params): fixup, so that enum values are looked up. * gtk/gtktypeutils.h: * gtk/gtktypeutils.c: new functions gtk_type_flags_find_value and gtk_type_enums_find_value to lookup enum values. * gtk/gtkctree.h: * gtk/gtkctree.c: change enum name from GtkCTreeExpansion to GtkCTreeExpansionType. fixed signal creations to pass the enum types not just the base type GTK_TYPE_ENUM. * gtk/gtkclist.h: * gtk/gtkclist.c: fixed signal creations to pass the real enum types not just the base type GTK_TYPE_ENUM. --- gtk/gtkbindings.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gtk/gtkbindings.c') diff --git a/gtk/gtkbindings.c b/gtk/gtkbindings.c index b991ca85c3..15097f346a 100644 --- a/gtk/gtkbindings.c +++ b/gtk/gtkbindings.c @@ -310,8 +310,13 @@ binding_compose_params (GtkBindingArg *args, (param_ftype == GTK_TYPE_ENUM || param_ftype == GTK_TYPE_FLAGS)) { - /* FIXME: we need identifier lookups here */ - valid = FALSE; + GtkEnumValue *value; + + value = gtk_type_enum_find_value (params->type, args->d.string_data); + if (value) + GTK_VALUE_ENUM (*params) = value->value; + else + valid = FALSE; } else valid = FALSE; -- cgit v1.2.1