aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/service.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/service.c b/src/service.c
index 7fead79..a2fc638 100644
--- a/src/service.c
+++ b/src/service.c
@@ -692,18 +692,20 @@ on_settings_activated (GSimpleAction * a G_GNUC_UNUSED,
GVariant * param G_GNUC_UNUSED,
gpointer gself G_GNUC_UNUSED)
{
- gchar *path;
if (!g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "Unity"))
{
+ gchar *path;
+
path = g_find_program_in_path ("unity-control-center");
if (path != NULL)
execute_command ("unity-control-center power");
else
execute_command ("gnome-control-center power");
+
+ g_free (path);
}
else if (!g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "xubuntu"))
execute_command ("xfce4-power-manager-settings");
- g_free (path);
}
static void