<?xml version="1.0" encoding="UTF-8"?>
<interface domain="drawing">

  <menu id="inactive-selection-menu">
    <section>
      <item>
        <attribute name="label" translatable="yes">Select all</attribute>
        <attribute name="action">win.select_all</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Close selection</attribute>
        <attribute name="action">win.selection_close</attribute>
        <attribute name="hidden-when">action-disabled</attribute>
      </item>
    </section>
    <section>
      <item>
        <attribute name="label" translatable="yes">Import</attribute>
        <attribute name="action">win.import</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Paste</attribute>
        <attribute name="action">win.paste</attribute>
      </item>
    </section>
  </menu>

  <!-- -->

  <menu id="active-selection-menu">
    <section>
      <item>
        <attribute name="label" translatable="yes">Deselect</attribute>
        <attribute name="action">win.unselect</attribute>
      </item>
    </section>
    <section>
      <item>
        <attribute name="label" translatable="yes">Cut</attribute>
        <attribute name="action">win.selection_cut</attribute>
        <attribute name="verb-icon">edit-cut-symbolic</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Copy</attribute>
        <attribute name="action">win.selection_copy</attribute>
        <attribute name="verb-icon">edit-copy-symbolic</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Delete</attribute>
        <attribute name="action">win.selection_delete</attribute>
        <attribute name="verb-icon">edit-delete-symbolic</attribute>
      </item>
    </section>
    <section>
      <attribute name="display-hint">horizontal-buttons</attribute>
      <!-- XXX inconsistent with the idea of additional tools -->
      <item>
        <attribute name="label" translatable="yes">Crop</attribute>
        <attribute name="action">win.active_tool</attribute>
        <attribute name="target">crop</attribute>
        <attribute name="verb-icon">tool-crop-symbolic</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Scale</attribute>
        <attribute name="action">win.active_tool</attribute>
        <attribute name="target">scale</attribute>
        <attribute name="verb-icon">tool-scale-symbolic</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Rotate</attribute>
        <attribute name="action">win.active_tool</attribute>
        <attribute name="target">rotate</attribute>
        <attribute name="verb-icon">tool-rotate-symbolic</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Skew</attribute>
        <attribute name="action">win.skew-exists</attribute>
        <attribute name="hidden-when">action-missing</attribute>
        <attribute name="verb-icon">tool-skew-symbolic</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Filters</attribute>
        <attribute name="action">win.active_tool</attribute>
        <attribute name="target">filters</attribute>
        <attribute name="verb-icon">tool-filters-symbolic</attribute>
      </item>
    </section>
    <section>
      <submenu>
        <attribute name="label" translatable="yes">More actions</attribute>
        <section>
          <item>
            <attribute name="label" translatable="yes">Invert selection</attribute>
            <attribute name="action">win.selection_invert</attribute>
            <attribute name="hidden-when">action-missing</attribute>
          </item>
        </section>
        <section>
          <item>
            <!-- Define the image as being the currently selected area -->
            <attribute name="label" translatable="yes">Define as current image</attribute>
            <attribute name="action">win.selection-replace-canvas</attribute>
            <attribute name="hidden-when">action-missing</attribute>
          </item>
          <item>
            <!-- Expand the canvas of the current image to make the current selection fit in it. -->
            <!-- Can be translated as "Expand to this size". -->
            <attribute name="label" translatable="yes">Expand image to fit</attribute>
            <attribute name="action">win.selection-expand-canvas</attribute>
            <attribute name="hidden-when">action-missing</attribute>
          </item>
        </section>
        <section>
          <item>
            <attribute name="label" translatable="yes">Open As New Image</attribute>
            <attribute name="action">win.new_tab_selection</attribute>
          </item>
          <item>
            <attribute name="label" translatable="yes">Export as…</attribute>
            <attribute name="action">win.selection_export</attribute>
          </item>
        </section>
      </submenu>
    </section>
  </menu>

</interface>
