Skip to content

Make property getter/setter idiomatic

The various typed property getters/setters in C (e.g. xfconf_channel_get_int()) are not idiomatic in Rust; we can have a single method on Channel that takes a type parameter for the desired type, with traits that handle the conversions between the Rust types and glib::Value.

This ends up being more robust than the C code, as these conversion functions only return successfully-converted values if the value can be converted to the desired type without loss of precision.

Merge request reports

Loading