]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Warn if deprecated options logind-load-seats or xdg-seat are in configuration
authorRobert Ancell <robert.ancell@canonical.com>
Wed, 5 Aug 2015 04:42:08 +0000 (16:42 +1200)
committerRobert Ancell <robert.ancell@canonical.com>
Wed, 5 Aug 2015 04:42:08 +0000 (16:42 +1200)
common/configuration.c

index 250d052b4b79e20022b89a6148a09c6000832b4c..895085e3011a52aa37871aebfeb841f7f304cfc5 100644 (file)
@@ -73,6 +73,11 @@ config_load_from_file (Configuration *config, const gchar *path, GList **message
         {
             gchar *value, *k;
 
+            if (messages && g_str_has_prefix (group, "Seat:") && strcmp (keys[j], "xdg-seat") == 0)
+                *messages = g_list_append (*messages, g_strdup_printf ("  [%s] contains deprecated option xdg-seat, this can be safely removed", group));
+            if (messages && strcmp (group, "LightDM") == 0 && strcmp (keys[j], "logind-load-seats") == 0)
+                *messages = g_list_append (*messages, g_strdup ("  [LightDM] contains deprecated option logind-load-seats, this can be safely removed"));
+
             value = g_key_file_get_value (key_file, groups[i], keys[j], NULL);
             g_key_file_set_value (config->priv->key_file, group, keys[j], value);
             g_free (value);