File: adjust-modifiers.xsl

package info (click to toggle)
gpodder 3.11.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,272 kB
  • sloc: python: 19,713; sh: 574; xml: 122; makefile: 112
file content (30 lines) | stat: -rw-r--r-- 866 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?xml version="1.0" ?>
<!-- this stylesheet adjusts menu item accelerators:
     - Command-, for preferences
     - Command-? for user manual

     accelerators names are found in gtk/source/gtk+/gdk/gdkkeysyms-compat.h
  -->
<xsl:stylesheet
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	version="1.0">

	<xsl:template match="@*|node()">
		<xsl:copy>
			<xsl:apply-templates select="@*|node()"/>
		</xsl:copy>
	</xsl:template>

	<xsl:template match="attribute[@name = 'accel' and preceding-sibling::attribute[@name = 'action' and . = 'app.preferences']]">
		<attribute name="accel">&lt;Primary&gt;,</attribute>
	</xsl:template>

	<xsl:template match="attribute[@name='action' and . ='app.help']">
		<xsl:copy>
			<xsl:apply-templates select="@*|node()"/>
		</xsl:copy>
		<attribute name="accel">&lt;Primary&gt;?</attribute>
	</xsl:template>

</xsl:stylesheet>