diff options
author | charles kerr <charlesk@canonical.com> | 2015-12-28 13:48:26 -0600 |
---|---|---|
committer | charles kerr <charlesk@canonical.com> | 2015-12-28 13:48:26 -0600 |
commit | 39781ce9582031d0e48a71b03079ba0625c1710f (patch) | |
tree | 6d61c34c5bac7e0a24b11cb180312cd5d645e1f6 /src/volume-control-pulse.vala | |
parent | b6aa1e4df3ee75981444e16c418a2aa5828ccb97 (diff) | |
download | ayatana-indicator-sound-39781ce9582031d0e48a71b03079ba0625c1710f.tar.gz ayatana-indicator-sound-39781ce9582031d0e48a71b03079ba0625c1710f.tar.bz2 ayatana-indicator-sound-39781ce9582031d0e48a71b03079ba0625c1710f.zip |
in volume-warning, use pulse directly rather than through dbus
Diffstat (limited to 'src/volume-control-pulse.vala')
-rw-r--r-- | src/volume-control-pulse.vala | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/volume-control-pulse.vala b/src/volume-control-pulse.vala index 2179d7a..efbbb97 100644 --- a/src/volume-control-pulse.vala +++ b/src/volume-control-pulse.vala @@ -34,8 +34,7 @@ interface GreeterListInterface : Object public class VolumeControlPulse : VolumeControl { - /* this is static to ensure it being freed after @context (loop does not have ref counting) */ - private static PulseAudio.GLibMainLoop loop; + private unowned PulseAudio.GLibMainLoop loop = null; private uint _reconnect_timer = 0; @@ -72,15 +71,14 @@ public class VolumeControlPulse : VolumeControl /** true when a microphone is active **/ public override bool active_mic { get; private set; default = false; } - public VolumeControlPulse (IndicatorSound.Options options) + public VolumeControlPulse (IndicatorSound.Options options, PulseAudio.GLibMainLoop loop) { base(options); _volume.volume = 0.0; _volume.reason = VolumeControl.VolumeReasons.PULSE_CHANGE; - if (loop == null) - loop = new PulseAudio.GLibMainLoop (); + this.loop = loop; _mute_cancellable = new Cancellable (); _volume_cancellable = new Cancellable (); |