Bug 339819 – LibVTE terminals in GLADE
authorChristian Persch <chpe@src.gnome.org>
Thu, 23 Oct 2008 08:39:38 +0000 (08:39 +0000)
committerChristian Persch <chpe@src.gnome.org>
Thu, 23 Oct 2008 08:39:38 +0000 (08:39 +0000)
Terminal icons copied from gnome-icon-theme (licence: GPL).

svn path=/trunk/; revision=2129

Makefile.am
configure.in
glade/Makefile.am [new file with mode: 0644]
glade/hicolor_actions_16x16_widget-vte-terminal.png [new file with mode: 0644]
glade/hicolor_actions_22x22_widget-vte-terminal.png [new file with mode: 0644]
glade/vte.xml.in [new file with mode: 0644]

index 1c4453e..c1a6945 100644 (file)
@@ -6,6 +6,10 @@ if BUILD_GNOME_PTY_HELPER
 SUBDIRS += gnome-pty-helper
 endif
 
+if ENABLE_GLADE_CATALOGUE
+SUBDIRS += glade
+endif
+
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = vte.pc
 
index b63b4ee..2f63798 100644 (file)
@@ -621,6 +621,32 @@ AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
 PKG_CHECK_EXISTS([glib-2.0 >= 2.14],[GLIB_GENMARSHAL_INTERNAL="--internal"],[GLIB_GENMARSHAL_INTERNAL=""])
 AC_SUBST([GLIB_GENMARSHAL_INTERNAL])
 
+################################################################################
+# Glade catalogue
+################################################################################
+
+AC_MSG_CHECKING([whether to install the glade catalogue])
+AC_ARG_ENABLE([glade-catalogue],
+  [AS_HELP_STRING([--disable-glade],[Disable installing the glade catalogue])],
+  [],[enable_glade_catalogue=yes])
+AC_MSG_RESULT([$enable_glade_catalogue])
+
+if test "$enable_glade_catalogue" = "yes"; then
+  GLADE_CATALOGUE_DIR="$($PKG_CONFIG --variable=catalogdir gladeui-1.0)"
+  GLADE_ICON_DIR="$($PKG_CONFIG --variable=pixmapdir gladeui-1.0)"
+  GLADE_MODULE_DIR="$($PKG_CONFIG --variable=moduledir gladeui-1.0)"
+
+  if test -z "$GLADE_CATALOGUE_DIR" -o -z "$GLADE_MODULE_DIR"; then
+    AC_MSG_ERROR([gladeui-1.0 not found])
+  fi
+
+  AC_SUBST([GLADE_CATALOGUE_DIR])
+  AC_SUBST([GLADE_ICON_DIR])
+  AC_SUBST([GLADE_MODULE_DIR])
+fi
+  
+AM_CONDITIONAL([ENABLE_GLADE_CATALOGUE],[test "$enable_glade_catalogue" = "yes"])
+
 ################################################################################
 
 GTK_DOC_CHECK([1.0])
@@ -643,6 +669,7 @@ po/Makefile.in
 doc/Makefile
 doc/openi18n/Makefile
 doc/reference/Makefile
+glade/Makefile
 vte.pc
 vte-uninstalled.pc
 ])
@@ -662,6 +689,7 @@ Configuration for libvte $VERSION
        With XFT: $with_xft2
        With PangoX: $with_pangox
        With PCRE: $use_pcre
+       Installing Glade catalogue: $enable_glade_catalogue
        Debugging: $DEBUG
        Disable deprecated features: $usedeprecation
 EOF
