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

<!--
SPDX-FileCopyrightText: 2020 Aleksandr Mezin <mezin.alexander@gmail.com>
SPDX-FileContributor: Mohammad Javad Naderi

SPDX-License-Identifier: GPL-3.0-or-later
-->

<interface domain="ddterm@amezin.github.com">
  <!-- interface-requires gtk+ 3.0 -->
  <menu id="terminal-popup">
    <section>
      <item>
        <attribute name="label" translatable="yes">Open Hyperlink</attribute>
        <attribute name="action">terminal.open-hyperlink</attribute>
        <attribute name="hidden-when">action-disabled</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Copy Hyperlink Address</attribute>
        <attribute name="action">terminal.copy-hyperlink</attribute>
        <attribute name="hidden-when">action-disabled</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Copy File Path</attribute>
        <attribute name="action">terminal.copy-filename</attribute>
        <attribute name="hidden-when">action-disabled</attribute>
      </item>
    </section>
    <section>
      <item>
        <attribute name="label" translatable="yes">Copy</attribute>
        <attribute name="action">terminal.copy</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Copy HTML</attribute>
        <attribute name="action">terminal.copy-html</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Paste</attribute>
        <attribute name="action">terminal.paste</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Select All</attribute>
        <attribute name="action">terminal.select-all</attribute>
      </item>
    </section>
    <section>
      <item>
        <attribute name="label" translatable="yes">Find</attribute>
        <attribute name="action">terminal.find</attribute>
      </item>
    </section>
    <section>
      <item>
        <attribute name="label" translatable="yes">Reset</attribute>
        <attribute name="action">terminal.reset</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Reset and Clear</attribute>
        <attribute name="action">terminal.reset-and-clear</attribute>
      </item>
    </section>
    <section>
      <submenu>
        <attribute name="label" translatable="yes">Zoom</attribute>
        <item>
          <attribute name="label" translatable="yes">Zoom In</attribute>
          <attribute name="action">terminal.font-scale-increase</attribute>
        </item>
        <item>
          <attribute name="label" translatable="yes">Zoom Out</attribute>
          <attribute name="action">terminal.font-scale-decrease</attribute>
        </item>
        <item>
          <attribute name="label" translatable="yes">Normal Size</attribute>
          <attribute name="action">terminal.font-scale-reset</attribute>
        </item>
      </submenu>
    </section>
    <section>
      <item>
        <attribute name="label" translatable="yes">Show in File Manager</attribute>
        <attribute name="action">terminal.show-in-file-manager</attribute>
      </item>
    </section>
    <section>
      <item>
        <attribute name="label" translatable="yes">Close</attribute>
        <attribute name="action">page.close</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Keep Open After Exit</attribute>
        <attribute name="action">page.keep-open-after-exit</attribute>
      </item>
    </section>
    <section>
      <submenu>
        <attribute name="label" translatable="yes">New Tab</attribute>
        <item>
          <attribute name="label" translatable="yes">New Tab Before Current Tab</attribute>
          <attribute name="action">notebook.new-tab-before-current</attribute>
        </item>
        <item>
          <attribute name="label" translatable="yes">New Tab After Current Tab</attribute>
          <attribute name="action">notebook.new-tab-after-current</attribute>
        </item>
        <item>
          <attribute name="label" translatable="yes">New Tab Before First Tab</attribute>
          <attribute name="action">notebook.new-tab-front</attribute>
        </item>
        <item>
          <attribute name="label" translatable="yes">New Tab After Last Tab</attribute>
          <attribute name="action">notebook.new-tab</attribute>
        </item>
      </submenu>
    </section>
    <section>
      <submenu>
        <attribute name="label" translatable="yes">Layout</attribute>
        <section>
          <item>
            <attribute name="label" translatable="yes">No Split</attribute>
            <attribute name="action">page.split-layout</attribute>
            <attribute name="target">no-split</attribute>
          </item>
          <item>
            <attribute name="label" translatable="yes">Split Horizontally</attribute>
            <attribute name="action">page.split-layout</attribute>
            <attribute name="target">horizontal-split</attribute>
          </item>
          <item>
            <attribute name="label" translatable="yes">Split Vertically</attribute>
            <attribute name="action">page.split-layout</attribute>
            <attribute name="target">vertical-split</attribute>
          </item>
        </section>
        <section>
          <item>
            <attribute name="label" translatable="yes">Move Tab to Other Pane</attribute>
            <attribute name="action">page.move-to-other-pane</attribute>
          </item>
        </section>
      </submenu>
    </section>
    <submenu>
      <attribute name="label" translatable="yes">Preferences</attribute>
      <section>
        <item>
          <attribute name="label" translatable="yes">Preferences…</attribute>
          <attribute name="action">app.preferences</attribute>
        </item>
      </section>
      <section>
        <item>
          <attribute name="label" translatable="yes">Above All Windows</attribute>
          <attribute name="action">app.window-above</attribute>
        </item>
        <item>
          <attribute name="label" translatable="yes">On All Workspaces</attribute>
          <attribute name="action">app.window-stick</attribute>
        </item>
        <item>
          <attribute name="label" translatable="yes">Maximize Window</attribute>
          <attribute name="action">app.window-maximize</attribute>
        </item>
        <item>
          <attribute name="label" translatable="yes">Transparent Background</attribute>
          <attribute name="action">app.transparent-background</attribute>
        </item>
      </section>
      <section>
        <item>
          <attribute name="label" translatable="yes">Hide When Application Loses Focus</attribute>
          <attribute name="action">app.hide-when-focus-lost</attribute>
        </item>
        <item>
          <attribute name="label" translatable="yes">Hide When Esc Key Is Pressed</attribute>
          <attribute name="action">app.hide-window-on-esc</attribute>
        </item>
      </section>
      <section>
        <item>
          <attribute name="label" translatable="yes">Scroll On Output</attribute>
          <attribute name="action">app.scroll-on-output</attribute>
        </item>
        <item>
          <attribute name="label" translatable="yes">Scroll On Keystroke</attribute>
          <attribute name="action">app.scroll-on-keystroke</attribute>
        </item>
      </section>
      <section>
        <item>
          <attribute name="label" translatable="yes">Preserve Working Directory In New Tabs</attribute>
          <attribute name="action">app.preserve-working-directory</attribute>
        </item>
      </section>
      <section>
        <item>
          <attribute name="label" translatable="yes">Enable Keyboard Shortcuts</attribute>
          <attribute name="action">app.shortcuts-enabled</attribute>
        </item>
      </section>
    </submenu>
    <section>
      <item>
        <attribute name="label" translatable="yes">About ddterm</attribute>
        <attribute name="action">app.about</attribute>
      </item>
    </section>
  </menu>
  <menu id="tab-popup">
    <section>
      <item>
        <attribute name="label" translatable="yes">Use Custom Tab Title</attribute>
        <attribute name="action">page.use-custom-title</attribute>
        <attribute name="target" type="b">true</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Use Default Tab Title</attribute>
        <attribute name="action">page.use-custom-title</attribute>
        <attribute name="target" type="b">false</attribute>
      </item>
    </section>
    <item>
      <attribute name="label" translatable="yes">Close</attribute>
      <attribute name="action">page.close</attribute>
    </item>
    <item>
      <attribute name="label" translatable="yes">Keep Open After Exit</attribute>
      <attribute name="action">page.keep-open-after-exit</attribute>
    </item>
    <section>
      <item>
        <attribute name="label" translatable="yes">New Tab Before This Tab</attribute>
        <attribute name="action">page.new-tab-before</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">New Tab After This Tab</attribute>
        <attribute name="action">page.new-tab-after</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">New Tab Before First Tab</attribute>
        <attribute name="action">notebook.new-tab-front</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">New Tab After Last Tab</attribute>
        <attribute name="action">notebook.new-tab</attribute>
      </item>
    </section>
    <section>
      <item>
        <attribute name="label" translatable="yes">Move Tab to Previous Position</attribute>
        <attribute name="action">page.move-prev</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">Move Tab to Next Position</attribute>
        <attribute name="action">page.move-next</attribute>
      </item>
    </section>
    <section>
      <submenu>
        <attribute name="label" translatable="yes">Layout</attribute>
        <section>
          <item>
            <attribute name="label" translatable="yes">No Split</attribute>
            <attribute name="action">page.split-layout</attribute>
            <attribute name="target">no-split</attribute>
          </item>
          <item>
            <attribute name="label" translatable="yes">Split Horizontally</attribute>
            <attribute name="action">page.split-layout</attribute>
            <attribute name="target">horizontal-split</attribute>
          </item>
          <item>
            <attribute name="label" translatable="yes">Split Vertically</attribute>
            <attribute name="action">page.split-layout</attribute>
            <attribute name="target">vertical-split</attribute>
          </item>
        </section>
        <section>
          <item>
            <attribute name="label" translatable="yes">Move Tab to Other Pane</attribute>
            <attribute name="action">page.move-to-other-pane</attribute>
          </item>
        </section>
      </submenu>
    </section>
    <item>
      <attribute name="label" translatable="yes">Preferences…</attribute>
      <attribute name="action">app.preferences</attribute>
    </item>
  </menu>
  <menu id="notebook-layout">
    <item>
      <attribute name="label" translatable="yes">No Split</attribute>
      <attribute name="action">notebook.split-layout</attribute>
      <attribute name="target">no-split</attribute>
    </item>
    <item>
      <attribute name="label" translatable="yes">Split Horizontally</attribute>
      <attribute name="action">notebook.split-layout</attribute>
      <attribute name="target">horizontal-split</attribute>
    </item>
    <item>
      <attribute name="label" translatable="yes">Split Vertically</attribute>
      <attribute name="action">notebook.split-layout</attribute>
      <attribute name="target">vertical-split</attribute>
    </item>
  </menu>
</interface>
