diff options
author | TingPing <tingping@tingping.se> | 2013-03-25 02:41:13 -0400 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2013-03-25 02:41:13 -0400 |
commit | e9a3528bbd6babdda1b287fe244abc4041f217ae (patch) | |
tree | 2b9c85a37f4c1c97db34cb5937c2d7c8e0023a2c /src/common | |
parent | 1c929cd69482b52f780e1faedf7b8998d346dc1e (diff) |
Disable tray when using Unity
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/util.c | 11 | ||||
-rw-r--r-- | src/common/util.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c index 2319f75e..0f04d9ca 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -1877,6 +1877,17 @@ hextray_mode () #endif } +int +unity_mode () +{ +#ifdef G_OS_UNIX + const char *env = g_getenv("XDG_CURRENT_DESKTOP"); + if (env && strcmp (env, "Unity") == 0) + return 1; +#endif + return 0; +} + /* Routine for listing subfolders of a given folder. ALWAYS free correctly after use, e.g. void display_list (GSList *list) { diff --git a/src/common/util.h b/src/common/util.h index 8114cbc7..601d9e50 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -60,6 +60,7 @@ void safe_strcpy (char *dest, const char *src, int bytes_left); void canonalize_key (char *key); int portable_mode (); int hextray_mode (); +int unity_mode (); GSList *get_subdirs (const char *path); char *encode_sasl_pass (char *user, char *pass); |