aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-07-21 15:31:43 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-07-21 15:35:50 +0200
commitabb906cb039ae981c4943f6274d3b7effe1b9f56 (patch)
tree033d7487f64b5ccdb0475a7c4d99c6527debcc5f /src
parent7515bc1dd374c706871368ed585eb9794fa3fc4f (diff)
downloadayatana-indicator-session-abb906cb039ae981c4943f6274d3b7effe1b9f56.tar.gz
ayatana-indicator-session-abb906cb039ae981c4943f6274d3b7effe1b9f56.tar.bz2
ayatana-indicator-session-abb906cb039ae981c4943f6274d3b7effe1b9f56.zip
src/backend-dbus/actions.c: Use is_mate() from src/utils.c to check if we are running inside a MATE desktop session.
Diffstat (limited to 'src')
-rw-r--r--src/backend-dbus/actions.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/backend-dbus/actions.c b/src/backend-dbus/actions.c
index 9169b5d..84d6600 100644
--- a/src/backend-dbus/actions.c
+++ b/src/backend-dbus/actions.c
@@ -101,16 +101,11 @@ prompt_status_t;
static gboolean
have_mate_program (const gchar *program)
{
- const gchar *xdg_current_desktop;
g_auto(GStrv) desktop_names = NULL;
- xdg_current_desktop = g_getenv ("XDG_CURRENT_DESKTOP");
- if (xdg_current_desktop != NULL) {
- desktop_names = g_strsplit (xdg_current_desktop, ":", 0);
- if (g_strv_contains ((const gchar * const *) desktop_names, "MATE")) {
- g_autofree gchar *path = g_find_program_in_path (program);
- return path != NULL;
- }
+ if (is_mate()) {
+ g_autofree gchar *path = g_find_program_in_path (program);
+ return path != NULL;
}
return FALSE;