[gtksourceview] Install Glade catalog, fixing GNOME bug #527137
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] Install Glade catalog, fixing GNOME bug #527137
- Date: Tue, 16 Mar 2010 10:04:52 +0000 (UTC)
commit 3e63dbb715561650d35215be16fc17f46c3a7fea
Author: David King <davidk openismus com>
Date: Mon Mar 15 17:29:27 2010 +0100
Install Glade catalog, fixing GNOME bug #527137
Add a configure option --enable-glade-catalog. If enabled, check for the
presence of a suitable version of Glade and install the catalog file to
the correct location, as determined by the catalogdir variable in the
Glade pkg-config file. The pkg-config check was taken from mm-common,
and originally written by Daniel Elstner.
Makefile.am | 9 +++++++--
configure.ac | 18 ++++++++++++++++++
glade/Makefile.am | 2 ++
glade/gtksourceview-glade.xml | 31 +++++++++++++++++++++++++++++++
4 files changed, 58 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 60a2544..b420fc7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,11 @@
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
-SUBDIRS = gtksourceview po docs tests
+if GLADE_CATALOG
+glade_subdir = glade
+else
+glade_subdir =
+endif
+SUBDIRS = gtksourceview po docs tests $(glade_subdir)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gtksourceview-2.0.pc
@@ -37,7 +42,7 @@ MAINTAINERCLEANFILES = \
mkinstalldirs \
`find "$(srcdir)" -type f -name Makefile.in -print`
-DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-glade-catalog
CHANGELOG_START = GTKSOURCEVIEW_2_6_1
diff --git a/configure.ac b/configure.ac
index db89f93..45c7495 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,6 +32,7 @@ AC_CHECK_HEADERS([unistd.h])
# Dependencies
GTK_REQUIRED_VERSION=2.12.0
LIBXML_REQUIRED_VERSION=2.5.0
+GLADE_UI_REQUIRED=3.2
AC_SUBST(GTK_REQUIRED_VERSION)
AC_SUBST(LIBXML_REQUIRED_VERSION)
@@ -78,6 +79,22 @@ if test "$os_osx" = "yes"; then
PKG_CHECK_MODULES(IGE_MAC, ige-mac-integration)
fi
+# Check for Glade3
+AC_ARG_ENABLE([glade-catalog],
+ [AS_HELP_STRING([--enable-glade-catalog],
+ [Install a glade catalog file [default=no]])],
+ [glade_catalog=$enableval],
+ [glade_catalog=no])
+
+AM_CONDITIONAL([GLADE_CATALOG], [test "x$glade_catalog" = xyes])
+
+AS_IF([test "x$glade_catalog" = xyes],
+ [PKG_CHECK_EXISTS(GLADE, [gladeui-1.0 >= $GLADE_UI_REQUIRED])
+ AC_MSG_CHECKING([for Glade catalog dir])
+ GLADE_CATALOGDIR=`$PKG_CONFIG --variable=catalogdir gladeui-1.0 2>&AS_MESSAGE_LOG_FD`
+ AC_MSG_RESULT([$GLADE_CATALOGDIR])
+ AC_SUBST(GLADE_CATALOGDIR)])
+
# i18N stuff
IT_PROG_INTLTOOL([0.40])
@@ -106,6 +123,7 @@ gtksourceview/language-specs/Makefile
docs/Makefile
docs/reference/Makefile
docs/reference/version.xml
+glade/Makefile
tests/Makefile
])
diff --git a/glade/Makefile.am b/glade/Makefile.am
new file mode 100644
index 0000000..a68f773
--- /dev/null
+++ b/glade/Makefile.am
@@ -0,0 +1,2 @@
+catalogdir = $(GLADE_CATALOGDIR)
+dist_catalog_DATA = gtksourceview-glade.xml
diff --git a/glade/gtksourceview-glade.xml b/glade/gtksourceview-glade.xml
new file mode 100644
index 0000000..cc41b02
--- /dev/null
+++ b/glade/gtksourceview-glade.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<glade-catalog name="gtksourceview" library="gtksourceview-2.0" depends="gtk+">
+ <glade-widget-classes>
+ <glade-widget-class name="GtkSourceView" title="GtkSourceView" generic-name="gtksourceview">
+ <properties>
+ <property id="auto-indent" common="True" default="True" />
+ <property id="highlight-current-line" common="False" default="False" />
+ <property id="indent-on-tab" common="False" default="False" />
+ <property id="insert-spaces-instead-of-tabs" common="False" default="False" />
+ <property id="right-margin-position" common="False" default="80" />
+ <property id="show-line-marks" common="False" default="False" />
+ <property id="show-line-numbers" common="False" default="False" />
+ <property id="show-right-margin" common="False" default="False" />
+ <property id="smart-home-end" common="True" default="Disabled">
+ <displayable-values>
+ <value id="GTK_SOURCE_SMART_HOME_END_DISABLED" name="Disabled" />
+ <value id="GTK_SOURCE_SMART_HOME_END_BEFORE" name="Before" />
+ <value id="GTK_SOURCE_SMART_HOME_END_AFTER" name="After" />
+ <value id="GTK_SOURCE_SMART_HOME_END_ALWAYS" name="Always" />
+ </displayable-values>
+ </property>
+ <property id="tab-width" common="False" default="4" />
+ </properties>
+ </glade-widget-class>
+ </glade-widget-classes>
+
+ <glade-widget-group name="GtkSourceView" title="GtkSourceView">
+ <glade-widget-class-ref name="GtkSourceView" />
+ </glade-widget-group>
+</glade-catalog>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]