From bf76707bdcb89c0b89f733791751b56e23575122 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Mon, 24 Jun 2024 13:40:11 +0200 Subject: src/service.c: Suppress power statistics in greeter mode fixes https://github.com/AyatanaIndicators/ayatana-indicator-power/issues/93 --- src/service.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/service.c b/src/service.c index a87c60e..49bf018 100644 --- a/src/service.c +++ b/src/service.c @@ -1,6 +1,6 @@ /* * Copyright 2013-2016 Canonical Ltd. - * Copyright 2021-2023 Robert Tari + * Copyright 2021-2024 Robert Tari * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published @@ -562,7 +562,10 @@ create_devices_section (IndicatorPowerService * self, int profile) g_object_unref (icon); } - g_menu_item_set_action_and_target(item, "indicator.activate-statistics", "s", indicator_power_device_get_object_path (device)); + if (profile != PROFILE_DESKTOP_GREETER) + { + g_menu_item_set_action_and_target(item, "indicator.activate-statistics", "s", indicator_power_device_get_object_path (device)); + } } g_menu_append_item (menu, item); -- cgit v1.2.3