diff --git a/glade/Makefile.am b/glade/Makefile.am
new file mode 100644 (file)
index 0000000..2015155
--- /dev/null
@@ -0,0 +1,43 @@
+NULL =
+
+cataloguedir = $(GLADE_CATALOGUE_DIR)
+catalogue_in_files = vte.xml.in
+catalogue_DATA = $(catalogue_in_files:.xml.in=.xml)
+
+icons = \
+       hicolor_actions_16x16_widget-vte-terminal.png \
+       hicolor_actions_22x22_widget-vte-terminal.png \
+       $(NULL)
+
+EXTRA_DIST = \
+       $(catalogue_DATA) \
+       $(icons) \
+       $(NULL)
+
+install-icons:
+       for icon in $(icons); do \
+               THEME=`echo $$icon | cut -d_ -f1`; \
+               CONTEXT=`echo $$icon | cut -d_ -f2`; \
+               SIZE=`echo $$icon | cut -d_ -f3`; \
+               ICONFILE=`echo $$icon | cut -d_ -f4`; \
+               mkdir -p $(DESTDIR)$(GLADE_ICON_DIR)/$$THEME/$$SIZE/$$CONTEXT; \
+               $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(GLADE_ICON_DIR)/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
+       done
+
+uninstall-icons:
+       -for icon in $(icons); do \
+               THEME=`echo $$icon | cut -d_ -f1`; \
+               CONTEXT=`echo $$icon | cut -d_ -f2`; \
+               SIZE=`echo $$icon | cut -d_ -f3`; \
+               ICONFILE=`echo $$icon | cut -d_ -f4`; \
+               rm -f $(DESTDIR)$(GLADE_ICON_DIR)/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
+       done
+
+validate: $(catalogue_DATA)
+       xmllint --dtdvalid $(GLADE_CATALOGUE_DIR)/glade-catalog.dtd --noout $<
+
+install-data-local: install-icons
+
+uninstall-local: uninstall-icons
+
+@INTLTOOL_XML_NOMERGE_RULE@
diff --git a/glade/hicolor_actions_16x16_widget-vte-terminal.png b/glade/hicolor_actions_16x16_widget-vte-terminal.png
new file mode 100644 (file)
index 0000000..e767bc6
Binary files /dev/null and b/glade/hicolor_actions_16x16_widget-vte-terminal.png differ
diff --git a/glade/hicolor_actions_22x22_widget-vte-terminal.png b/glade/hicolor_actions_22x22_widget-vte-terminal.png
new file mode 100644 (file)
index 0000000..94a41cf
Binary files /dev/null and b/glade/hicolor_actions_22x22_widget-vte-terminal.png differ
diff --git a/glade/vte.xml.in b/glade/vte.xml.in
new file mode 100644 (file)
index 0000000..263ec89
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<glade-catalog name="vte" library="vte" domain="vte" depends="gtk+" book="vte" supports="gtkbuilder">
+  <glade-widget-classes>
+    <glade-widget-class title="VTE Terminal" name="VteTerminal" generic-name="terminal">
+      <properties>
+        <property id="allow-bold" />
+        <property id="audible-bell" />
+        <property id="background-image-file" />
+        <property id="background-image-pixbuf" />
+        <property id="background-opacity" />
+        <property id="background-saturation" />
+        <property id="background-tint-color" />
+        <property id="background-transparent" />
+        <property id="backspace-binding" />
+        <property id="cursor-blink-mode" />
+        <property id="cursor-shape" />
+        <property id="delete-binding" />
+        <property id="emulation" />
+        <property id="encoding" />
+        <property id="font" />
+        <property id="font-antialias" />
+        <property id="icon-title" />
+        <property id="pointer-autohide" />
+        <property id="pty" />
+        <property id="scroll-background" />
+        <property id="scrollback-lines" />
+        <property id="scroll-on-keystroke" />
+        <property id="scroll-on-output" />
+        <property id="window-title" />
+        <property id="word-chars" />
+        <property id="visible-bell" />
+      </properties>
+    </glade-widget-class>
+  </glade-widget-classes>
+
+  <glade-widget-group name="vte-terminal" title="VTE Terminal">
+    <glade-widget-class-ref name="VteTerminal"/>
+  </glade-widget-group>
+
+</glade-catalog>