aboutsummaryrefslogtreecommitdiff
path: root/src/service.vala
diff options
context:
space:
mode:
authorXavi Garcia Mena <xavi.garcia.mena@canonical.com>2015-10-27 16:27:54 +0100
committerXavi Garcia Mena <xavi.garcia.mena@canonical.com>2015-10-27 16:27:54 +0100
commit30fb740a1f2c9922ff2326deda649fa3b164b260 (patch)
tree4e2b8af93f86336ba10b6b63484fd423e0e325c0 /src/service.vala
parent890b2daeab368815e1aaf5074b5b6a28fbe3a90f (diff)
downloadayatana-indicator-sound-30fb740a1f2c9922ff2326deda649fa3b164b260.tar.gz
ayatana-indicator-sound-30fb740a1f2c9922ff2326deda649fa3b164b260.tar.bz2
ayatana-indicator-sound-30fb740a1f2c9922ff2326deda649fa3b164b260.zip
Changes as suggested
Diffstat (limited to 'src/service.vala')
-rw-r--r--src/service.vala50
1 files changed, 27 insertions, 23 deletions
diff --git a/src/service.vala b/src/service.vala
index b238201..74c00fc 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -567,30 +567,34 @@ public class IndicatorSound.Service: Object {
private string get_notification_label () {
string volume_label = "";
- if (volume_control.active_output == VolumeControl.ActiveOutput.SPEAKERS) {
- volume_label = _("Speakers");
- }
- if (volume_control.active_output == VolumeControl.ActiveOutput.HEADPHONES) {
- volume_label = _("Headphones");
- }
- if (volume_control.active_output == VolumeControl.ActiveOutput.BLUETOOTH_HEADPHONES) {
- volume_label = _("Bluetooth headphones");
- }
- if (volume_control.active_output == VolumeControl.ActiveOutput.BLUETOOTH_SPEAKER) {
- volume_label = _("Bluetooth speaker");
- }
- if (volume_control.active_output == VolumeControl.ActiveOutput.USB_SPEAKER) {
- volume_label = _("Usb speaker");
- }
- if (volume_control.active_output == VolumeControl.ActiveOutput.USB_HEADPHONES) {
- volume_label = _("Usb headphones");
- }
- if (volume_control.active_output == VolumeControl.ActiveOutput.HDMI_SPEAKER) {
- volume_label = _("HDMI speaker");
- }
- if (volume_control.active_output == VolumeControl.ActiveOutput.HDMI_HEADPHONES) {
- volume_label = _("HDMI headphones");
+ switch (volume_control.active_output)
+ {
+ case VolumeControl.ActiveOutput.SPEAKERS:
+ volume_label = _("Speakers");
+ break;
+ case VolumeControl.ActiveOutput.HEADPHONES:
+ volume_label = _("Headphones");
+ break;
+ case VolumeControl.ActiveOutput.BLUETOOTH_HEADPHONES:
+ volume_label = _("Bluetooth headphones");
+ break;
+ case VolumeControl.ActiveOutput.BLUETOOTH_SPEAKER:
+ volume_label = _("Bluetooth speaker");
+ break;
+ case VolumeControl.ActiveOutput.USB_SPEAKER:
+ volume_label = _("Usb speaker");
+ break;
+ case VolumeControl.ActiveOutput.USB_HEADPHONES:
+ volume_label = _("Usb headphones");
+ break;
+ case VolumeControl.ActiveOutput.HDMI_SPEAKER:
+ volume_label = _("HDMI speaker");
+ break;
+ case VolumeControl.ActiveOutput.HDMI_HEADPHONES:
+ volume_label = _("HDMI headphones");
+ break;
}
+
return volume_label;
}