Tidies up the parts of our code that define GObject subclasses.
Because of the need for concrete rather than generic types at the GObject boundary, a lot of code was duplicated twice, once for the traffic view types and once for the device view types. This PR instead defines that boilerplate code in macros, that are expanded once for each.
Each subclass was split into two files (mod.rs for the public side, and imp.rs for the private side). I found this only made things more confusing in practice, so have instead embedded the private side in a mod imp { ... } block at the bottom of the public module, allowing each GObject subclass to be defined in a single file.
Overhaul the comments.
Rename ExpanderWrapper to the more descriptive name of ItemWidget.
Tidies up the parts of our code that define GObject subclasses.
mod.rs
for the public side, andimp.rs
for the private side). I found this only made things more confusing in practice, so have instead embedded the private side in amod imp { ... }
block at the bottom of the public module, allowing each GObject subclass to be defined in a single file.ExpanderWrapper
to the more descriptive name ofItemWidget
.