]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Promote X-LightDM-DesktopName to DesktopNames
authorLars Uebernickel <lars.uebernickel@canonical.com>
Thu, 3 Apr 2014 14:24:47 +0000 (16:24 +0200)
committerLars Uebernickel <lars.uebernickel@canonical.com>
Thu, 3 Apr 2014 14:24:47 +0000 (16:24 +0200)
XDG_CURRENT_SESSION is specified in freedesktop's desktop entry spec now.
'DesktopNames' will also be supported by other display managers, so we can drop
the 'X-LightDM'.

DesktopNames is pluralized because it allows a colon-separated list of desktop
names.

src/session-config.c

index d843605583f10bab2ab162ad362b739e3e371efb..c62aef399043a1f7f0ab10dc9a4fd8f1f3da3d6e 100644 (file)
@@ -50,7 +50,10 @@ session_config_new_from_file (const gchar *filename, GError **error)
     config->priv->session_type = g_key_file_get_string (desktop_file, G_KEY_FILE_DESKTOP_GROUP, "X-LightDM-Session-Type", NULL);
     if (!config->priv->session_type)
         config->priv->session_type = g_strdup ("x");
-    config->priv->desktop_name = g_key_file_get_string (desktop_file, G_KEY_FILE_DESKTOP_GROUP, "X-LightDM-DesktopName", NULL);
+
+    config->priv->desktop_name = g_key_file_get_string (desktop_file, G_KEY_FILE_DESKTOP_GROUP, "DesktopNames", NULL);
+    if (!config->priv->desktop_name)
+        config->priv->desktop_name = g_key_file_get_string (desktop_file, G_KEY_FILE_DESKTOP_GROUP, "X-LightDM-DesktopName", NULL);
 
     g_key_file_free (desktop_file);