backlight: separate default case from backlight in subsystem switch

parent a089a92e
...@@ -30,20 +30,16 @@ namespace XimperShellNotificationCenter.Widgets { ...@@ -30,20 +30,16 @@ namespace XimperShellNotificationCenter.Widgets {
switch (subsystem) { switch (subsystem) {
default : default :
case "backlight": info ("Invalid subsystem %s for device %s. " +
if (subsystem != "backlight" "Use 'backlight', 'leds'" +
#if HAVE_DDC
&& subsystem != "ddc"
#endif
) {
info ("Invalid subsystem %s for device %s. " +
"Use 'backlight', 'leds'" +
#if HAVE_DDC #if HAVE_DDC
", 'ddc'" + ", 'ddc'" +
#endif #endif
". Using default: 'backlight'", ". Using default: 'backlight'",
subsystem, device); subsystem, device);
} client = new BacklightUtil ("backlight", device);
break;
case "backlight":
client = new BacklightUtil ("backlight", device); client = new BacklightUtil ("backlight", device);
slider.set_range (min, 100); slider.set_range (min, 100);
break; 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