diff --git a/src/ui/mod.rs b/src/ui/mod.rs index 684ae2f..343abaf 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -13,7 +13,6 @@ mod route_dropdown; mod volumescale; pub use window::PwvucontrolWindow; -pub use window::PwvucontrolWindowView; pub use profile_dropdown::PwProfileDropDown; pub use withdefaultlistmodel::WithDefaultListModel; pub use volumebox::{PwVolumeBox, PwVolumeBoxImpl}; diff --git a/src/ui/volumebox.rs b/src/ui/volumebox.rs index c825920..08f2083 100644 --- a/src/ui/volumebox.rs +++ b/src/ui/volumebox.rs @@ -124,8 +124,9 @@ mod imp { let defaultnodesapi = manager.default_nodes_api(); let widget = self.obj(); - let defaultnodesapi_closure = closure_local!(@watch widget => move |defaultnodesapi: wp::plugin::Plugin| { - let id: u32 = defaultnodesapi.emit_by_name("get-default-node", &[&"Audio/Sink"]); + let defaultnodesapi_closure = closure_local!(@watch widget, @strong item => move |defaultnodesapi: wp::plugin::Plugin| { + let media_class: String = item.node_property("media.class"); + let id: u32 = defaultnodesapi.emit_by_name("get-default-node", &[&media_class]); wp::info!("default-nodes-api changed: new id {id}"); widget.imp().default_node.set(id);