diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-03-12 19:11:44 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-03-12 19:11:44 +0100 |
commit | 60363ad00518bf0d4b85ddc74e407a8ed0cbcb83 (patch) | |
tree | ac60b1f6b1f3b958379c9f4a6a704031a97e55c6 | |
parent | 1830c84a2b95ca4b840a65317e75a609b33c3512 (diff) | |
download | ayatana-indicator-power-60363ad00518bf0d4b85ddc74e407a8ed0cbcb83.tar.gz ayatana-indicator-power-60363ad00518bf0d4b85ddc74e407a8ed0cbcb83.tar.bz2 ayatana-indicator-power-60363ad00518bf0d4b85ddc74e407a8ed0cbcb83.zip |
src/service.c: Use desktop detection functions in 'on_statistics_activated()'.
-rw-r--r-- | src/service.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |