[glib: 1/6] gkeyfilesettingsbackend: Add a code comment to clarify things



commit 9d89ed0c54c9c707a8aeb8c8aac0a0b0f4ab9194
Author: Philip Withnall <withnall endlessm com>
Date:   Wed Jan 23 15:14:58 2019 +0000

    gkeyfilesettingsbackend: Add a code comment to clarify things
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 gio/gkeyfilesettingsbackend.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gio/gkeyfilesettingsbackend.c b/gio/gkeyfilesettingsbackend.c
index d5796b706..5ea632305 100644
--- a/gio/gkeyfilesettingsbackend.c
+++ b/gio/gkeyfilesettingsbackend.c
@@ -225,6 +225,10 @@ get_from_keyfile (GKeyfileSettingsBackend *kfsb,
       if (str)
         {
           return_value = g_variant_parse (type, str, NULL, NULL, NULL);
+
+          /* As a special case, support values of type %G_VARIANT_TYPE_STRING
+           * not being quoted, since users keep forgetting to do it and then
+           * getting confused. */
           if (return_value == NULL &&
               g_variant_type_equal (type, G_VARIANT_TYPE_STRING) &&
               str[0] != '\"')


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