G_PARAM_BUILDABLE



Hi,

I think we should really add the "buildable" flag to param specs.

Tim has argued against this in the past on the grounds that once we
start adding flags to GLib, we'll get a lot of "flag creep" and have
to add more. However, I think the case for buildable is pretty strong,
and most other object systems have this flag for properties. It's
certainly a general-purpose flag, when you consider that writing a
generic GUI builder is one of the primary goals of GParamSpec.

For example, in GtkWindow, we have several properties which exist
purely for backward compatibility - the doc strings say "don't use
this property." So having the property appear in Glade is just
insanity. However, at the moment Glade would have to special-case
excluding those properties.

That is, buildable allows us to nicely deprecate properties by not
including them in a GUI builder. 

Another case where buildable might be useful is for a value that's
only useful at runtime, such as the "fraction" property on
GtkProgressBar. It doesn't make any sense (that I know of) to set that
property in a GUI builder.

Anyway, I think a BUILDABLE flag takes only a couple minutes to
implement, and would save Chema and others quite a bit of work on
Glade.

Havoc





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