Update dependencies

This commit is contained in:
Tom A. Wagner
2023-08-17 20:14:23 +02:00
parent 7145c83ae1
commit bf5c7e4636
7 changed files with 264 additions and 329 deletions

View File

@@ -82,24 +82,13 @@ mod imp {
}
}
#[glib::derived_properties]
impl ObjectImpl for Node {
fn constructed(&self) {
self.parent_constructed();
self.grid.set_parent(&*self.obj());
}
fn properties() -> &'static [glib::ParamSpec] {
Self::derived_properties()
}
fn property(&self, id: usize, pspec: &glib::ParamSpec) -> glib::Value {
Self::derived_property(self, id, pspec)
}
fn set_property(&self, id: usize, value: &glib::Value, pspec: &glib::ParamSpec) {
Self::derived_set_property(self, id, value, pspec)
}
fn dispose(&self) {
self.grid.unparent();
}
@@ -133,6 +122,7 @@ impl Node {
imp.grid.attach(&port, 1, imp.num_ports_out.get() + 1, 1, 1);
imp.num_ports_out.set(imp.num_ports_out.get() + 1);
}
_ => unreachable!(),
}
imp.ports.borrow_mut().insert(port);
@@ -144,6 +134,7 @@ impl Node {
match port.direction() {
Direction::Input => imp.num_ports_in.set(imp.num_ports_in.get() - 1),
Direction::Output => imp.num_ports_in.set(imp.num_ports_out.get() - 1),
_ => unreachable!(),
}
port.unparent();