diff options
author | charles kerr <charlesk@canonical.com> | 2015-12-30 16:03:02 -0600 |
---|---|---|
committer | charles kerr <charlesk@canonical.com> | 2015-12-30 16:03:02 -0600 |
commit | 521915475eb73ae22e2c270c687f1f4d5c7c0465 (patch) | |
tree | 7cdb4c2a75f06ef6b1558c12557800684b55d0fe /src/options.vala | |
parent | 812e71f004272f635ba9217ef2f16aa9567196b3 (diff) | |
download | ayatana-indicator-sound-521915475eb73ae22e2c270c687f1f4d5c7c0465.tar.gz ayatana-indicator-sound-521915475eb73ae22e2c270c687f1f4d5c7c0465.tar.bz2 ayatana-indicator-sound-521915475eb73ae22e2c270c687f1f4d5c7c0465.zip |
simplify the Options class' properties
Diffstat (limited to 'src/options.vala')
-rw-r--r-- | src/options.vala | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/options.vala b/src/options.vala index 3005cf5..1aab852 100644 --- a/src/options.vala +++ b/src/options.vala @@ -20,21 +20,9 @@ public abstract class IndicatorSound.Options : Object { - // MAX VOLUME - public double max_volume { get; protected set; default = 1.0; } - // LOUD - - public signal void loud_changed(); - public abstract PulseAudio.Volume loud_volume(); - public abstract bool loud_volume_warning_enabled(); - - public bool is_loud_pulse (PulseAudio.Volume volume) { - return loud_volume_warning_enabled() && (volume >= loud_volume()); - } + public uint loud_volume { get; protected set; default = PulseAudio.Volume.sw_from_dB(8); } - public bool is_loud (VolumeControl.Volume volume) { - return is_loud_pulse(VolumeControlPulse.double_to_volume(volume.volume)); - } + public bool loud_warning_enabled { get; protected set; default = true; } } |