From 1a137c05f455fced3ff985fc232d97e101c6c2be Mon Sep 17 00:00:00 2001 From: Nicolai Syvertsen Date: Tue, 26 Dec 2023 14:00:09 +0100 Subject: [PATCH] Pass by reference --- src/ui/window.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/window.rs b/src/ui/window.rs index 626da8e..7c26bed 100644 --- a/src/ui/window.rs +++ b/src/ui/window.rs @@ -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; @@ -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: >k::ListBox) { let scrolledwindow = listbox.ancestor(gtk::ScrolledWindow::static_type()).and_then(|x|{ x.downcast::().ok() }).expect("downcast to scrolled window");