Commit 41a9add7 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

added a rule to generate gtkuimanager XML files using an XSL

2004-05-02  Sven Neumann  <sven@gimp.org>

	* menus/Makefile.am: added a rule to generate gtkuimanager XML
	files using an XSL transformation.

	* menus/menus.xsl: a simple XSLT to generate a menubar and a popup
	menu with identical content.

	* menus/image-menu.xml: removed this file from CVS ...

	* menus/image-menu.xml.in: ... and added this instead.

	* HACKING: xsltproc is now needed to build from CVS.
parent 4936e9a9
2004-05-02 Sven Neumann <sven@gimp.org>
* menus/Makefile.am: added a rule to generate gtkuimanager XML
files using an XSL transformation.
* menus/menus.xsl: a simple XSLT to generate a menubar and a popup
menu with identical content.
* menus/image-menu.xml: removed this file from CVS ...
* menus/image-menu.xml.in: ... and added this instead.
* HACKING: xsltproc is now needed to build from CVS.
2004-05-01 Sven Neumann <sven@gimp.org>
* configure.in: check for xmllint and xsltproc but don't require
......
......@@ -19,6 +19,9 @@ Beta software can be found at alpha.gnu.org.
* intltoolize 0.17 (or preferably a newer version)
- ftp://ftp.gnome.org/pub/gnome/sources/intltool/
* xsltproc
- ftp://ftp.gnome.org/pub/GNOME/sources/libxslt/1.1/
These are only the additional requirements if you want to compile from
CVS. The file INSTALL lists the various libraries we depend on.
......
Makefile
Makefile.in
image-menu.xml
......@@ -2,7 +2,12 @@
menudatadir = $(gimpdatadir)/menus
menudata_in_files = image-menu.xml.in
menudata_built_files = $(menudata_in_files:.xml.in=.xml)
menudata_DATA = \
$(menudata_built_files) \
brushes-menu.xml \
buffers-menu.xml \
channels-menu.xml \
......@@ -15,7 +20,6 @@ menudata_DATA = \
fonts-menu.xml \
gradient-editor-menu.xml \
gradients-menu.xml \
image-menu.xml \
images-menu.xml \
layers-menu.xml \
palette-editor-menu.xml \
......@@ -29,7 +33,18 @@ menudata_DATA = \
EXTRA_DIST = \
$(menudata_DATA) \
gtkuimanager.dtd
gtkuimanager.dtd \
menus.xsl
MAINTAINERCLEAN_FILES = $(menudata_built_files)
%.xml: %.xml.in menus.xsl
if HAVE_XSLTPROC
$(XSLTPROC) menus.xsl $< > $(@) || rm -f $(@)
else
@echo "xsltproc is needed to build the menus XML files"; exit 1;
endif
validate: $(menudata_DATA)
......
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE ui SYSTEM "gtkuimanager.dtd">
<ui>
<!-- The Image Menu Bar -->
<menubar action="image-menubar">
<menubar-and-popup action-name="image">
<menu action="file-menu" name="File">
<menuitem action="file-new" />
......@@ -356,360 +353,6 @@
</menu>
</menu>
</menubar>
<!-- The Image Popup Menu -->
<popup action="image-popup">
<menu action="file-menu" name="File">
<menuitem action="file-new" />
<menuitem action="file-open" />
<menu action="file-open-recent-menu" name="Open Recent">
<placeholder name="file-open-recent-placeholder" />
<separator />
<menuitem action="dialogs-document-history" />
</menu>
<menu action="file-acquire-menu" name="Acquire">
</menu>
<separator />
<placeholder name="Save">
<menuitem action="file-save" />
<menuitem action="file-save-as" />
<menuitem action="file-save-a-copy" />
<menuitem action="file-save-as-template" />
<menuitem action="file-revert" />
<separator />
</placeholder>
<separator />
<menuitem action="file-close" />
<menuitem action="file-quit" />
</menu>
<menu action="edit-menu" name="Edit">
<menuitem action="edit-undo" />
<menuitem action="edit-redo" />
<menuitem action="dialogs-undo-history" />
<separator />
<placeholder name="Cut">
<menuitem action="edit-cut" />
</placeholder>
<placeholder name="Copy">
<menuitem action="edit-copy" />
</placeholder>
<placeholder name="Paste">
<menuitem action="edit-paste" />
<menuitem action="edit-paste-into" />
<menuitem action="edit-paste-as-new" />
</placeholder>
<menu action="edit-buffer-menu" name="Buffer">
<menuitem action="edit-named-cut" />
<menuitem action="edit-named-copy" />
<menuitem action="edit-named-paste" />
</menu>
<separator />
<menuitem action="edit-clear" />
<menuitem action="edit-fill-fg" />
<menuitem action="edit-fill-bg" />
<menuitem action="edit-fill-pattern" />
<menuitem action="edit-stroke" />
<menuitem action="vectors-stroke" />
<separator />
</menu>
<menu action="select-menu" name="Select">
<menuitem action="select-all" />
<menuitem action="select-none" />
<menuitem action="select-invert" />
<menuitem action="select-from-vectors" />
<menuitem action="select-float" />
<menuitem action="select-by-color" />
<separator />
<menuitem action="select-feather" />
<menuitem action="select-sharpen" />
<menuitem action="select-shrink" />
<menuitem action="select-grow" />
<menuitem action="select-border" />
<separator />
<menuitem action="select-toggle-qmask" />
<menuitem action="select-save" />
<menuitem action="select-to-vectors" />
</menu>
<menu action="view-menu" name="View">
<menuitem action="view-new" />
<menuitem action="view-dot-for-dot" />
<menu action="view-zoom-menu" name="Zoom">
<menuitem action="view-zoom-out" />
<menuitem action="view-zoom-in" />
<menuitem action="view-zoom-fit" />
<separator />
<menuitem action="view-zoom-16-1" />
<menuitem action="view-zoom-8-1" />
<menuitem action="view-zoom-4-1" />
<menuitem action="view-zoom-2-1" />
<menuitem action="view-zoom-1-1" />
<menuitem action="view-zoom-1-2" />
<menuitem action="view-zoom-1-4" />
<menuitem action="view-zoom-1-8" />
<menuitem action="view-zoom-1-16" />
<separator />
<menuitem action="view-zoom-other" />
</menu>
<separator />
<menuitem action="view-info-window" />
<menuitem action="view-navigation-window" />
<menuitem action="view-display-filters" />
<separator />
<menuitem action="view-show-selection" />
<menuitem action="view-show-layer-boundary" />
<menuitem action="view-show-guides" />
<menuitem action="view-snap-to-guides" />
<menuitem action="view-show-grid" />
<menuitem action="view-snap-to-grid" />
<separator />
<menuitem action="view-show-menubar" />
<menuitem action="view-show-rulers" />
<menuitem action="view-show-scrollbars" />
<menuitem action="view-show-statusbar" />
<separator />
<menuitem action="view-shrink-wrap" />
<menuitem action="view-fullscreen" />
<menuitem action="view-move-to-screen" />
</menu>
<menu action="image-menu" name="Image">
<menu action="image-mode-menu" name="Mode">
<menuitem action="image-convert-rgb" />
<menuitem action="image-convert-grayscale" />
<menuitem action="image-convert-indexed" />
</menu>
<menu action="image-transform-menu" name="Transform">
<menuitem action="image-flip-horizontal" />
<menuitem action="image-flip-vertical" />
<separator />
<menuitem action="image-rotate-90" />
<menuitem action="image-rotate-270" />
<menuitem action="image-rotate-180" />
<separator />
</menu>
<separator />
<menuitem action="image-resize" />
<menuitem action="image-scale" />
<menuitem action="image-crop" />
<menuitem action="image-duplicate" />
<separator />
<menuitem action="image-merge-layers" />
<menuitem action="image-flatten" />
<separator />
<menuitem action="image-configure-grid" />
</menu>
<menu action="layers-menu" name="Layer">
<menuitem action="layers-new" />
<menuitem action="layers-duplicate" />
<menuitem action="layers-anchor" />
<menuitem action="layers-merge-down" />
<menuitem action="layers-delete" />
<menuitem action="layers-text-discard" />
<separator />
<menu action="layers-stack-menu" name="Stack">
<menuitem action="layers-select-previous" />
<menuitem action="layers-select-next" />
<menuitem action="layers-select-top" />
<menuitem action="layers-select-bottom" />
<separator />
<menuitem action="layers-raise" />
<menuitem action="layers-lower" />
<menuitem action="layers-raise-to-top" />
<menuitem action="layers-lower-to-bottom" />
</menu>
<menu action="layers-colors-menu" name="Colors">
<menuitem action="tools-color-balance" />
<menuitem action="tools-hue-saturation" />
<menuitem action="tools-colorize" />
<menuitem action="tools-brightness-contrast" />
<menuitem action="tools-threshold" />
<menuitem action="tools-levels" />
<menuitem action="tools-curves" />
<menuitem action="tools-posterize" />
<separator />
<menuitem action="drawable-desaturate" />
<menuitem action="drawable-invert" />
<menu action="layers-colors-auto-menu" name="Auto">
<menuitem action="drawable-equalize" />
</menu>
<separator />
<menuitem action="dialogs-histogram" />
</menu>
<menu action="layers-mask-menu" name="Mask">
<menuitem action="layers-mask-add" />
<menuitem action="layers-mask-apply" />
<menuitem action="layers-mask-delete" />
<separator />
<menuitem action="layers-mask-selection-replace" />
<menuitem action="layers-mask-selection-add" />
<menuitem action="layers-mask-selection-subtract" />
<menuitem action="layers-mask-selection-intersect" />
</menu>
<menu action="layers-transparency-menu" name="Transparency">
<menuitem action="layers-alpha-add" />
<separator />
<menuitem action="layers-alpha-selection-replace" />
<menuitem action="layers-alpha-selection-add" />
<menuitem action="layers-alpha-selection-subtract" />
<menuitem action="layers-alpha-selection-intersect" />
<separator />
</menu>
<menu action="layers-transform-menu" name="Transform">
<menuitem action="drawable-flip-horizontal" />
<menuitem action="drawable-flip-vertical" />
<separator />
<menuitem action="drawable-rotate-90" />
<menuitem action="drawable-rotate-270" />
<menuitem action="drawable-rotate-180" />
<separator />
<menuitem action="drawable-offset" />
</menu>
<separator />
<menuitem action="layers-resize" />
<menuitem action="layers-resize-to-image" />
<menuitem action="layers-scale" />
<menuitem action="layers-crop" />
<separator />
</menu>
<menu action="tools-menu" name="Tools">
<menuitem action="dialogs-toolbox" />
<menuitem action="tools-default-colors" />
<menuitem action="tools-swap-colors" />
<separator />
<menu action="tools-select-menu" name="Selection Tools">
<menuitem action="tools-rect-select" />
<menuitem action="tools-ellipse-select" />
<menuitem action="tools-free-select" />
<menuitem action="tools-by-color-select" />
<menuitem action="tools-iscissors" />
</menu>
<menu action="tools-paint-menu" name="Paint Tools">
<menuitem action="tools-bucket-fill" />
<menuitem action="tools-blend" />
<menuitem action="tools-pencil" />
<menuitem action="tools-paintbrush" />
<menuitem action="tools-eraser" />
<menuitem action="tools-airbrush" />
<menuitem action="tools-ink" />
<menuitem action="tools-clone" />
<menuitem action="tools-convolve" />
<menuitem action="tools-smudge" />
<menuitem action="tools-dodge-burn" />
</menu>
<menu action="tools-transform-menu" name="Transform Tools">
<menuitem action="tools-move" />
<menuitem action="tools-crop" />
<menuitem action="tools-rotate" />
<menuitem action="tools-shear" />
<menuitem action="tools-perspective" />
<menuitem action="tools-flip" />
</menu>
<menu action="tools-color-menu" name="Color Tools">
<menuitem action="tools-color-balance" />
<menuitem action="tools-hue-saturation" />
<menuitem action="tools-colorize" />
<menuitem action="tools-brightness-contrast" />
<menuitem action="tools-threshold" />
<menuitem action="tools-levels" />
<menuitem action="tools-curves" />
<menuitem action="tools-posterize" />
</menu>
<menuitem action="tools-vector" />
<menuitem action="tools-color-picker" />
<menuitem action="tools-magnify" />
<menuitem action="tools-measure" />
<menuitem action="tools-text" />
</menu>
<menu action="dialogs-menu" name="Dialogs">
<menu action="dialogs-new-dock-menu" name="Create New Dock">
<menuitem action="dialogs-new-dock-lcp" />
<menuitem action="dialogs-new-dock-data" />
<menuitem action="dialogs-new-dock-stuff" />
</menu>
<menuitem action="dialogs-tool-options" />
<menuitem action="dialogs-device-status" />
<separator />
<menuitem action="dialogs-layers" />
<menuitem action="dialogs-channels" />
<menuitem action="dialogs-vectors" />
<menuitem action="dialogs-indexed-palette" />
<menuitem action="dialogs-histogram" />
<menuitem action="dialogs-selection-editor" />
<menuitem action="dialogs-navigation" />
<menuitem action="dialogs-undo-history" />
<separator />
<menuitem action="dialogs-colors" />
<menuitem action="dialogs-brushes" />
<menuitem action="dialogs-patterns" />
<menuitem action="dialogs-gradients" />
<menuitem action="dialogs-palettes" />
<menuitem action="dialogs-fonts" />
<menuitem action="dialogs-buffers" />
<separator />
<menuitem action="dialogs-images" />
<menuitem action="dialogs-document-history" />
<menuitem action="dialogs-templates" />
<menuitem action="dialogs-tools" />
<menuitem action="dialogs-error-console" />
</menu>
<menu action="plug-in-menu" name="Filters">
<menuitem action="plug-in-repeat" />
<menuitem action="plug-in-reshow" />
<separator />
<menu action="plug-in-blur-menu" name="Blur">
</menu>
<menu action="plug-in-colors-menu" name="Colors">
<menu action="plug-in-colors-map-menu" name="Map">
</menu>
</menu>
<menu action="plug-in-noise-menu" name="Noise">
</menu>
<menu action="plug-in-edge-detect-menu" name="Edge-Detect">
</menu>
<menu action="plug-in-enhance-menu" name="Enhance">
</menu>
<menu action="plug-in-generic-menu" name="Generic">
</menu>
<separator />
<menu action="plug-in-glass-effects-menu" name="Glass Effects">
</menu>
<menu action="plug-in-light-effects-menu" name="Light Effects">
</menu>
<menu action="plug-in-distorts-menu" name="Distorts">
</menu>
<menu action="plug-in-artistic-menu" name="Artistic">
</menu>
<menu action="plug-in-map-menu" name="Map">
</menu>
<menu action="plug-in-render-menu" name="Render">
<menu action="plug-in-render-clouds-menu" name="Clouds">
</menu>
<menu action="plug-in-render-nature-menu" name="Nature">
</menu>
<menu action="plug-in-render-pattern-menu" name="Pattern">
</menu>
</menu>
<menu action="plug-in-web-menu" name="Web">
</menu>
<separator />
<menu action="plug-in-animation-menu" name="Animation">
</menu>
<menu action="plug-in-combine-menu" name="Combine">
</menu>
<separator />
<menu action="plug-in-toys-menu" name="Toys">
</menu>
</menu>
</menubar-and-popup>
</popup>
</ui>
<?xml version="1.0" encoding="utf-8"?>
<!-- This is an XSL transformation that we use to generate XML menu
files. So far it contains a template to generate a menubar and a
popup with identical content.
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"
version="1.0"
encoding="utf-8"
indent="yes"
doctype-system="gtkuimanager.dtd" />
<xsl:template match="/">
<xsl:comment> This file is automatically generated. Do not edit! </xsl:comment>
<xsl:apply-templates />
</xsl:template>
<xsl:template match="menubar-and-popup">
<menubar>
<xsl:attribute name="action"><xsl:value-of select="@action-name"/>-menubar</xsl:attribute>
<xsl:apply-templates />
</menubar>
<popup>
<xsl:attribute name="action"><xsl:value-of select="@action-name"/>-popup</xsl:attribute>
<xsl:apply-templates />
</popup>
</xsl:template>
<xsl:template match="@*|node()" name="identity">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment