hackish patch for custom properties



libglade needs to do stuff with things that aren't always provided as
properties.

this patch allows you to have a custom widget builder func which can
"turn off" non-existant properties which it handles itself.

one example would be the "text" property on a GtkTextView - it has to be
set (w/o a property) on the model rather than the widget.

is there a nicer way to do this, james?

jacob
-- 
"Beat mixing is 10000 times more fun than even video games."
	-- bt
Index: glade-xml.c
===================================================================
RCS file: /cvs/gnome/libglade/glade/glade-xml.c,v
retrieving revision 1.79
diff -u -r1.79 glade-xml.c
--- glade-xml.c	2001/10/31 04:10:03	1.79
+++ glade-xml.c	2001/11/06 23:05:08
@@ -1438,6 +1438,10 @@
 	GParameter param = { NULL };
 	GParamSpec *pspec;
 
+	/* property already handled by caller */
+	if (!info->properties[i].name)
+	    continue;
+
 	pspec = g_object_class_find_property(oclass, info->properties[i].name);
 	if (!pspec) {
 	    g_warning("unknown property `%s' for class `%s'",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]