diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-03-21 09:27:45 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-03-21 10:21:28 +0100 |
commit | 6a0b2ef766fc208b36cc1f8f6a4c99e354c161e5 (patch) | |
tree | b7f1f62d77a55acd6202664f652df4d8ebf3606b /src/utils.c | |
parent | eb297fbbdc4befba9b187183ad20311040ab71a3 (diff) | |
download | ayatana-indicator-session-6a0b2ef766fc208b36cc1f8f6a4c99e354c161e5.tar.gz ayatana-indicator-session-6a0b2ef766fc208b36cc1f8f6a4c99e354c161e5.tar.bz2 ayatana-indicator-session-6a0b2ef766fc208b36cc1f8f6a4c99e354c161e5.zip |
Add XFCE Support.
* Check if XDG_CURRENT_DESKTOP is set to XFCE.
* Use xfce4-session-logout as logout/reboot/shutdown prompt.
* Use xfce4-settings-manager for 'Settings...'.
* Use xflock4 to attept a session lock.
* Use xfce4-about for info about this computer (not fully
appropriate but XFCE does not have any appropriate equivalent
as found in GNOME or MATE).
Fixes AyatanaIndicators/ayatana-indicator-session#1.
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c index 4bc6d68..dad9354 100644 --- a/src/utils.c +++ b/src/utils.c @@ -79,6 +79,27 @@ is_mate () return FALSE; } +gboolean +is_xfce () +{ + const gchar *xdg_current_desktop; + gchar **desktop_names; + int i; + + xdg_current_desktop = g_getenv ("XDG_CURRENT_DESKTOP"); + if (xdg_current_desktop != NULL) { + desktop_names = g_strsplit (xdg_current_desktop, ":", 0); + for (i = 0; desktop_names[i]; ++i) { + if (!g_strcmp0 (desktop_names[i], "XFCE")) { + g_strfreev (desktop_names); + return TRUE; + } + } + g_strfreev (desktop_names); + } + return FALSE; +} + GHashTable* get_os_release (void) { |