aboutsummaryrefslogtreecommitdiff
path: root/src/volume-control.vala
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2015-02-19 16:27:42 +0000
committerCI Train Bot <ci-train-bot@canonical.com>2015-02-19 16:27:42 +0000
commitaa274595282049653b3104c8cece554f6914bad4 (patch)
tree8b84c167378fb60fa01ef234fc545e289e730fbb /src/volume-control.vala
parent14be74296b0bd81a797373c4c972916277d0428e (diff)
parent29c24529be0f644ae5ef4f51cfa0963a2eb708ac (diff)
downloadayatana-indicator-sound-aa274595282049653b3104c8cece554f6914bad4.tar.gz
ayatana-indicator-sound-aa274595282049653b3104c8cece554f6914bad4.tar.bz2
ayatana-indicator-sound-aa274595282049653b3104c8cece554f6914bad4.zip
Track the reason a volume was set to filter volume changes more accurately Fixes: #1416520
Approved by: Jussi Pakkanen, PS Jenkins bot
Diffstat (limited to 'src/volume-control.vala')
-rw-r--r--src/volume-control.vala16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/volume-control.vala b/src/volume-control.vala
index b06ea56..3f1c799 100644
--- a/src/volume-control.vala
+++ b/src/volume-control.vala
@@ -20,13 +20,27 @@
public abstract class VolumeControl : Object
{
+ public enum VolumeReasons {
+ PULSE_CHANGE,
+ ACCOUNTS_SERVICE_SET,
+ DEVICE_OUTPUT_CHANGE,
+ USER_KEYPRESS,
+ VOLUME_STREAM_CHANGE
+ }
+
+ public class Volume : Object {
+ public double volume;
+ public VolumeReasons reason;
+ }
+
public virtual string stream { get { return ""; } }
public virtual bool ready { get { return false; } set { } }
public virtual bool active_mic { get { return false; } set { } }
public virtual bool high_volume { get { return false; } }
public virtual bool mute { get { return false; } }
public virtual bool is_playing { get { return false; } }
- public virtual double volume { get { return 0.0; } set { } }
+ private Volume _volume;
+ public virtual Volume volume { get { return _volume; } set { } }
public virtual double mic_volume { get { return 0.0; } set { } }
public abstract void set_mute (bool mute);