[Xfce4-commits] [xfce/xfconf] 01/01: Allow :., []{} characters in property and channel names (bug #11021)

noreply at xfce.org noreply at xfce.org
Sun Jul 27 15:06:47 CEST 2014


This is an automated email from the git hooks/post-receive script.

jannis pushed a commit to branch master
in repository xfce/xfconf.

commit 4fdb209dd767554ef2ca93b392b445c1e7b82286
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Fri Jul 18 20:15:59 2014 +0300

    Allow :.,[]{} characters in property and channel names (bug #11021)
    
    Among other things, this fixes an xfdesktop issue with NVIDIA cards,
    where connected monitors are reported as "monitorGPU-0.DVI-I-3" instead
    of "monitor0". By allowing dots and other characters in property and
    channel names, these card/monitor combinations are now supported
    properly.
    
    This may also be useful if we make xfconf a gsettings backend in the
    future.
---
 xfconfd/xfconf-backend.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/xfconfd/xfconf-backend.c b/xfconfd/xfconf-backend.c
index 6cb3adb..3be446a 100644
--- a/xfconfd/xfconf-backend.c
+++ b/xfconfd/xfconf-backend.c
@@ -117,13 +117,14 @@ xfconf_property_is_valid(const gchar *property,
     while(*p) {
         if(!(*p >= 'A' && *p <= 'Z') && !(*p >= 'a' && *p <= 'z')
            && !(*p >= '0' && *p <= '9')
-           && *p != '_' && *p != '-' && *p != '/'
-           && !(*p == '<' || *p == '>'))
+           && *p != '_' && *p != '-' && *p != '/' && *p != '{' && *p != '}'
+           && !(*p == '<' || *p == '>') && *p != '|' && *p != ','
+           && *p != '[' && *p != ']' && *p != '.' && *p != ':')
         {
             if(error) {
                 g_set_error(error, XFCONF_ERROR,
                             XFCONF_ERROR_INVALID_PROPERTY,
-                            _("Property names can only include the ASCII characters A-Z, a-z, 0-9, '_', '-', '<' and '>', as well as '/' as a separator"));
+                            _("Property names can only include the ASCII characters A-Z, a-z, 0-9, '_', '-', ':', '.', ',', '[', ']', '{', '}', '<' and '>', as well as '/' as a separator"));
             }
             return FALSE;
         }
@@ -168,12 +169,14 @@ xfconf_channel_is_valid(const gchar *channel,
     while(*p) {
         if(!(*p >= 'A' && *p <= 'Z') && !(*p >= 'a' && *p <= 'z')
            && !(*p >= '0' && *p <= '9')
-           && *p != '_' && *p != '-')
+           && *p != '_' && *p != '-' && *p != '{' && *p != '}'
+           && *p != '|' && *p != ','
+           && *p != '[' && *p != ']' && *p != '.' && *p != ':')
         {
             if(error) {
                 g_set_error(error, XFCONF_ERROR,
                             XFCONF_ERROR_INVALID_CHANNEL,
-                            _("Channel names can only include the ASCII characters A-Z, a-z, 0-9, '_', and '-'"));
+                            _("Channel names can only include the ASCII characters A-Z, a-z, 0-9, '{', '}', '|', ']', '[', ':', ',', '.', '_', and '-'"));
             }
             return FALSE;
         }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list