diff options
Diffstat (limited to 'src/volume-control-pulse.vala')
-rw-r--r-- | src/volume-control-pulse.vala | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/volume-control-pulse.vala b/src/volume-control-pulse.vala index 81938fe..87af258 100644 --- a/src/volume-control-pulse.vala +++ b/src/volume-control-pulse.vala @@ -105,17 +105,27 @@ public class VolumeControlPulse : VolumeControl _mute_cancellable = new Cancellable (); _volume_cancellable = new Cancellable (); - init_max_volume(); - init_high_volume(); - init_high_volume_approved(); + init_all_properties(); setup_accountsservice.begin (); this.reconnect_to_pulse (); } + private void init_all_properties() + { + init_max_volume(); + init_high_volume(); + init_high_volume_approved(); + } + ~VolumeControlPulse () { + stop_all_timers(); + } + + private void stop_all_timers() + { if (_reconnect_timer != 0) { Source.remove (_reconnect_timer); _reconnect_timer = 0; |