Merge lp:~vanvugt/compiz/fix-1018730 into lp:compiz/0.9.8

Proposed by Daniel van Vugt
Status: Merged
Merged at revision: 3263
Proposed branch: lp:~vanvugt/compiz/fix-1018730
Merge into: lp:compiz/0.9.8
Diff against target: 33 lines (+4/-5)
2 files modified
compizconfig/gsettings/src/gsettings.c (+2/-3)
xslt/compiz_gsettings_schemas.xslt.in (+2/-2)
To merge this branch: bzr merge lp:~vanvugt/compiz/fix-1018730
Reviewer Review Type Date Requested Status
Sam Spilsbury Approve
Review via email: mp+112519@code.launchpad.net

Description of the change

Lift the 31/32 character restriction on key names that was causing so many
warnings. It's now 1024 characters according to glib. (LP: #1018730)

To post a comment you must log in.
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'compizconfig/gsettings/src/gsettings.c'
2--- compizconfig/gsettings/src/gsettings.c 2012-05-21 15:37:47 +0000
3+++ compizconfig/gsettings/src/gsettings.c 2012-06-28 09:08:41 +0000
4@@ -79,10 +79,9 @@
5
6 clean = g_strjoinv ("-", delimited);
7
8- /* It can't be more than 32 chars, warn if that's the case */
9- gchar *ret = g_strndup (clean, 31);
10+ gchar *ret = g_strndup (clean, 1024);
11
12- if (strlen (clean) > 31)
13+ if (strlen (clean) > 1024)
14 printf ("GSettings Backend: Warning: key name %s is not valid in GSettings, it was changed to %s, this may cause problems!\n", clean, ret);
15
16 /* Everything must be lowercase */
17
18=== modified file 'xslt/compiz_gsettings_schemas.xslt.in'
19--- xslt/compiz_gsettings_schemas.xslt.in 2011-09-29 03:29:41 +0000
20+++ xslt/compiz_gsettings_schemas.xslt.in 2012-06-28 09:08:41 +0000
21@@ -419,10 +419,10 @@
22
23 <!-- prints the key name -->
24 <xsl:template name="printKeyName">
25- <!-- not allowed to have underscores, key names > 32 chars and upper case characters -->
26+ <!-- not allowed to have underscores, key names > 1024 chars and upper case characters -->
27 <xsl:param name="ASCIIUpper" >ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:param>
28 <xsl:param name="ASCIILower" >abcdefghijklmnopqrstuvwxyz</xsl:param>
29- <xsl:value-of select="translate(substring(translate(@name, '_', '-'), 0, 32), $ASCIIUpper, $ASCIILower)"/>
30+ <xsl:value-of select="translate(substring(translate(@name, '_', '-'), 0, 1024), $ASCIIUpper, $ASCIILower)"/>
31 </xsl:template>
32
33 <!-- converts a decimal number to a hex number -->

Subscribers

People subscribed via source and target branches