Update to build with latest glib

glib replaced its glib::object_subclass!() macro with
a #[glib::object_subclass] attribute, to simplify a bunch of things.

See fdc8459b39
This commit is contained in:
Emmanuel Gil Peyrot
2021-03-14 00:21:56 +01:00
parent b348339b4e
commit 279c792345
2 changed files with 3 additions and 16 deletions

View File

@@ -18,14 +18,11 @@ mod imp {
pub(super) num_ports_out: Cell<u32>,
}
#[glib::object_subclass]
impl ObjectSubclass for Node {
const NAME: &'static str = "Node";
type Type = super::Node;
type ParentType = gtk::Widget;
type Instance = glib::subclass::simple::InstanceStruct<Self>;
type Class = glib::subclass::simple::ClassStruct<Self>;
glib::object_subclass!();
fn class_init(klass: &mut Self::Class) {
klass.set_layout_manager_type::<gtk::BinLayout>();