]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Restore support for [SeatDefaults] so it won't break exiting config files.
authorLaércio de Sousa <lbsousajr@gmail.com>
Wed, 15 Apr 2015 11:32:05 +0000 (08:32 -0300)
committerLaércio de Sousa <lbsousajr@gmail.com>
Wed, 15 Apr 2015 11:32:05 +0000 (08:32 -0300)
Additionally write warning messages in lightdm.log about its deprecation.

src/lightdm.c

index a74448acf11ec788f90c196b15ca4bc5cbebe142..61ae3f2ca831e9cfb3971d71f3add295f8cae778 100644 (file)
@@ -153,6 +153,9 @@ get_config_sections (const gchar *seat_name)
     gchar **groups, **i;
     GList *config_sections = NULL;
 
+    /* Keep this so it won't break existing config files using old [SeatDefaults] */
+    config_sections = g_list_append (config_sections, g_strdup ("SeatDefaults"));
+
     groups = config_get_groups (config_get_instance ());
     for (i = groups; *i; i++)
     {
@@ -179,8 +182,13 @@ set_seat_properties (Seat *seat, const gchar *seat_name)
     for (link = sections; link; link = link->next)
     {
         const gchar *section = link->data;
-        g_debug ("Loading properties from config section %s", section);
         keys = config_get_keys (config_get_instance (), section);
+
+        /* Keep this until [SeatDefaults] support is definitely removed */
+        if (strcmp (section, "SeatDefaults") == 0 && keys)
+            l_warning (seat, "[SeatDefaults] is deprecated and won't be supported in the future. Use [Seat:*] instead!");
+
+        l_debug (seat, "Loading properties from config section %s", section);
         for (i = 0; keys && keys[i]; i++)
         {
             gchar *value = config_get_string (config_get_instance (), section, keys[i]);