summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZhang Xianwei <[email protected]>2018-10-29 20:13:28 +0800
committerraveit65 <[email protected]>2018-11-08 08:16:00 +0100
commit78607a57693e0141cd7221c39cb019bbb6b42c3e (patch)
tree77f8595e55e8b6b0c33edfc6e1f091113ad94a7f /src
parent52008388c5dbd947996e70ebd1416ba8628b7257 (diff)
downloadcaja-78607a57693e0141cd7221c39cb019bbb6b42c3e.tar.bz2
caja-78607a57693e0141cd7221c39cb019bbb6b42c3e.tar.xz
Fix case-insensitive comparison in running_in_mate
The environment variable XDG_SESSION_DESKTOP and DESKTOP_SESSION in running_in_mate are compared using "MATE". Actually the environment variable in MATE DE is "mate"(lower case). Using "mate" instead of "MATE" to fix it. Signed-off-by: Zhang Xianwei <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/caja-application.c4
-rw-r--r--src/caja-main.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/caja-application.c b/src/caja-application.c
index 77a323a6..723edfcf 100644
--- a/src/caja-application.c
+++ b/src/caja-application.c
@@ -1979,8 +1979,8 @@ static gboolean
running_in_mate (void)
{
return (g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "MATE") == 0)
- || (g_strcmp0 (g_getenv ("XDG_SESSION_DESKTOP"), "MATE") == 0)
- || (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "MATE") == 0);
+ || (g_strcmp0 (g_getenv ("XDG_SESSION_DESKTOP"), "mate") == 0)
+ || (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "mate") == 0);
}
static gboolean
diff --git a/src/caja-main.c b/src/caja-main.c
index c74e43b0..a6e296ff 100644
--- a/src/caja-main.c
+++ b/src/caja-main.c
@@ -220,8 +220,8 @@ static gboolean
running_in_mate (void)
{
return (g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "MATE") == 0)
- || (g_strcmp0 (g_getenv ("XDG_SESSION_DESKTOP"), "MATE") == 0)
- || (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "MATE") == 0);
+ || (g_strcmp0 (g_getenv ("XDG_SESSION_DESKTOP"), "mate") == 0)
+ || (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "mate") == 0);
}
static gboolean