gparam -> pbag patch
- From: jacob berkman <jacob ximian com>
- To: gnome-components-list gnome org
- Cc: Michael Meeks <michael ximian com>
- Subject: gparam -> pbag patch
- Date: 02 Jan 2002 17:24:09 -0500
this patch makes the gparam mapping function a lot nicer (esp. in say
glade for GtkWidget wrapped controls).
ok to apply?
jacob
--
"In fact, can you imagine anything more terrifying than a zombie clown?"
-- moby
Index: bonobo-property-bag.c
===================================================================
RCS file: /cvs/gnome/libbonobo/bonobo/bonobo-property-bag.c,v
retrieving revision 1.75
diff -u -r1.75 bonobo-property-bag.c
--- bonobo-property-bag.c 2001/10/29 10:36:11 1.75
+++ bonobo-property-bag.c 2002/01/02 22:26:32
@@ -781,7 +781,6 @@
GType value_type;
Bonobo_PropertyFlags flags;
BonoboArgType type;
- char *desc;
pspec = pspecs [i];
value_type = G_PARAM_SPEC_VALUE_TYPE (pspec);
@@ -797,18 +796,15 @@
flags = flags_gparam_to_bonobo (pspec->flags);
- desc = g_strconcat (pspec->name, " is a ",
- g_type_name (value_type), NULL);
-
-#ifdef MAPPING_DEBUG
- g_warning ("Mapping '%s'", desc);
-#endif
bonobo_property_bag_add_full
- (pb, pspec->name, i, type,
- NULL, desc, NULL, flags,
+ (pb,
+ g_param_spec_get_name ((GParamSpec *)pspec),
+ i, type, NULL,
+ g_param_spec_get_nick ((GParamSpec *)pspec),
+ g_param_spec_get_blurb ((GParamSpec *)pspec),
+ flags,
g_cclosure_new (G_CALLBACK (get_prop), (gpointer) pspec, NULL),
g_cclosure_new (G_CALLBACK (set_prop), (gpointer) pspec, NULL));
- g_free (desc);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]