Skip to content

Safer/better way to find GdkColor/GdkRGBA GTypes in the unified API

Since an app may never load or use a GObject class or anything that ever calls gdk_color_get_type() / gdk_rgba_get_type(), those types may never get registered with the type system. And since now we try to find their types much earlier, that could result in a g_critical warning, even if the callers never intended to use those types.

Just as bad, if a caller does want to use those types, but first binds something that doesn't use those types, before they're registered with the type system, then they will fail to work even once they are registered with the type system, because of the GOnce.

So instead, unless xfconf_g_property_bind_gdkcolor() or xfconf_g_property_bind_gdkrgba() are called directly, we ignore failures to resolve those types, and, further, only try to resolve them in xfconf_g_property_bind() in situations where someone might actually be trying to bind one of those types.

Closes #42 (closed)

Merge request reports

Loading