aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2025-02-28 16:11:01 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2025-02-28 17:34:47 +0100
commitcf42441b43aec2e0457ec6e4dfdf2af8e58ac716 (patch)
tree8d985efbf2a7a35f6aa05a8ef4b27fd3a830a305 /src
parent78b5e71b2130f78bed2583041a346ee837f0ee7d (diff)
downloadlibayatana-common-cf42441b43aec2e0457ec6e4dfdf2af8e58ac716.tar.gz
libayatana-common-cf42441b43aec2e0457ec6e4dfdf2af8e58ac716.tar.bz2
libayatana-common-cf42441b43aec2e0457ec6e4dfdf2af8e58ac716.zip
src/utils.(c|h): Add ayatana_common_utils_is_ubuntutouch() function.
Diffstat (limited to 'src')
-rw-r--r--src/utils.c6
-rw-r--r--src/utils.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c
index 0a33a74..712b060 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -74,6 +74,12 @@ ayatana_common_utils_is_lomiri ()
}
gboolean
+ayatana_common_utils_is_ubuntutouch ()
+{
+ return is_xdg_current_desktop(DESKTOP_UBUNTUTOUCH, SESSION_UBUNTUTOUCH);
+}
+
+gboolean
ayatana_common_utils_is_gnome ()
{
return is_xdg_current_desktop(DESKTOP_GNOME, SESSION_GNOME);
diff --git a/src/utils.h b/src/utils.h
index 9d3e641..c7c658e 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -23,6 +23,7 @@
#include <gio/gio.h>
static const char * const DESKTOP_LOMIRI = "Lomiri";
+static const char * const DESKTOP_UBUNTUTOUCH = NULL;
static const char * const DESKTOP_UNITY = "Unity";
static const char * const DESKTOP_MATE = "MATE";
static const char * const DESKTOP_GNOME = "GNOME";
@@ -30,6 +31,7 @@ static const char * const DESKTOP_XFCE = "XFCE";
static const char * const DESKTOP_PANTHEON = "PANTHEON";
static const char * const DESKTOP_BUDGIE = "Budgie";
static const char * const SESSION_LOMIRI = "ubuntu-touch";
+static const char * const SESSION_UBUNTUTOUCH = "ubuntu-touch";
static const char * const SESSION_UNITY = NULL;
static const char * const SESSION_MATE = "mate";
static const char * const SESSION_GNOME = "gnome";
@@ -38,6 +40,7 @@ static const char * const SESSION_PANTHEON = NULL;
static const char * const SESSION_BUDGIE = "budgie-desktop";
gboolean ayatana_common_utils_is_lomiri();
+gboolean ayatana_common_utils_is_ubuntutouch();
gboolean ayatana_common_utils_is_unity();
gboolean ayatana_common_utils_is_gnome();
gboolean ayatana_common_utils_is_mate();