diff --git a/src/ui/channelbox.rs b/src/ui/channelbox.rs index a4b460f..2a64fc0 100644 --- a/src/ui/channelbox.rs +++ b/src/ui/channelbox.rs @@ -12,7 +12,7 @@ mod imp { #[properties(wrapper_type = super::PwChannelBox)] pub struct PwChannelBox { #[property(get, set, construct_only)] - row_data: RefCell>, + channel_object: RefCell>, // Template widgets #[template_child] @@ -53,7 +53,7 @@ mod imp { self.parent_constructed(); - let item = self.row_data.borrow(); + let item = self.channel_object.borrow(); let item = item.as_ref().cloned().unwrap(); item.bind_property("volume", &self.scale.adjustment(), "value") @@ -86,7 +86,7 @@ glib::wrapper! { impl PwChannelBox { pub(crate) fn new(channelobj: &PwChannelObject) -> Self { glib::Object::builder() - .property("row-data", channelobj) + .property("channel-object", channelobj) .build() } } diff --git a/src/ui/outputbox.rs b/src/ui/outputbox.rs index cf23aa7..3c292f9 100644 --- a/src/ui/outputbox.rs +++ b/src/ui/outputbox.rs @@ -45,7 +45,7 @@ mod imp { let obj = self.obj(); let parent: &PwVolumeBox = obj.upcast_ref(); - let item = parent.row_data().expect("nodeobj"); + let item = parent.node_object().expect("nodeobj"); parent.add_default_node_change_handler(clone!(@weak self as widget => move || { widget.obj().update_output_device_dropdown(); @@ -93,13 +93,9 @@ glib::wrapper! { } impl PwOutputBox { - pub(crate) fn new(row_data: &impl glib::IsA) -> Self { + pub(crate) fn new(node_object: &impl glib::IsA) -> Self { glib::Object::builder() - .property("row-data", row_data) - // .property( - // "channelmodel", - // gio::ListStore::new::(), - // ) + .property("node-object", node_object) .build() } @@ -122,7 +118,7 @@ impl PwOutputBox { }; output_dropdown.set_default_text(&string); - let item = parent.row_data().expect("row_data in pwvolumebox"); + let item = parent.node_object().expect("nodeobj"); if let Some(deftarget) = item.default_target() { // let model: gio::ListModel = imp diff --git a/src/ui/sinkbox.rs b/src/ui/sinkbox.rs index aab7399..2b3bd27 100644 --- a/src/ui/sinkbox.rs +++ b/src/ui/sinkbox.rs @@ -67,7 +67,7 @@ mod imp { } let obj = self.obj(); let parent: &PwVolumeBox = obj.upcast_ref(); - let node = parent.row_data().expect("row data set on volumebox"); + let node = parent.node_object().expect("nodeobj"); let node_name: String = node.node_property("node.name"); let manager = PwvucontrolManager::default(); @@ -92,16 +92,16 @@ glib::wrapper! { } impl PwSinkBox { - pub(crate) fn new(row_data: &impl glib::IsA) -> Self { + pub(crate) fn new(node_object: &impl glib::IsA) -> Self { glib::Object::builder() - .property("row-data", row_data) + .property("node-object", node_object) .build() } pub(crate) fn default_node_changed(&self) { let imp = self.imp(); let parent: &PwVolumeBox = self.upcast_ref(); - let node = parent.row_data().expect("nodeobj"); + let node = parent.node_object().expect("nodeobj"); let id = parent.imp().default_node.get(); imp.block_default_node_toggle_signal.set(true); diff --git a/src/ui/volumebox.rs b/src/ui/volumebox.rs index 7f5a83e..14e63e1 100644 --- a/src/ui/volumebox.rs +++ b/src/ui/volumebox.rs @@ -22,7 +22,7 @@ mod imp { #[properties(wrapper_type = super::PwVolumeBox)] pub struct PwVolumeBox { #[property(get, set, construct_only)] - pub(super) row_data: RefCell>, + pub(super) node_object: RefCell>, // #[property(get, set, construct_only)] channelmodel: OnceCell, @@ -96,7 +96,7 @@ mod imp { self.channelmodel.set(gio::ListStore::new::()).expect("channelmodel not already set"); - let item = self.row_data.borrow(); + let item = self.node_object.borrow(); let item = item.as_ref().cloned().unwrap(); self.icon.set_icon_name(Some(&item.iconname())); @@ -312,9 +312,9 @@ glib::wrapper! { } impl PwVolumeBox { - pub(crate) fn new(row_data: &impl glib::IsA) -> Self { + pub(crate) fn new(channel_object: &impl glib::IsA) -> Self { glib::Object::builder() - .property("row-data", row_data) + .property("node-object", channel_object) .property("channelmodel", gio::ListStore::new::()) .build() }