[vte] build: Restore glade catalogue



commit 7927c771b9394eaaf88c0b1cd4d10c76086f352a
Author: Aleksandr Mezin <mezin alexander gmail com>
Date:   Sat Sep 12 21:59:56 2020 +0200

    build: Restore glade catalogue
    
    Fixes: https://gitlab.gnome.org/GNOME/vte/-/issues/281

 .../hicolor_actions_16x16_widget-vte-terminal.png  | Bin 0 -> 644 bytes
 .../hicolor_actions_22x22_widget-vte-terminal.png  | Bin 0 -> 901 bytes
 bindings/glade/meson.build                         |  42 +++++++++++++++++++++
 bindings/glade/vte.xml.in                          |  17 +++++++++
 bindings/meson.build                               |   4 ++
 meson.build                                        |   1 +
 meson_options.txt                                  |   7 ++++
 7 files changed, 71 insertions(+)
---
diff --git a/bindings/glade/hicolor_actions_16x16_widget-vte-terminal.png 
b/bindings/glade/hicolor_actions_16x16_widget-vte-terminal.png
new file mode 100644
index 00000000..e767bc68
Binary files /dev/null and b/bindings/glade/hicolor_actions_16x16_widget-vte-terminal.png differ
diff --git a/bindings/glade/hicolor_actions_22x22_widget-vte-terminal.png 
b/bindings/glade/hicolor_actions_22x22_widget-vte-terminal.png
new file mode 100644
index 00000000..94a41cf5
Binary files /dev/null and b/bindings/glade/hicolor_actions_22x22_widget-vte-terminal.png differ
diff --git a/bindings/glade/meson.build b/bindings/glade/meson.build
new file mode 100644
index 00000000..2d241101
--- /dev/null
+++ b/bindings/glade/meson.build
@@ -0,0 +1,42 @@
+# Copyright © 2020 Aleksandr Mezin
+# Copyright © 2020 Christian Persch
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This library 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 Lesser
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library.  If not, see <https://www.gnu.org/licenses/>.
+
+gladedir = vte_datadir / 'glade'
+cataloguedir =  gladedir / 'catalogs'
+pixmapdir = gladedir / 'pixmaps'
+
+catalog_conf = configuration_data()
+catalog_conf.set('VTE_API_VERSION', vte_gtk3_api_version)
+catalog_conf.set('VERSION', vte_version)
+
+configure_file(
+  input: 'vte.xml.in',
+  configuration: catalog_conf,
+  install_dir: cataloguedir,
+  output: vte_gtk3_api_name + '.xml',
+)
+
+install_data(
+  'hicolor_actions_16x16_widget-vte-terminal.png',
+  install_dir: pixmapdir / 'hicolor' / '16x16' / 'actions',
+  rename: 'widget-vte-terminal.png',
+)
+
+install_data(
+  'hicolor_actions_22x22_widget-vte-terminal.png',
+  install_dir: pixmapdir / 'hicolor' / '22x22' / 'actions',
+  rename: 'widget-vte-terminal.png',
+)
diff --git a/bindings/glade/vte.xml.in b/bindings/glade/vte.xml.in
new file mode 100644
index 00000000..b5000a26
--- /dev/null
+++ b/bindings/glade/vte.xml.in
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<glade-catalog name="vte-@VTE_API_VERSION@"
+               version="@VERSION@"
+               library="vte-@VTE_API_VERSION@"
+               domain="vte-@VTE_API_VERSION@"
+               depends="gtk+"
+               book="vte"
+               supports="gtkbuilder">
+  <glade-widget-classes>
+    <glade-widget-class title="VTE Terminal" name="VteTerminal" generic-name="terminal" />
+  </glade-widget-classes>
+
+  <glade-widget-group name="vte-terminal" title="VTE Terminal">
+    <glade-widget-class-ref name="VteTerminal"/>
+  </glade-widget-group>
+
+</glade-catalog>
diff --git a/bindings/meson.build b/bindings/meson.build
index 76ee9b0b..3ca2142a 100644
--- a/bindings/meson.build
+++ b/bindings/meson.build
@@ -14,6 +14,10 @@
 # You should have received a copy of the GNU Lesser General Public License
 # along with this library.  If not, see <https://www.gnu.org/licenses/>.
 
+if get_option('glade') and get_option('gtk3')
+  subdir('glade')
+endif
+
 if get_option('gir') and (get_option('gtk3') or get_option('gtk4'))
   subdir('gir')
 endif
diff --git a/meson.build b/meson.build
index 62075f0a..6c428295 100644
--- a/meson.build
+++ b/meson.build
@@ -507,6 +507,7 @@ output += '  ICU:          ' + get_option('icu').to_string() + '\n'
 output += '  GIR:          ' + get_option('gir').to_string() + '\n'
 output += '  systemd:      ' + systemd_dep.found().to_string() + '\n'
 output += '  SIXEL:        ' + get_option('sixel').to_string() + '\n'
+output += '  Glade:        ' + get_option('glade').to_string() + '\n'
 output += '  Vala:         ' + get_option('vapi').to_string() + '\n'
 output += '\n'
 output += '  Prefix:       ' + get_option('prefix') + '\n'
diff --git a/meson_options.txt b/meson_options.txt
index d37be0ab..9a351e88 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -57,6 +57,13 @@ option(
   description: 'Enable FriBidi support',
 )
 
+option(
+  'glade',
+  type: 'boolean',
+  value : true,
+  description: 'Install a glade catalogue file'
+)
+
 option(
   'gnutls',
   type: 'boolean',


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