aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/service.vala50
-rw-r--r--tests/dbus-types/org.freedesktop.Accounts.xml4
2 files changed, 27 insertions, 27 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;
}
diff --git a/tests/dbus-types/org.freedesktop.Accounts.xml b/tests/dbus-types/org.freedesktop.Accounts.xml
index f284d54..e308120 100644
--- a/tests/dbus-types/org.freedesktop.Accounts.xml
+++ b/tests/dbus-types/org.freedesktop.Accounts.xml
@@ -5,9 +5,5 @@
<arg direction="in" type="s" name="user" />
<arg direction="out" type="o" name="path" />
</method>
- <method name="FindUserById">
- <arg direction="in" type="x" name="uid" />
- <arg direction="out" type="o" name="path" />
- </method>
</interface>
</node>