gimp/menus/menus.xsl

55 lines
1.5 KiB
XML
Raw Normal View History

<?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:param name="unstable-menus" />
<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>
put the image popup menu into a dummy menubar to work around the silly 2004-05-17 Michael Natterer <mitch@gimp.org> * menus/menus.xsl: put the image popup menu into a dummy menubar to work around the silly GtkUIManager restriction that popup menus can't have tearoff items. * app/menus/menus.c * app/menus/image-menu.c * app/display/gimpdisplayshell-callbacks.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c: changed accordingly. * app/gui/gui.c (gui_restore_after_callback): connect to "notify::tearoff-menus" of GimpGuiConfig and reconfigure the global image UI manager accordingly. * app/config/gimpguiconfig.c: removed GIMP_PARAM_RESTART from the "tearoff-menus" property because GtkUIManager can change this on the fly. * app/display/gimpdisplayshell.[ch]: added the menubar to the GimpDisplayShell struct. Some cleanup in gimp_display_shell_new(). * app/display/gimpdisplayshell-appearance.c (gimp_display_shell_set_show_menubar): use shell->menubar instead of asking the UI manager. * app/widgets/gimpuimanager.[ch]: changed gimp_ui_manager_ui_get() to transparently load the XML files even if a sub-widget was requested. Reordered parameters of gimp_ui_manager_ui_popup(). Lots of internal cleanups. * app/widgets/gimpdockable.c * app/widgets/gimptooloptionseditor.c: simplified accordingly. * app/widgets/gimpeditor.[ch]: added new function gimp_editor_popup_menu() which takes a GimpMenuPositionFunc and updates/shows the editor's menu. * app/widgets/gimpcolormapeditor.c * app/widgets/gimpcomponenteditor.c * app/widgets/gimpcontainereditor.c * app/widgets/gimpcontainergridview.c * app/widgets/gimpcontainertreeview.c * app/widgets/gimperrorconsole.c * app/widgets/gimpgradienteditor.c * app/widgets/gimpitemtreeview.c * app/widgets/gimppaletteeditor.c: use gimp_editor_popup_menu(). * app/widgets/gimptoolbox.c: moved all code from gimp_toolbox_new() to GObject::constructor().
2004-05-17 21:38:03 +08:00
<menubar name="dummy-menubar">
<menu>
<xsl:attribute name="action"><xsl:value-of select="@action-name"/>-popup</xsl:attribute>
<xsl:apply-templates />
</menu>
</menubar>
</xsl:template>
<xsl:template match="menuitems">
<xsl:apply-templates />
</xsl:template>
<!-- need to strip the XInclude namespace declaration from the ui element -->
<xsl:template match="ui">
<ui>
<xsl:apply-templates />
</ui>
</xsl:template>
<xsl:template match="@*|node()" name="identity">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>