diff options
author | Marius Gripsgard <marius@ubports.com> | 2021-01-11 19:38:17 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-05-25 15:50:19 +0200 |
commit | dc7faa221b5ffb8224b4dc1a3bc36610156745ba (patch) | |
tree | 13f4bcd8db100d9c92c58531bc7fd5ee50da0c17 /src/utils.c | |
parent | 7803227f081df11869c218a732e24773052ca70f (diff) | |
download | ayatana-indicator-session-dc7faa221b5ffb8224b4dc1a3bc36610156745ba.tar.gz ayatana-indicator-session-dc7faa221b5ffb8224b4dc1a3bc36610156745ba.tar.bz2 ayatana-indicator-session-dc7faa221b5ffb8224b4dc1a3bc36610156745ba.zip |
Move common parts over to libayatana-common and clean up
This moves some common functions over to libayatana-common, this also
removes the direct need for any ayatana indicators to depend on
url-dispatcher as this will be handeled by libayatana-common.
This also cleans up a pretty messy code and removes many duplicates.
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/src/utils.c b/src/utils.c index 7e67bb2..991f4ec 100644 --- a/src/utils.c +++ b/src/utils.c @@ -16,56 +16,6 @@ #include "utils.h" -static gboolean -is_xdg_current_desktop (const gchar* desktop) -{ - 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], desktop)) { - g_strfreev (desktop_names); - return TRUE; - } - } - g_strfreev (desktop_names); - } - return FALSE; -} - -gboolean -is_gnome () -{ - return is_xdg_current_desktop(DESKTOP_GNOME); -} - -gboolean -is_unity () -{ - return is_xdg_current_desktop(DESKTOP_UNITY); -} - -gboolean -is_mate () -{ - return is_xdg_current_desktop(DESKTOP_MATE); -} - -gboolean is_budgie() -{ - return is_xdg_current_desktop(DESKTOP_BUDGIE); -} - -gboolean -is_xfce () -{ - return is_xdg_current_desktop(DESKTOP_XFCE); -} - GHashTable* get_os_release (void) { |