From 60363ad00518bf0d4b85ddc74e407a8ed0cbcb83 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 12 Mar 2018 19:11:44 +0100 Subject: src/service.c: Use desktop detection functions in 'on_statistics_activated()'. --- src/service.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/service.c') diff --git a/src/service.c b/src/service.c index a1f6793..c86df15 100644 --- a/src/service.c +++ b/src/service.c @@ -805,14 +805,14 @@ on_statistics_activated (GSimpleAction * a G_GNUC_UNUSED, GVariant * param, gpointer gself G_GNUC_UNUSED) { - if (!g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "mate")) + if (is_mate()) { - char *cmd = g_strconcat ("gnome-power-statistics", " --device ", + char *cmd = g_strconcat ("mate-power-statistics", " --device ", g_variant_get_string (param, NULL), NULL); execute_command (cmd); g_free (cmd); } - else + else if (is_gnome() || is_unity()) { char *cmd = g_strconcat ("gnome-power-statistics", " --device ", g_variant_get_string (param, NULL), NULL); -- cgit v1.2.3