Closed jsparber closed 5 years ago
The problem here is that the version is not in the .gir file. But because the whole module/class is only available from a specific version, all those versions given in the file are not needed and only add noise.
And gir should be able to detect that the property also has a getter function and not generate anything for the property.
#[cfg(any(feature = "v0_0_8", feature = "dox"))]
fn get_value(&self) -> Option<glib::Value> {
unsafe {
from_glib_none(ffi::hdy_value_object_get_value(self.to_glib_none().0))
}
}
fn get_property_value(&self) -> Option<glib::Value> {
unsafe {
let mut value = Value::from_type(<glib::Value as StaticType>::static_type());
gobject_ffi::g_object_get_property(self.to_glib_none().0, "value".to_glib_none().0, value.to_glib_none_mut().0);
value.get()
}
}
Agree that gir better assume that all method in module has at minimum "v0_0_8" constraint even if it not in .gir file, but this IMHO not that urgent. @jsparber You have 2 temporary solution for manually define:
generate = ["notify"]
See https://github.com/gtk-rs/gir/blob/master/README.md for examples [[object.property]] @EPashkin I disabled the getter generation, but didn't know i could set it to notify. Thanks
I needed to update the gir version
Is it still an issue?
Closing it then. Don't hesitate to reopen if it's still there.
Gir doesn't add a version annotation to getter function. https://gitlab.gnome.org/World/Rust/libhandy-rs/merge_requests/10/diffs?commit_id=befe3cfdef9330f03832458c6276156ff28aedd1#3ed5e305c730954a5c3ce7add7498557d3950080_0_107