Use instance_init() for composite templates
Drops the incorrect use of instance_init() within constructed.
This commit is contained in:
parent
5d8c6756e2
commit
f1fa94fca7
2 changed files with 7 additions and 2 deletions
|
|
@ -119,11 +119,14 @@ mod imp {
|
|||
klass.set_template_from_resource("/org/gnome/ImageViewer/gtk/image_view.ui");
|
||||
Self::bind_template_children(klass);
|
||||
}
|
||||
|
||||
fn instance_init(obj: &glib::subclass::InitializingObject<Self::Type>) {
|
||||
obj.init_template();
|
||||
}
|
||||
}
|
||||
|
||||
impl ObjectImpl for IvImageView {
|
||||
fn constructed(&self, obj: &Self::Type) {
|
||||
obj.init_template();
|
||||
self.parent_constructed(obj);
|
||||
|
||||
obj.bind_property("header-visible", &self.headerbar.get(), "visible")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue