From 868fa1688edaaa48696f59d3fafe44dc9afcb940 Mon Sep 17 00:00:00 2001 From: "Jan Sprinz (NeoTheThird)" Date: Sun, 25 Mar 2018 22:18:55 +0200 Subject: Added warning to avoid overheating of the LED. Ported from UBports power indicator: commit ef020b31be15f1126d3e5ea5ec399179aad586b8 Author: Jan Sprinz (NeoTheThird) Date: Sat Sep 16 16:02:50 2017 +0200 Forgot semicolon *blush* commit c8be2d9a142e17bdfa86ee68e23a18ba0680c244 Author: Jan Sprinz (NeoTheThird) Date: Sat Sep 16 15:53:29 2017 +0200 Change var name commit 3d6a37503bafcbf397220dcfac5624a686f2f900 Author: Jan Sprinz (NeoTheThird) Date: Sat Sep 16 14:24:05 2017 +0200 Added warning to avoid overheating of the LED Ported-by: Mike Gabriel --- src/service.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/service.c') diff --git a/src/service.c b/src/service.c index 75d4538..feb9dc4 100644 --- a/src/service.c +++ b/src/service.c @@ -678,7 +678,14 @@ create_phone_settings_section(IndicatorPowerService * self) g_menu_item_set_attribute(item, "x-canonical-type", "s", "com.canonical.indicator.switch"); g_menu_append_item(section, item); g_object_unref(item); + if (flashlight_activated()) + { + item = g_menu_item_new(_("Warning: Heavy use can damage the LED!"), "indicator.flashlight"); + g_menu_append_item(section, item); + g_object_unref(item); + } } + g_menu_append(section, _("Battery settingsā€¦"), "indicator.activate-phone-settings"); return G_MENU_MODEL(section); -- cgit v1.2.3