[gnome-terminal/wip/inigomartinez/meson: 370/371] build: Port to meson build system



commit 7ce7dcf82846ede466bdcc080692361d553a55d2
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Thu Jan 24 12:22:37 2019 +0100

    build: Port to meson build system
    
    meson is a build system focused on speed and ease of use, which
    helps speed up software development. This patch adds meson support
    alongside autotools.

 data/icons/meson.build               |  11 ++
 help/LINGUAS                         |  16 +++
 help/meson.build                     |  46 ++++++
 meson.build                          | 244 ++++++++++++++++++++++++++++++++
 meson_options.txt                    |   4 +
 meson_post_install.py                |  15 ++
 po/meson.build                       |   1 +
 src/gnome-terminal-server.service.in |   8 ++
 src/meson.build                      | 265 +++++++++++++++++++++++++++++++++++
 src/nautilus.map                     |   8 ++
 src/org.gnome.Terminal.service.in    |   4 +
 src/terminal-menubar.ui.meson        | 251 +++++++++++++++++++++++++++++++++
 12 files changed, 873 insertions(+)
---
diff --git a/data/icons/meson.build b/data/icons/meson.build
new file mode 100644
index 00000000..fb13555e
--- /dev/null
+++ b/data/icons/meson.build
@@ -0,0 +1,11 @@
+install_data(
+  'hicolor_apps_scalable_org.gnome.Terminal.svg',
+  install_dir: gt_datadir / 'icons/hicolor/scalable/apps',
+  rename: gt_iface_name + '.svg',
+)
+
+install_data(
+  'hicolor_apps_symbolic_org.gnome.Terminal-symbolic.svg',
+  install_dir: gt_datadir / 'icons/hicolor/symbolic/apps',
+  rename: gt_iface_name + '-symbolic.svg',
+)
diff --git a/help/LINGUAS b/help/LINGUAS
new file mode 100644
index 00000000..1ecd5c4f
--- /dev/null
+++ b/help/LINGUAS
@@ -0,0 +1,16 @@
+# please keep this list sorted alphabetically
+ca
+cs
+de
+el
+es
+fi
+fr
+gl
+hu
+ko
+pl
+pt_BR
+ro
+ru
+sv
diff --git a/help/meson.build b/help/meson.build
new file mode 100644
index 00000000..1a036e51
--- /dev/null
+++ b/help/meson.build
@@ -0,0 +1,46 @@
+sources = [
+  'adv-keyboard-shortcuts.page',
+  'app-colors.page',
+  'app-cursor.page',
+  'app-fonts.page',
+  'app-fullscreen.page',
+  'app-terminal-sizes.page',
+  'app-zoom.page',
+  'gs-execute-commands.page',
+  'gs-tabs.page',
+  'index.page',
+  'introduction.page',
+  'legal.xml',
+  'overview.page',
+  'pref.page',
+  'pref-bell.page',
+  'pref-custom-exit.page',
+  'pref-custom-command.page',
+  'pref-encoding.page',
+  'pref-keyboard-access.page',
+  'pref-login-shell.page',
+  'pref-menubar.page',
+  'pref-profiles.page',
+  'pref-profile-char-width.page',
+  'pref-profile-encoding.page',
+  'pref-scrolling.page',
+  'pref-tab-window.page',
+  'pref-user-input.page',
+  'prob-reset.page',
+  'txt-copy-paste.page',
+  'txt-links.page',
+  'txt-save-text.page',
+  'txt-search.page',
+  'txt-select-text.page',
+]
+
+media = [
+  'figures/gnome-terminal.png',
+  'figures/gnome-terminal-icon.png',
+]
+
+gnome.yelp(
+  gt_name,
+  sources: sources,
+  media: media,
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 00000000..a9047d38
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,244 @@
+project(
+  'GNOME Terminal', 'c',
+  version: '3.31.1',
+  license: 'GPL3+',
+  default_options: 'buildtype=debugoptimized',
+  meson_version: '>= 0.49.0',
+)
+
+gt_name = 'gnome-terminal'
+
+gt_version = meson.project_version()
+version_array = gt_version.split('.')
+gt_major_version = version_array[0].to_int()
+gt_minor_version = version_array[1].to_int()
+gt_micro_version = version_array[2].to_int()
+
+gt_prefix = get_option('prefix')
+gt_datadir = get_option('datadir')
+gt_libdir = get_option('libdir')
+gt_libexecdir = get_option('libexecdir')
+gt_localedir = get_option('localedir')
+
+gt_pkgdatadir = join_paths(gt_datadir, gt_name)
+
+gt_namespace = 'Terminal'
+gt_iface_name = 'org.gnome.' + gt_namespace
+
+gt_debug = get_option('buildtype').contains('debug')
+
+gnome = import('gnome')
+i18n = import('i18n')
+pkg = import('pkgconfig')
+
+source_root = meson.current_source_dir()
+
+po_dir = source_root / 'po'
+
+intltool_merge = find_program('intltool-merge')
+intltool_cache = po_dir / '.intltool-merge-cache'
+intltool_desktop_cmd = [intltool_merge, '-d', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@']
+intltool_xml_cmd = [intltool_merge, '-x', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@']
+
+top_inc = include_directories('.')
+
+cc = meson.get_compiler('c')
+
+config_h = configuration_data()
+
+# version
+config_h.set_quoted('VERSION', gt_version)
+
+# Globally define_GNU_SOURCE and therefore enable the GNU extensions
+config_h.set('_GNU_SOURCE', true)
+
+# Debugging
+config_h.set('ENABLE_DEBUG', gt_debug)
+
+# i18n
+config_h.set_quoted('GETTEXT_PACKAGE', gt_name)
+
+# compiler flags
+common_flags = ['-DHAVE_CONFIG_H']
+warn_flags = []
+
+if gt_debug
+  common_flags += cc.get_supported_arguments([
+    #'-pthread',
+    #'-pipe',
+    '-fdiagnostics-show-option',
+    '-fno-common',
+    '-fno-strict-aliasing',
+    '-fstack-protector',
+    '-fstack-protector-strong',
+    '-fvisibility=hidden',
+    '-Waggregate-return',
+    '-Wcast-align',
+    '-Werror=format=2',
+    '-Werror=format-nonliteral',
+    '-Werror=format-security',
+    '-Werror=implicit-function-declaration',
+    '-Werror=init-self',
+    '-Werror=missing-include-dirs',
+    '-Werror=missing-prototypes',
+    '-Werror=pointer-arith',
+    '-Wfloat-equal',
+    '-Wformat-signedness',
+    '-Wlogical-op',
+    '-Wmissing-declarations',
+    '-Wmissing-format-attribute',
+    '-Wmissing-include-dirs',
+    '-Wmissing-noreturn',
+    '-Wnested-externs',
+    '-Wno-missing-field-initializers',
+    '-Wno-switch-enum',
+    '-Wno-unused-parameter',
+    '-Wold-style-definition',
+    '-Wpacked',
+    '-Wshadow',
+    '-Wstrict-prototypes',
+    '-Wundef',
+    '-Wunsafe-loop-optimizations',
+    '-Wwrite-strings',
+  ])
+endif
+
+add_project_arguments(common_flags, language: 'c')
+
+dconf_dep = dependency('dconf', version: '>= 0.14.0')
+gio_dep = dependency('gio-2.0', version: '>= 2.34.0')
+glib_dep = dependency('glib-2.0', version: '>= 2.42.0')
+gsettings_desktop_schemas_dep = dependency('gsettings-desktop-schemas', version: '>= 0.1.0')
+gtk_dep = dependency('gtk+-3.0', version: '>= 3.12.0')
+libpcre_dep = dependency('libpcre2-8', version: '>= 10.00')
+threads_dep = dependency('threads')
+uuid_dep = dependency('uuid')
+vte_dep = dependency('vte-2.91', version: '>= 0.55.0')
+
+m_dep = cc.find_library('m')
+
+gdk_dep = dependency('gdk-3.0')
+gdk_targets = gdk_dep.get_pkgconfig_variable('targets')
+
+gdk_x11_target = gdk_targets.contains('x11')
+if gdk_x11_target
+  x11_dep = dependency('x11')
+endif
+
+if gdk_targets.contains('win32') or gdk_targets.contains('quartz')
+  warning('unsupported GDK backend target')
+endif
+
+if not (gdk_targets.contains('broadway') or gdk_targets.contains('wayland'))
+  warning('unknown GDK backend target')
+endif
+
+# GIO schemas
+gio_schemasdir = gio_dep.get_pkgconfig_variable(
+  'schemasdir',
+  define_variable: ['datadir', gt_prefix / gt_datadir],
+  default: gt_prefix / gt_datadir / 'glib-2.0/schemas',
+)
+
+# systemd user unit directory
+systemd_systemduserunitdir = get_option('systemduserunitdir')
+if systemd_systemduserunitdir == ''
+  # FIXME: this would ideally use the systemduserunitdir pkgconfig variable, but
+  # it does not depend on variables we can override to install within prefix.
+  #systemd_systemduserunitdir = dependency('systemd').get_pkgconfig_variable('systemduserunitdir')
+  systemd_systemduserunitdir = gt_libdir / 'systemd/user'
+endif
+
+# DBus
+dbus_dep = dependency('dbus-1')
+dbus_session_bus_services_dir = dbus_dep.get_pkgconfig_variable('session_bus_services_dir', define_variable: 
['datadir', gt_prefix / gt_datadir])
+
+# GNOME Shell search provider
+enable_search_provider = get_option('search_provider')
+if enable_search_provider
+  shell_search_provider_iface = dbus_dep.get_pkgconfig_variable('interfaces_dir') / 
'org.gnome.ShellSearchProvider2.xml'
+  res = run_command(find_program('test'), '-e', shell_search_provider_iface)
+  assert(res.returncode() == 0, 'gnome-shell search provider requested but interface definition file not 
found')
+endif
+config_h.set('ENABLE_SEARCH_PROVIDER', enable_search_provider)
+
+# Nautilus extension
+enable_nautilus_extension = get_option('nautilus_extension')
+if enable_nautilus_extension
+  libnautilus_extension_dep = dependency('libnautilus-extension', version: '>= 3.0.0')
+  libnautilus_extension_extensiondir = libnautilus_extension_dep.get_pkgconfig_variable('extensiondir', 
define_variable: ['libdir', gt_prefix / gt_libdir])
+
+  appdata = gt_iface_name + '.Nautilus.metainfo.xml'
+
+  custom_target(
+    appdata,
+    input: appdata + '.in',
+    output: '@BASENAME@',
+    command: intltool_xml_cmd,
+    install: true,
+    install_dir: gt_datadir / 'metainfo',
+  )
+endif
+
+subdir('data/icons')
+subdir('src')
+subdir('po')
+subdir('help')
+
+desktop_conf = configuration_data()
+desktop_conf.set('VERSION', gt_version)
+
+desktop = gt_iface_name + '.desktop'
+
+desktop_in = configure_file(
+  input: desktop + '.in.in',
+  output: '@BASENAME@',
+  configuration: desktop_conf,
+)
+
+custom_target(
+  desktop,
+  input: desktop_in,
+  output: '@BASENAME@',
+  command: intltool_desktop_cmd,
+  install: true,
+  install_dir: gt_datadir / 'applications',
+)
+
+appdata = gt_iface_name + '.appdata.xml'
+
+custom_target(
+  appdata,
+  input: appdata + '.in',
+  output: '@BASENAME@',
+  command: intltool_xml_cmd,
+  install: true,
+  install_dir: gt_datadir / 'metainfo',
+)
+
+configure_file(
+  output: 'config.h',
+  configuration: config_h,
+)
+
+meson.add_install_script(
+  'meson_post_install.py',
+  gt_datadir,
+  gio_schemasdir,
+)
+
+output = '\ngnome-terminal-' + gt_version + ':\n\n'
+output += '\tprefix:                 ' + gt_prefix + '\n'
+output += '\tsource code location:   ' + source_root + '\n'
+output += '\tcompiler:               ' + cc.get_id() + '\n'
+output += '\tDBus service dir:       ' + dbus_session_bus_services_dir + '\n'
+output += '\tDebug:                  ' + gt_debug.to_string() + '\n'
+output += '\tSearch provider:        ' + enable_search_provider.to_string() + '\n'
+if enable_search_provider
+  output += '\tShell search provider:  ' + shell_search_provider_iface + '\n'
+endif
+output += '\tNautilus extension:     ' + enable_nautilus_extension.to_string() + '\n'
+if enable_nautilus_extension
+  output += '\tNautilus extension dir: ' + libnautilus_extension_extensiondir
+endif
+message(output)
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 00000000..33276add
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,4 @@
+option('systemduserunitdir', type: 'string', value: '', description: 'custom directory for systemd user 
units')
+
+option('search_provider', type: 'boolean', value: true, description: 'Enable gnome-shell search provider')
+option('nautilus_extension', type: 'boolean', value: false, description: 'Enable nautilus extension')
diff --git a/meson_post_install.py b/meson_post_install.py
new file mode 100644
index 00000000..24242df0
--- /dev/null
+++ b/meson_post_install.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+import sys
+
+if not os.environ.get('DESTDIR'):
+    prefix = os.environ['MESON_INSTALL_PREFIX']
+
+    icondir = os.path.join(prefix, sys.argv[1], 'icons', 'hicolor')
+    print('Updating icon cache...')
+    subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
+
+    print('Compiling gsettings schemas...')
+    subprocess.call(['glib-compile-schemas', sys.argv[2]])
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 00000000..470d71d7
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1 @@
+i18n.gettext(gt_name, preset: 'glib')
diff --git a/src/gnome-terminal-server.service.in b/src/gnome-terminal-server.service.in
new file mode 100644
index 00000000..3bf6a8c3
--- /dev/null
+++ b/src/gnome-terminal-server.service.in
@@ -0,0 +1,8 @@
+[Unit]
+Description=GNOME Terminal Server
+
+[Service]
+KillMode=process
+Type=dbus
+BusName=org.gnome.Terminal
+ExecStart=@libexecdir@/gnome-terminal-server
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 00000000..a60d516a
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,265 @@
+service_conf = configuration_data()
+service_conf.set('libexecdir', gt_prefix / gt_libexecdir)
+
+configure_file(
+  input: gt_iface_name + '.service.in',
+  output: '@BASENAME@',
+  configuration: service_conf,
+  install: true,
+  install_dir: dbus_session_bus_services_dir,
+)
+
+configure_file(
+  input: gt_name + '-server.service.in',
+  output: '@BASENAME@',
+  configuration: service_conf,
+  install: true,
+  install_dir: systemd_systemduserunitdir,
+)
+
+install_data(
+  gt_iface_name + '.gschema.xml',
+  install_dir: gio_schemasdir,
+)
+
+enums_header = files('terminal-enums.h')
+
+enums = 'terminal-type-builtins'
+
+enums_sources = gnome.mkenums(
+  enums,
+  sources: enums_header,
+  c_template: enums + '.c.template',
+  h_template: enums + '.h.template',
+)
+
+gdbus_sources = gnome.gdbus_codegen(
+  'terminal-gdbus-generated',
+  gt_iface_name + '.xml',
+  interface_prefix: gt_iface_name,
+  namespace: gt_namespace,
+  object_manager: true,
+)
+
+common_deps = [
+  dconf_dep,
+  gio_dep,
+  glib_dep,
+  gtk_dep,
+  uuid_dep,
+  vte_dep,
+]
+
+if gdk_x11_target
+  common_deps += x11_dep
+endif
+
+# gnome-terminal-server
+sources = files(
+  'eggshell.c',
+  'profile-editor.c',
+  'server.c',
+  'terminal-accels.c',
+  'terminal-app.c',
+  'terminal-debug.c',
+  'terminal-encoding.c',
+  'terminal-gdbus.c',
+  'terminal-headerbar.c',
+  'terminal-i18n.c',
+  'terminal-icon-button.c',
+  'terminal-info-bar.c',
+  'terminal-mdi-container.c',
+  'terminal-menu-button.c',
+  'terminal-notebook.c',
+  'terminal-prefs.c',
+  'terminal-profiles-list.c',
+  'terminal-screen.c',
+  'terminal-screen-container.c',
+  'terminal-search-popover.c',
+  'terminal-settings-list.c',
+  'terminal-tab-label.c',
+  'terminal-util.c',
+  'terminal-window.c',
+)
+
+version_conf = {
+  'TERMINAL_MAJOR_VERSION': gt_major_version,
+  'TERMINAL_MINOR_VERSION': gt_minor_version,
+  'TERMINAL_MICRO_VERSION': gt_micro_version,
+}
+
+sources += configure_file(
+  input: 'terminal-version.h.in',
+  output: '@BASENAME@',
+  configuration: version_conf
+)
+
+marshal = 'terminal-marshal'
+
+sources += gnome.genmarshal(
+  marshal,
+  sources: marshal + '.list',
+  prefix: '_' + marshal.underscorify(),
+  internal: true,
+)
+
+resource_data = files(
+  'preferences.ui',
+  'search-popover.ui',
+  'terminal.about',
+  'terminal.common.css',
+  'terminal-headerbar.ui',
+  'terminal-headermenu.ui',
+  'terminal-notebook-menu.ui',
+  'terminal-window.ui',
+)
+
+menubar = 'terminal-menubar'
+
+mnemonics_conf = {
+  'WITH_MNEMONIC_START': '',
+  'WITH_MNEMONIC_END': '',
+  'WITHOUT_MNEMONIC_START': '<!--',
+  'WITHOUT_MNEMONIC_END': '-->',
+}
+
+resource_data += configure_file(
+  input: menubar + '.ui.meson',
+  output: menubar + '-with-mnemonics.ui',
+  configuration: mnemonics_conf,
+)
+
+mnemonics_conf = {
+  'WITH_MNEMONIC_START': '<!--',
+  'WITH_MNEMONIC_END': '-->',
+  'WITHOUT_MNEMONIC_START': '',
+  'WITHOUT_MNEMONIC_END': '',
+}
+
+resource_data += configure_file(
+  input: menubar + '.ui.meson',
+  output: menubar + '-without-mnemonics.ui',
+  configuration: mnemonics_conf,
+)
+
+resource_prefix = 'terminal'
+
+sources += gnome.compile_resources(
+  resource_prefix + '-resources',
+  resource_prefix + '.gresource.xml',
+  c_name: resource_prefix,
+  dependencies: resource_data,
+  export: true,
+)
+
+deps = common_deps + [
+  gsettings_desktop_schemas_dep,
+  libpcre_dep,
+  m_dep,
+  threads_dep,
+]
+
+c_flags = [
+  '-DTERMINAL_COMPILATION',
+  '-DVTE_DISABLE_DEPRECATION_WARNINGS',
+  '-DTERM_LOCALEDIR="@0@"'.format(gt_prefix / gt_localedir),
+]
+
+# GNOME Shell search provider
+if enable_search_provider
+  sources += files('terminal-search-provider.c')
+
+  sources += gnome.gdbus_codegen(
+    'terminal-search-provider-gdbus-generated',
+    shell_search_provider_iface,
+    interface_prefix: 'org.gnome.Shell',
+    namespace: gt_namespace,
+  )
+
+  install_data(
+    gt_name + '-search-provider.ini',
+    install_dir: join_paths(gt_datadir, 'gnome-shell', 'search-providers'),
+  )
+endif
+
+executable(
+  gt_name + '-server',
+  sources + [enums_sources, gdbus_sources],
+  include_directories: top_inc,
+  dependencies: deps,
+  c_args: c_flags,
+  install: true,
+  install_dir: gt_libexecdir,
+)
+
+# Legacy terminal client
+sources = files(
+  'terminal.c',
+  'terminal-client-utils.c',
+  'terminal-debug.c',
+  'terminal-i18n.c',
+  'terminal-options.c',
+  'terminal-profiles-list.c',
+  'terminal-settings-list.c',
+)
+
+c_flags = [
+  '-DTERMINAL_COMPILATION',
+  '-DTERMINAL_CLIENT',
+  '-DTERM_DATADIR="@0@"'.format(gt_prefix / gt_datadir),
+  '-DTERM_LOCALEDIR="@0@"'.format(gt_prefix / gt_localedir),
+  '-DTERM_PKGDATADIR="@0@"'.format(gt_prefix / gt_pkgdatadir),
+]
+
+executable(
+  gt_name,
+  sources + [enums_sources, gdbus_sources],
+  include_directories: top_inc,
+  dependencies: common_deps,
+  c_args: c_flags,
+  install: true,
+)
+
+# Nautilus extension
+if enable_nautilus_extension
+  sources = files(
+    'terminal-client-utils.c',
+    'terminal-i18n.c',
+    'terminal-nautilus.c',
+  )
+
+  deps = [
+    gio_dep,
+    glib_dep,
+    gtk_dep,
+    libnautilus_extension_dep,
+  ]
+
+  symbol_map = meson.current_source_dir() / 'nautilus.map'
+  ldflags = cc.get_supported_link_arguments('-Wl,--version-script,@0@'.format(symbol_map))
+
+  shared_module(
+    'terminal-nautilus',
+    sources: sources + [enums_sources, gdbus_sources],
+    include_directories: top_inc,
+    dependencies: deps,
+    c_args: '-DTERM_LOCALEDIR="@0@"'.format(gt_prefix / gt_localedir),
+    link_args: ldflags,
+    link_depends: symbol_map,
+    install: true,
+    install_dir: libnautilus_extension_extensiondir,
+  )
+endif
+
+# Checks
+test_unit = 'terminal-regex'
+
+exe = executable(
+  test_unit,
+  test_unit + '.c',
+  include_directories: top_inc,
+  c_args: '-DTERMINAL_REGEX_MAIN',
+  dependencies: glib_dep,
+)
+
+test(test_unit, exe)
diff --git a/src/nautilus.map b/src/nautilus.map
new file mode 100644
index 00000000..5e189338
--- /dev/null
+++ b/src/nautilus.map
@@ -0,0 +1,8 @@
+{
+    global:
+        nautilus_module_initialize;
+        nautilus_module_shutdown;
+        nautilus_module_list_types;
+    local:
+        *;
+};
diff --git a/src/org.gnome.Terminal.service.in b/src/org.gnome.Terminal.service.in
new file mode 100644
index 00000000..91715fca
--- /dev/null
+++ b/src/org.gnome.Terminal.service.in
@@ -0,0 +1,4 @@
+[D-BUS Service]
+Name=org.gnome.Terminal
+SystemdService=gnome-terminal-server.service
+Exec=@libexecdir@/gnome-terminal-server
diff --git a/src/terminal-menubar.ui.meson b/src/terminal-menubar.ui.meson
new file mode 100644
index 00000000..0929757f
--- /dev/null
+++ b/src/terminal-menubar.ui.meson
@@ -0,0 +1,251 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright © 2012, 2017 Christian Persch
+
+  This program is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+<interface>
+  <menu id="menubar">
+    <submenu>
+      @WITH_MNEMONIC_START@<attribute name="label" translatable="yes">_File</attribute>@WITH_MNEMONIC_END@
+      @WITHOUT_MNEMONIC_START@<attribute name="label" 
translatable="yes">File</attribute>@WITHOUT_MNEMONIC_END@
+      <section id="new-terminal-section" />
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">_Save Contents…</attribute>
+          <attribute name="action">win.save-contents</attribute>
+          <attribute name="hidden-when">action-missing</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">_Export…</attribute>
+          <attribute name="action">win.export</attribute>
+          <attribute name="hidden-when">action-missing</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">_Print…</attribute>
+          <attribute name="action">win.print</attribute>
+          <attribute name="hidden-when">action-missing</attribute>
+        </item>
+      </section>
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">C_lose Tab</attribute>
+          <attribute name="action">win.close</attribute>
+          <attribute name="target">tab</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">_Close Window</attribute>
+          <attribute name="action">win.close</attribute>
+          <attribute name="target">window</attribute>
+        </item>
+      </section>
+    </submenu>
+    <submenu>
+      @WITH_MNEMONIC_START@<attribute name="label" translatable="yes">_Edit</attribute>@WITH_MNEMONIC_END@
+      @WITHOUT_MNEMONIC_START@<attribute name="label" 
translatable="yes">Edit</attribute>@WITHOUT_MNEMONIC_END@
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">_Copy</attribute>
+          <attribute name="action">win.copy</attribute>
+          <attribute name="target">text</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">Copy as _HTML</attribute>
+          <attribute name="action">win.copy</attribute>
+          <attribute name="target">html</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">_Paste</attribute>
+          <attribute name="action">win.paste-text</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">Paste as _Filenames</attribute>
+          <attribute name="action">win.paste-uris</attribute>
+          <attribute name="hidden-when">action-disabled</attribute>
+        </item>
+      </section>
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">Select _All</attribute>
+          <attribute name="action">win.select-all</attribute>
+        </item>
+      </section>
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">P_references</attribute>
+          <attribute name="action">win.edit-preferences</attribute>
+        </item>
+      </section>
+    </submenu>
+    <submenu>
+      @WITH_MNEMONIC_START@<attribute name="label" translatable="yes">_View</attribute>@WITH_MNEMONIC_END@
+      @WITHOUT_MNEMONIC_START@<attribute name="label" 
translatable="yes">View</attribute>@WITHOUT_MNEMONIC_END@
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">Show _Menubar</attribute>
+          <attribute name="action">win.menubar-visible</attribute>
+          <attribute name="hidden-when">action-disabled</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">_Full Screen</attribute>
+          <attribute name="action">win.fullscreen</attribute>
+        </item>
+      </section>
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">Zoom _In</attribute>
+          <attribute name="action">win.zoom-in</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">_Normal Size</attribute>
+          <attribute name="action">win.zoom-normal</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">Zoom _Out</attribute>
+          <attribute name="action">win.zoom-out</attribute>
+        </item>
+      </section>
+    </submenu>
+    <submenu>
+      @WITH_MNEMONIC_START@<attribute name="label" translatable="yes">_Search</attribute>@WITH_MNEMONIC_END@
+      @WITHOUT_MNEMONIC_START@<attribute name="label" 
translatable="yes">Search</attribute>@WITHOUT_MNEMONIC_END@
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">_Find…</attribute>
+          <attribute name="action">win.find</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">Find _Next</attribute>
+          <attribute name="action">win.find-forward</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">Find _Previous</attribute>
+          <attribute name="action">win.find-backward</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">_Clear Highlight</attribute>
+          <attribute name="action">win.find-clear</attribute>
+        </item>
+      </section>
+    </submenu>
+    <submenu>
+      @WITH_MNEMONIC_START@<attribute name="label" 
translatable="yes">_Terminal</attribute>@WITH_MNEMONIC_END@
+      @WITHOUT_MNEMONIC_START@<attribute name="label" 
translatable="yes">Terminal</attribute>@WITHOUT_MNEMONIC_END@
+      <section>
+        <section id="set-profile-section" />
+        <item>
+          <attribute name="label" translatable="yes">Set _Title…</attribute>
+          <attribute name="action">win.set-title</attribute>
+          <attribute name="hidden-when">action-missing</attribute>
+        </item>
+        <submenu id="set-encoding-submenu">
+          <attribute name="label" translatable="yes">Set _Character Encoding</attribute>
+        </submenu>
+      </section>
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">Read-_Only</attribute>
+          <attribute name="action">win.read-only</attribute>
+        </item>
+      </section>
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">_Reset</attribute>
+          <attribute name="action">win.reset</attribute>
+          <attribute name="target" type="b">false</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">Reset and C_lear</attribute>
+          <attribute name="action">win.reset</attribute>
+          <attribute name="target" type="b">true</attribute>
+        </item>
+      </section>
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">_1. 80×24</attribute>
+          <attribute name="action">win.size-to</attribute>
+          <attribute name="target" type="(uu)">(80, 24)</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">_2. 80×43</attribute>
+          <attribute name="action">win.size-to</attribute>
+          <attribute name="target" type="(uu)">(80, 43)</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">_3. 132×24</attribute>
+          <attribute name="action">win.size-to</attribute>
+          <attribute name="target" type="(uu)">(132, 24)</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">_4. 132×43</attribute>
+          <attribute name="action">win.size-to</attribute>
+          <attribute name="target" type="(uu)">(132, 43)</attribute>
+        </item>
+      </section>
+    </submenu>
+    <submenu>
+      @WITH_MNEMONIC_START@<attribute name="label" translatable="yes">Ta_bs</attribute>@WITH_MNEMONIC_END@
+      @WITHOUT_MNEMONIC_START@<attribute name="label" 
translatable="yes">Tabs</attribute>@WITHOUT_MNEMONIC_END@
+      <attribute name="action">win.tabs-menu</attribute>
+      <attribute name="hidden-when">action-disabled</attribute>
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">_Previous Tab</attribute>
+          <attribute name="action">win.tab-switch-left</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">_Next Tab</attribute>
+          <attribute name="action">win.tab-switch-right</attribute>
+        </item>
+      </section>
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">Move Tab _Left</attribute>
+          <attribute name="action">win.tab-move-left</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">Move Tab _Right</attribute>
+          <attribute name="action">win.tab-move-right</attribute>
+        </item>
+      </section>
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">_Detach Tab</attribute>
+          <attribute name="action">win.tab-detach</attribute>
+        </item>
+      </section>
+    </submenu>
+    <submenu>
+      @WITH_MNEMONIC_START@<attribute name="label" translatable="yes">_Help</attribute>@WITH_MNEMONIC_END@
+      @WITHOUT_MNEMONIC_START@<attribute name="label" 
translatable="yes">Help</attribute>@WITHOUT_MNEMONIC_END@
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">_Contents</attribute>
+          <attribute name="action">win.help</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">_About</attribute>
+          <attribute name="action">win.about</attribute>
+        </item>
+      </section>
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">_Inspector</attribute>
+          <attribute name="action">win.inspector</attribute>
+          <attribute name="hidden-when">action-disabled</attribute>
+        </item>
+      </section>
+    </submenu>
+  </menu>
+</interface>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]