summaryrefslogtreecommitdiff
path: root/community/synapse/fix-check-desktop.patch
blob: 16e039b48a28a141f364185046dc386e53637f2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
diff -Naur synapse-0.2.10.orig/src/core/desktop-file-service.vala synapse-0.2.10/src/core/desktop-file-service.vala
--- synapse-0.2.10.orig/src/core/desktop-file-service.vala	2012-03-18 20:02:41.000000000 +0100
+++ synapse-0.2.10/src/core/desktop-file-service.vala	2012-03-19 12:06:43.080443401 +0100
@@ -248,13 +248,23 @@
     
     private void get_environment_type ()
     {
-      unowned string? session_var = Environment.get_variable ("DESKTOP_SESSION");
-      
+      unowned string? session_var;
+      session_var = Environment.get_variable ("XDG_CURRENT_DESKTOP");
+      if (session_var == null)
+      {
+        session_var = Environment.get_variable ("DESKTOP_SESSION");
+      }
+
       if (session_var == null) return;
 
       string session = session_var.down ();
 
-      if (session.has_prefix ("kde"))
+      if (session.has_prefix ("unity"))
+      {
+        session_type = DesktopFileInfo.EnvironmentType.UNITY;
+        session_type_str = "Unity";
+      }
+      else if (session.has_prefix ("kde"))
       {
         session_type = DesktopFileInfo.EnvironmentType.KDE;
         session_type_str = "KDE";