From 7f70ad44de2258c09b4ec532fc9938d3b2c919c0 Mon Sep 17 00:00:00 2001 From: Erica Z Date: Sat, 2 Nov 2024 21:15:55 +0100 Subject: [PATCH] add a bunch of drop debug statements --- src/mpris.rs | 6 ++++++ src/mpris/player.rs | 6 ++++++ src/mpv.rs | 2 ++ src/subsonic.rs | 6 ++++++ src/ui/play_queue.rs | 6 ++++++ src/ui/play_queue/song.rs | 6 ++++++ src/ui/playbar.rs | 6 ++++++ src/ui/setup.rs | 6 ++++++ 8 files changed, 44 insertions(+) diff --git a/src/mpris.rs b/src/mpris.rs index 0813578..6266b25 100644 --- a/src/mpris.rs +++ b/src/mpris.rs @@ -93,3 +93,9 @@ impl Mpris { vec![] } } + +impl Drop for Mpris { + fn drop(&mut self) { + println!("dropping Mpris"); + } +} diff --git a/src/mpris/player.rs b/src/mpris/player.rs index fdb8d3a..fa09e01 100644 --- a/src/mpris/player.rs +++ b/src/mpris/player.rs @@ -504,3 +504,9 @@ impl Player { true } } + +impl Drop for Player { + fn drop(&mut self) { + println!("dropping MprisPlayer"); + } +} diff --git a/src/mpv.rs b/src/mpv.rs index 0df45a9..6e1332d 100644 --- a/src/mpv.rs +++ b/src/mpv.rs @@ -170,6 +170,8 @@ impl Handle { impl Drop for Handle { fn drop(&mut self) { + println!("dropping MpvHandle"); + // let any executor ticking tasks know we're ded self.wakeup.notify(u32::MAX.relaxed()); diff --git a/src/subsonic.rs b/src/subsonic.rs index 92fb7de..82613de 100644 --- a/src/subsonic.rs +++ b/src/subsonic.rs @@ -171,3 +171,9 @@ impl Client { .map(|response| response.random_songs.song) } } + +impl Drop for Client { + fn drop(&mut self) { + println!("dropping SubsonicClient"); + } +} diff --git a/src/ui/play_queue.rs b/src/ui/play_queue.rs index 98f94fa..bc49061 100644 --- a/src/ui/play_queue.rs +++ b/src/ui/play_queue.rs @@ -84,6 +84,12 @@ mod imp { self.obj().playbin().unwrap().select_track(position); } } + + impl Drop for PlayQueue { + fn drop(&mut self) { + println!("dropping AudreyUiPlayQueue"); + } + } } use gtk::glib; diff --git a/src/ui/play_queue/song.rs b/src/ui/play_queue/song.rs index d906f5b..eba2fab 100644 --- a/src/ui/play_queue/song.rs +++ b/src/ui/play_queue/song.rs @@ -161,6 +161,12 @@ mod imp { false } } + + impl Drop for Song { + fn drop(&mut self) { + println!("dropping AudreyUiPlayQueueSong"); + } + } } use adw::prelude::*; diff --git a/src/ui/playbar.rs b/src/ui/playbar.rs index 2c08166..c7fa04f 100644 --- a/src/ui/playbar.rs +++ b/src/ui/playbar.rs @@ -160,6 +160,12 @@ mod imp { playbin.set_mute(!playbin.mute()); } } + + impl Drop for Playbar { + fn drop(&mut self) { + println!("dropping AudreyUiPlaybar"); + } + } } use gtk::glib; diff --git a/src/ui/setup.rs b/src/ui/setup.rs index a8b3872..4b2b73d 100644 --- a/src/ui/setup.rs +++ b/src/ui/setup.rs @@ -147,6 +147,12 @@ mod imp { self.obj().emit_by_name::<()>("connected", &[&vala_api]); } } + + impl Drop for Setup { + fn drop(&mut self) { + println!("dropping AudreyUiSetup"); + } + } } use adw::subclass::prelude::*;