[geary/geary-0.12] Update Unity specific workarounds



commit c7f0061bf5720d021c8b13f68a272eb79b8f296d
Author: Kacper Bielecki <kazjote gmail com>
Date:   Mon Oct 9 21:36:11 2017 +0200

    Update Unity specific workarounds
    
    Workarounds work now correctly with Ubuntu >= 16.10.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=772546#c20
    
    Change a condition detecting Unity.

 src/client/application/geary-config.vala |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/client/application/geary-config.vala b/src/client/application/geary-config.vala
index f83b4de..a678240 100644
--- a/src/client/application/geary-config.vala
+++ b/src/client/application/geary-config.vala
@@ -55,11 +55,11 @@ public class Configuration {
 
     public DesktopEnvironment desktop_environment {
         get {
-            switch (Environment.get_variable("XDG_CURRENT_DESKTOP")) {
-                case "Unity":
-                    return DesktopEnvironment.UNITY;
-                default:
-                    return DesktopEnvironment.UNKNOWN;
+            string? xdg_current_desktop = Environment.get_variable("XDG_CURRENT_DESKTOP");
+            if (xdg_current_desktop != null && xdg_current_desktop.has_prefix("Unity")) {
+                return DesktopEnvironment.UNITY;
+            } else {
+                return DesktopEnvironment.UNKNOWN;
             }
         }
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]