Contents of /trunk/compiz/patches/compiz-0.8.4-missing-files.patch
Parent Directory | Revision Log
Revision 958 -
(show annotations)
(download)
Sat Dec 26 21:46:45 2009 UTC (14 years, 9 months ago) by niro
File size: 13775 byte(s)
Sat Dec 26 21:46:45 2009 UTC (14 years, 9 months ago) by niro
File size: 13775 byte(s)
add missing files
1 | diff -Naur compiz-0.8.4/metadata/kcfg.xslt compiz-0.8.4-magellan/metadata/kcfg.xslt |
2 | --- compiz-0.8.4/metadata/kcfg.xslt 1970-01-01 01:00:00.000000000 +0100 |
3 | +++ compiz-0.8.4-magellan/metadata/kcfg.xslt 2009-12-26 23:03:23.000000000 +0100 |
4 | @@ -0,0 +1,322 @@ |
5 | +<!-- |
6 | + Copyright © 2007 Dennis Kasprzyk |
7 | + Copyright © 2007 Novell, Inc. |
8 | + |
9 | + Permission to use, copy, modify, distribute, and sell this software |
10 | + and its documentation for any purpose is hereby granted without |
11 | + fee, provided that the above copyright notice appear in all copies |
12 | + and that both that copyright notice and this permission notice |
13 | + appear in supporting documentation, and that the name of |
14 | + Dennis Kasprzyk not be used in advertising or publicity pertaining to |
15 | + distribution of the software without specific, written prior permission. |
16 | + Dennis Kasprzyk makes no representations about the suitability of this |
17 | + software for any purpose. It is provided "as is" without express or |
18 | + implied warranty. |
19 | + |
20 | + DENNIS KASPRZYK DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, |
21 | + INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN |
22 | + NO EVENT SHALL DENNIS KASPRZYK BE LIABLE FOR ANY SPECIAL, INDIRECT OR |
23 | + CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS |
24 | + OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, |
25 | + NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION |
26 | + WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
27 | + |
28 | + Authors: Dennis Kasprzyk <onestone@deltatauchi.de> |
29 | + David Reveman <davidr@novell.com> |
30 | + --> |
31 | + |
32 | +<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> |
33 | + |
34 | + <xsl:output method="xml" indent="yes"/> |
35 | + |
36 | + <xsl:template match="/compiz"> |
37 | + <kcfg> |
38 | + <kcfgfile name="compizrc"> |
39 | + <parameter name="screen"/> |
40 | + </kcfgfile> |
41 | + <xsl:for-each select="/compiz/*/display | /compiz/*/screen"> |
42 | + <group> |
43 | + <xsl:variable name="group"> |
44 | + <xsl:choose> |
45 | + <xsl:when test="ancestor::plugin"> |
46 | + <xsl:value-of select="ancestor::plugin/@name"/> |
47 | + </xsl:when> |
48 | + <xsl:otherwise> |
49 | + <xsl:text>core</xsl:text> |
50 | + </xsl:otherwise> |
51 | + </xsl:choose> |
52 | + <xsl:text>_</xsl:text> |
53 | + <xsl:value-of select="name()"/> |
54 | + </xsl:variable> |
55 | + <xsl:attribute name='name'> |
56 | + <xsl:value-of select="$group"/> |
57 | + <xsl:if test="name() = 'screen'"> |
58 | + <xsl:text>$(screen)</xsl:text> |
59 | + </xsl:if> |
60 | + </xsl:attribute> |
61 | + <xsl:for-each select="option[not(@read_only='true') and not(@type='action')]"> |
62 | + <xsl:call-template name="print_option"> |
63 | + <xsl:with-param name="group" select="$group"/> |
64 | + </xsl:call-template> |
65 | + </xsl:for-each> |
66 | + </group> |
67 | + </xsl:for-each> |
68 | + </kcfg> |
69 | + </xsl:template> |
70 | + |
71 | + <xsl:template name="print_option"> |
72 | + <xsl:param name="group"/> |
73 | + <entry> |
74 | + <xsl:variable name="ktype"> |
75 | + <xsl:call-template name="print_type"/> |
76 | + </xsl:variable> |
77 | + <xsl:attribute name='name'> |
78 | + <xsl:value-of select="$group"/> |
79 | + <xsl:text>_</xsl:text> |
80 | + <xsl:value-of select="@name"/> |
81 | + </xsl:attribute> |
82 | + <xsl:attribute name='key'> |
83 | + <xsl:value-of select="@name"/> |
84 | + </xsl:attribute> |
85 | + <xsl:attribute name='type'> |
86 | + <xsl:value-of select="$ktype"/> |
87 | + </xsl:attribute> |
88 | + <label><xsl:value-of select="short[not(@xml:lang)]/text()"/></label> |
89 | + <whatsthis> |
90 | + <xsl:value-of select="long[not(@xml:lang)]/text()"/> |
91 | + <xsl:if test="$ktype = 'Int'"> |
92 | + <xsl:call-template name="print_info"/> |
93 | + </xsl:if> |
94 | + </whatsthis> |
95 | + <xsl:choose> |
96 | + <xsl:when test="@type = 'color'"> |
97 | + <default> |
98 | + <xsl:choose> |
99 | + <xsl:when test="default"> |
100 | + <xsl:for-each select="default[1]"> |
101 | + <xsl:call-template name="print_color"/> |
102 | + </xsl:for-each> |
103 | + </xsl:when> |
104 | + <xsl:otherwise> |
105 | + <xsl:text>#000000ff</xsl:text> |
106 | + </xsl:otherwise> |
107 | + </xsl:choose> |
108 | + </default> |
109 | + </xsl:when> |
110 | + <xsl:when test="@type = 'edge'"> |
111 | + <default> |
112 | + <xsl:for-each select="default[1]"> |
113 | + <xsl:call-template name="print_edge_list"/> |
114 | + </xsl:for-each> |
115 | + </default> |
116 | + </xsl:when> |
117 | + <xsl:when test="$ktype = 'IntList' or $ktype = 'StringList'"> |
118 | + <default> |
119 | + <xsl:choose> |
120 | + <xsl:when test="@type = 'color'"> |
121 | + <xsl:for-each select="default[1]"> |
122 | + <xsl:call-template name="print_color_list"/> |
123 | + </xsl:for-each> |
124 | + </xsl:when> |
125 | + <xsl:otherwise> |
126 | + <xsl:for-each select="default[1]"> |
127 | + <xsl:call-template name="print_value_list"/> |
128 | + </xsl:for-each> |
129 | + </xsl:otherwise> |
130 | + </xsl:choose> |
131 | + </default> |
132 | + </xsl:when> |
133 | + <xsl:otherwise> |
134 | + <default> |
135 | + <xsl:if test="default/text()"> |
136 | + <xsl:value-of select="default/text()"/> |
137 | + </xsl:if> |
138 | + </default> |
139 | + </xsl:otherwise> |
140 | + </xsl:choose> |
141 | + <xsl:if test="contains('Int,Double', $ktype)"> |
142 | + <xsl:if test="min/text()"> |
143 | + <min><xsl:value-of select="min/text()"/></min> |
144 | + </xsl:if> |
145 | + <xsl:if test="max/text()"> |
146 | + <max><xsl:value-of select="max/text()"/></max> |
147 | + </xsl:if> |
148 | + </xsl:if> |
149 | + </entry> |
150 | + </xsl:template> |
151 | + |
152 | + <xsl:template name="print_type"> |
153 | + <xsl:param name="type"> |
154 | + <xsl:value-of select="@type"/> |
155 | + </xsl:param> |
156 | + <xsl:choose> |
157 | + <xsl:when test="$type = 'bool'"> |
158 | + <xsl:text>Bool</xsl:text> |
159 | + </xsl:when> |
160 | + <xsl:when test="$type = 'int'"> |
161 | + <xsl:text>Int</xsl:text> |
162 | + </xsl:when> |
163 | + <xsl:when test="$type = 'float'"> |
164 | + <xsl:text>Double</xsl:text> |
165 | + </xsl:when> |
166 | + <xsl:when test="$type = 'bell'"> |
167 | + <xsl:text>Bool</xsl:text> |
168 | + </xsl:when> |
169 | + <xsl:when test="$type = 'list'"> |
170 | + <xsl:choose> |
171 | + <xsl:when test="type/text() = 'int'"> |
172 | + <xsl:text>Int</xsl:text> |
173 | + </xsl:when> |
174 | + <xsl:otherwise> |
175 | + <xsl:text>String</xsl:text> |
176 | + </xsl:otherwise> |
177 | + </xsl:choose> |
178 | + <xsl:text>List</xsl:text> |
179 | + </xsl:when> |
180 | + <xsl:otherwise> |
181 | + <xsl:text>String</xsl:text> |
182 | + </xsl:otherwise> |
183 | + </xsl:choose> |
184 | + </xsl:template> |
185 | + |
186 | + <xsl:template name="print_info"> |
187 | + <xsl:variable name="info"> |
188 | + <xsl:text> (</xsl:text> |
189 | + <xsl:choose> |
190 | + <xsl:when test="contains('int,float',@type) and not(desc/value/text())"> |
191 | + <xsl:value-of select="min/text()"/> - <xsl:value-of select="max/text()"/> |
192 | + </xsl:when> |
193 | + <xsl:when test="@type='int' and desc/value/text()"> |
194 | + <xsl:call-template name="print_int_desc_list"/> |
195 | + </xsl:when> |
196 | + <xsl:when test="@type = 'match'"> |
197 | + <xsl:text>match</xsl:text> |
198 | + </xsl:when> |
199 | + </xsl:choose> |
200 | + <xsl:text>)</xsl:text> |
201 | + </xsl:variable> |
202 | + <xsl:if test="not(contains($info,' ()'))"> |
203 | + <xsl:value-of select="$info"/> |
204 | + </xsl:if> |
205 | + </xsl:template> |
206 | + |
207 | + <xsl:template name="print_int_desc_list"> |
208 | + <xsl:variable name="list"> |
209 | + <xsl:for-each select="desc"> |
210 | + <xsl:value-of select="value/text()"/> |
211 | + <xsl:text> = </xsl:text> |
212 | + <xsl:value-of select="name/text()"/> |
213 | + <xsl:text>, </xsl:text> |
214 | + </xsl:for-each> |
215 | + </xsl:variable> |
216 | + <xsl:value-of select="substring($list,1,string-length($list) - 2)"/> |
217 | + </xsl:template> |
218 | + |
219 | + <xsl:template name="print_value_list"> |
220 | + <xsl:variable name="list"> |
221 | + <xsl:for-each select="value"> |
222 | + <xsl:value-of select="text()"/> |
223 | + <xsl:text>,</xsl:text> |
224 | + </xsl:for-each> |
225 | + </xsl:variable> |
226 | + <xsl:value-of select="substring($list,1,string-length($list) - 1)"/> |
227 | + </xsl:template> |
228 | + |
229 | + <xsl:template name="print_color_list"> |
230 | + <xsl:variable name="list"> |
231 | + <xsl:for-each select="value"> |
232 | + <xsl:call-template name="print_color"/> |
233 | + <xsl:text>,</xsl:text> |
234 | + </xsl:for-each> |
235 | + </xsl:variable> |
236 | + <xsl:value-of select="substring($list,1,string-length($list) - 1)"/> |
237 | + </xsl:template> |
238 | + |
239 | + <!-- |
240 | + generates the #00aabbcc color value out of the compiz |
241 | + metadata color description |
242 | + --> |
243 | + <xsl:template name="print_color"> |
244 | + <xsl:variable name="red"> |
245 | + <xsl:call-template name="get_hex_num"> |
246 | + <xsl:with-param name="value" select="red/text()"/> |
247 | + </xsl:call-template> |
248 | + </xsl:variable> |
249 | + <xsl:variable name="green"> |
250 | + <xsl:call-template name="get_hex_num"> |
251 | + <xsl:with-param name="value" select="green/text()"/> |
252 | + </xsl:call-template> |
253 | + </xsl:variable> |
254 | + <xsl:variable name="blue"> |
255 | + <xsl:call-template name="get_hex_num"> |
256 | + <xsl:with-param name="value" select="blue/text()"/> |
257 | + </xsl:call-template> |
258 | + </xsl:variable> |
259 | + <xsl:variable name="alpha"> |
260 | + <xsl:choose> |
261 | + <xsl:when test="alpha/text()"> |
262 | + <xsl:call-template name="get_hex_num"> |
263 | + <xsl:with-param name="value" select="alpha/text()"/> |
264 | + </xsl:call-template> |
265 | + </xsl:when> |
266 | + <xsl:otherwise> |
267 | + <xsl:text>ff</xsl:text> |
268 | + </xsl:otherwise> |
269 | + </xsl:choose> |
270 | + </xsl:variable> |
271 | + <xsl:value-of select="concat('#',concat($red,concat($green,concat($blue,$alpha))))"/> |
272 | + </xsl:template> |
273 | + |
274 | + <!-- |
275 | + converts a decimal number in the range of 0-65535 or |
276 | + a hex number in the range of 0x0000 - 0xffff to a hex number in the |
277 | + range of 00 - ff |
278 | + --> |
279 | + <xsl:template name="get_hex_num"> |
280 | + <xsl:param name="value"/> |
281 | + <xsl:choose> |
282 | + <xsl:when test="starts-with($value,'0x')"> |
283 | + <xsl:variable name="number"> |
284 | + <xsl:text>0000</xsl:text> |
285 | + <xsl:value-of select="substring-after($value,'0x')"/> |
286 | + </xsl:variable> |
287 | + <xsl:value-of select="substring(concat('000',$number),string-length($number),2)"/> |
288 | + </xsl:when> |
289 | + <xsl:when test="string-length($value)"> |
290 | + <xsl:variable name="number"> |
291 | + <xsl:call-template name="to_hex"> |
292 | + <xsl:with-param name="decimal_number" select="$value"/> |
293 | + </xsl:call-template> |
294 | + </xsl:variable> |
295 | + <xsl:value-of select="substring(concat('000',$number),string-length($number),2)"/> |
296 | + </xsl:when> |
297 | + <xsl:otherwise> |
298 | + <xsl:text>00</xsl:text> |
299 | + </xsl:otherwise> |
300 | + </xsl:choose> |
301 | + </xsl:template> |
302 | + |
303 | + <!-- converts a decimal number to a hex number --> |
304 | + <xsl:variable name="hex_digits" select="'0123456789abcdef'"/> |
305 | + |
306 | + <xsl:template name="to_hex"> |
307 | + <xsl:param name="decimal_number"/> |
308 | + <xsl:if test="$decimal_number >= 16"> |
309 | + <xsl:call-template name="to_hex"> |
310 | + <xsl:with-param name="decimal_number" select="floor($decimal_number div 16)" /> |
311 | + </xsl:call-template> |
312 | + </xsl:if> |
313 | + <xsl:value-of select="substring($hex_digits, ($decimal_number mod 16) + 1, 1)" /> |
314 | + </xsl:template> |
315 | + |
316 | + <xsl:template name="print_edge_list"> |
317 | + <xsl:variable name="list"> |
318 | + <xsl:for-each select="edge"> |
319 | + <xsl:value-of select="@name"/> |
320 | + <xsl:text> | </xsl:text> |
321 | + </xsl:for-each> |
322 | + </xsl:variable> |
323 | + <xsl:value-of select="substring($list,1,string-length($list) - 3)"/> |
324 | + </xsl:template> |
325 | + |
326 | +</xsl:stylesheet> |
327 | diff -Naur compiz-0.8.4/metadata/kconfig.xslt compiz-0.8.4-magellan/metadata/kconfig.xslt |
328 | --- compiz-0.8.4/metadata/kconfig.xslt 1970-01-01 01:00:00.000000000 +0100 |
329 | +++ compiz-0.8.4-magellan/metadata/kconfig.xslt 2009-12-26 23:03:56.000000000 +0100 |
330 | @@ -0,0 +1,59 @@ |
331 | +<!-- |
332 | + Copyright © 2007 Novell, Inc. |
333 | + |
334 | + Permission to use, copy, modify, distribute, and sell this software |
335 | + and its documentation for any purpose is hereby granted without |
336 | + fee, provided that the above copyright notice appear in all copies |
337 | + and that both that copyright notice and this permission notice |
338 | + appear in supporting documentation, and that the name of |
339 | + Novell, Inc. not be used in advertising or publicity pertaining to |
340 | + distribution of the software without specific, written prior permission. |
341 | + Novell, Inc. makes no representations about the suitability of this |
342 | + software for any purpose. It is provided "as is" without express or |
343 | + implied warranty. |
344 | + |
345 | + NOVELL, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, |
346 | + INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN |
347 | + NO EVENT SHALL NOVELL, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR |
348 | + CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS |
349 | + OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, |
350 | + NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION |
351 | + WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
352 | + |
353 | + Author: David Reveman <davidr@novell.com> |
354 | + --> |
355 | + |
356 | +<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> |
357 | + |
358 | +<xsl:output method="text"/> |
359 | + |
360 | +<xsl:template match="/kcfg"> |
361 | + <xsl:for-each select="/kcfg/group"> |
362 | + <xsl:variable name="prefix"> |
363 | + <xsl:value-of select="substring(@name,1,string-length(@name) - 9)"/> |
364 | + </xsl:variable> |
365 | + <xsl:variable name="suffix"> |
366 | + <xsl:value-of select="substring(@name,string-length(@name) - 8,string-length(@name))"/> |
367 | + </xsl:variable> |
368 | + <xsl:text>[</xsl:text> |
369 | + <xsl:choose> |
370 | + <xsl:when test="$suffix = '$(screen)'"> |
371 | + <xsl:value-of select="$prefix"/> |
372 | + <xsl:value-of select="$screen"/> |
373 | + </xsl:when> |
374 | + <xsl:otherwise> |
375 | + <xsl:value-of select="@name"/> |
376 | + </xsl:otherwise> |
377 | + </xsl:choose> |
378 | + <xsl:text>] </xsl:text> |
379 | + <xsl:for-each select="entry"> |
380 | + <xsl:value-of select="@key"/> |
381 | + <xsl:text>=</xsl:text> |
382 | + <xsl:value-of select="default/text()"/> |
383 | + <xsl:text> </xsl:text> |
384 | + </xsl:for-each> |
385 | + <xsl:text> </xsl:text> |
386 | + </xsl:for-each> |
387 | +</xsl:template> |
388 | + |
389 | +</xsl:stylesheet> |