diff options
author | David Reveman <davidr@novell.com> | 2007-08-15 00:37:34 -0400 |
---|---|---|
committer | David Reveman <davidr@novell.com> | 2007-08-15 00:37:34 -0400 |
commit | 9ece05ccdd5a6af850c090a852b9004f8f8e3aec (patch) | |
tree | c566b528392dcfdd04e861786a9f5a25ff6125c1 /metadata | |
parent | 3dbada7b70ac7c2505dd82a7c0108393bbd4bf97 (diff) |
Add screen parameter to kcfg files and kconfig style-sheet.
Diffstat (limited to 'metadata')
-rw-r--r-- | metadata/Makefile.am | 3 | ||||
-rw-r--r-- | metadata/kcfg.xslt | 6 | ||||
-rw-r--r-- | metadata/kconfig.xslt | 16 |
3 files changed, 21 insertions, 4 deletions
diff --git a/metadata/Makefile.am b/metadata/Makefile.am index 9ea2b511..c975b032 100644 --- a/metadata/Makefile.am +++ b/metadata/Makefile.am @@ -70,7 +70,8 @@ kde_config_DATA = $(kde_config_files) kde_config_stylesheets = kconfig.xslt compizrc: $(kde_kcfg_files) - xsltproc $(srcdir)/kconfig.xslt $(kde_kcfg_files) > $@; + xsltproc --stringparam screen 0 $(srcdir)/kconfig.xslt \ + $(kde_kcfg_files) > $@; endif diff --git a/metadata/kcfg.xslt b/metadata/kcfg.xslt index 9ca84392..71aa5145 100644 --- a/metadata/kcfg.xslt +++ b/metadata/kcfg.xslt @@ -31,7 +31,9 @@ <xsl:template match="/compiz"> <kcfg> - <kcfgfile name="compizrc"/> + <kcfgfile name="compizrc"> + <parameter name="screen"/> + </kcfgfile> <xsl:for-each select="/compiz/*/display | /compiz/*/screen"> <group> <xsl:attribute name='name'> @@ -46,7 +48,7 @@ <xsl:text>_</xsl:text> <xsl:value-of select="name()"/> <xsl:if test="name() = 'screen'"> - <xsl:text>screen</xsl:text> + <xsl:text>$(screen)</xsl:text> </xsl:if> </xsl:attribute> <xsl:for-each select="option[not(@read_only='true') and not(@type='action')]"> diff --git a/metadata/kconfig.xslt b/metadata/kconfig.xslt index 3f69a4d8..4675f162 100644 --- a/metadata/kconfig.xslt +++ b/metadata/kconfig.xslt @@ -29,8 +29,22 @@ <xsl:template match="/kcfg"> <xsl:for-each select="/kcfg/group"> + <xsl:variable name="prefix"> + <xsl:value-of select="substring(@name,1,string-length(@name) - 9)"/> + </xsl:variable> + <xsl:variable name="suffix"> + <xsl:value-of select="substring(@name,string-length(@name) - 8,string-length(@name))"/> + </xsl:variable> <xsl:text>[</xsl:text> - <xsl:value-of select="@name"/> + <xsl:choose> + <xsl:when test="$suffix = '$(screen)'"> + <xsl:value-of select="$prefix"/> + <xsl:value-of select="$screen"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="@name"/> + </xsl:otherwise> + </xsl:choose> <xsl:text>] </xsl:text> <xsl:for-each select="entry"> <xsl:value-of select="@name"/> |