backlight: separate default case from backlight in subsystem switch

parent a089a92e
......@@ -30,20 +30,16 @@ namespace XimperShellNotificationCenter.Widgets {
switch (subsystem) {
default :
case "backlight":
if (subsystem != "backlight"
#if HAVE_DDC
&& subsystem != "ddc"
#endif
) {
info ("Invalid subsystem %s for device %s. " +
"Use 'backlight', 'leds'" +
info ("Invalid subsystem %s for device %s. " +
"Use 'backlight', 'leds'" +
#if HAVE_DDC
", 'ddc'" +
", 'ddc'" +
#endif
". Using default: 'backlight'",
subsystem, device);
}
". Using default: 'backlight'",
subsystem, device);
client = new BacklightUtil ("backlight", device);
break;
case "backlight":
client = new BacklightUtil ("backlight", device);
slider.set_range (min, 100);
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment