aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2024-06-24 13:40:11 +0200
committerRobert Tari <robert@tari.in>2024-06-24 13:40:11 +0200
commitbf76707bdcb89c0b89f733791751b56e23575122 (patch)
tree79912378ecda8fbe6fc19a88e24a52bf8f615928
parent4f075bc2ca42f58f21074ae1b9cd3342ea6999ec (diff)
downloadayatana-indicator-power-bf76707bdcb89c0b89f733791751b56e23575122.tar.gz
ayatana-indicator-power-bf76707bdcb89c0b89f733791751b56e23575122.tar.bz2
ayatana-indicator-power-bf76707bdcb89c0b89f733791751b56e23575122.zip
src/service.c: Suppress power statistics in greeter mode
fixes https://github.com/AyatanaIndicators/ayatana-indicator-power/issues/93
-rw-r--r--src/service.c7
1 files changed, 5 insertions, 2 deletions
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);