Skip to content

Commit

Permalink
Pass by reference
Browse files Browse the repository at this point in the history
  • Loading branch information
saivert committed Dec 26, 2023
1 parent a98332a commit 1a137c0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ui/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ mod imp {
self.obj().add_css_class("devel");
}

self.obj().setup_scroll_blocker(self.playbacklist.get());
self.obj().setup_scroll_blocker(self.recordlist.get());
self.obj().setup_scroll_blocker(self.outputlist.get());
self.obj().setup_scroll_blocker(&self.playbacklist);
self.obj().setup_scroll_blocker(&self.recordlist);
self.obj().setup_scroll_blocker(&self.outputlist);

let manager = PwvucontrolManager::default();
let model = &manager.imp().nodemodel;
Expand Down Expand Up @@ -239,7 +239,7 @@ impl PwvucontrolWindow {
}

/// This prevents child widgets from capturing scroll events
fn setup_scroll_blocker(&self, listbox: gtk::ListBox) {
fn setup_scroll_blocker(&self, listbox: &gtk::ListBox) {
let scrolledwindow = listbox.ancestor(gtk::ScrolledWindow::static_type()).and_then(|x|{
x.downcast::<gtk::ScrolledWindow>().ok()
}).expect("downcast to scrolled window");
Expand Down

0 comments on commit 1a137c0

Please sign in to comment.