diff options
Diffstat (limited to 'src/service.c')
-rw-r--r-- | src/service.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/service.c b/src/service.c index 07db8ab..cd0e152 100644 --- a/src/service.c +++ b/src/service.c @@ -849,10 +849,20 @@ on_statistics_activated (GSimpleAction * a G_GNUC_UNUSED, GVariant * param, gpointer gself G_GNUC_UNUSED) { - char *cmd = g_strconcat ("gnome-power-statistics", " --device ", - g_variant_get_string (param, NULL), NULL); - execute_command (cmd); - g_free (cmd); + if (!g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "mate")) + { + char *cmd = g_strconcat ("gnome-power-statistics", " --device ", + g_variant_get_string (param, NULL), NULL); + execute_command (cmd); + g_free (cmd); + } + else + { + char *cmd = g_strconcat ("gnome-power-statistics", " --device ", + g_variant_get_string (param, NULL), NULL); + execute_command (cmd); + g_free (cmd); + } } /*** |