aboutsummaryrefslogtreecommitdiff
path: root/src/volume-control.vala
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2015-02-09 12:05:06 -0600
committerTed Gould <ted@gould.cx>2015-02-09 12:05:06 -0600
commita30edaddc32d70d8a64fe8158b879620ead22e87 (patch)
tree1331bf2cfe5d924040ad12eaa3ad2bcc5bc617bb /src/volume-control.vala
parentfe57009ba87b4cd9403cd219c26cc9487ac5d276 (diff)
parent1b0c78a1bd4237a920a569a64efe6bd006e4a9ca (diff)
downloadayatana-indicator-sound-a30edaddc32d70d8a64fe8158b879620ead22e87.tar.gz
ayatana-indicator-sound-a30edaddc32d70d8a64fe8158b879620ead22e87.tar.bz2
ayatana-indicator-sound-a30edaddc32d70d8a64fe8158b879620ead22e87.zip
Update to trunk
Diffstat (limited to 'src/volume-control.vala')
-rw-r--r--src/volume-control.vala8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/volume-control.vala b/src/volume-control.vala
index bf97021..62cb2d0 100644
--- a/src/volume-control.vala
+++ b/src/volume-control.vala
@@ -54,6 +54,14 @@ public class VolumeControl : Object
private bool _pulse_use_stream_restore = false;
private uint32 _active_sink_input = -1;
private string[] _valid_roles = {"multimedia", "alert", "alarm", "phone"};
+ public string stream {
+ get {
+ if (_active_sink_input < 0 || _active_sink_input >= _valid_roles.length)
+ return "multimedia";
+ else
+ return _valid_roles[_active_sink_input];
+ }
+ }
private string? _objp_role_multimedia = null;
private string? _objp_role_alert = null;
private string? _objp_role_alarm = null;