Index: gtksourceview/gtksourceview-glade-catalog.c
===================================================================
--- gtksourceview/gtksourceview-glade-catalog.c	(revision 0)
+++ gtksourceview/gtksourceview-glade-catalog.c	(revision 0)
@@ -0,0 +1,2 @@
+/* Stub file for GtkSourceView */
+#include <gtksourceview/gtksourceview.h>
Index: gtksourceview/Makefile.am
===================================================================
--- gtksourceview/Makefile.am	(revision 1945)
+++ gtksourceview/Makefile.am	(working copy)
@@ -114,6 +114,27 @@
 	&& (cmp -s xgen-gth gtksourceview-typebuiltins.h || cp xgen-gth gtksourceview-typebuiltins.h) \
 	&& rm -f xgen-gth && echo stamp > $(@F)
 
+if HAVE_GLADE
+
+# For now install in our own prefix
+# gladegtksourceviewdir = @GLADE_PLUGINS_PATH@
+
+gladegtksourceviewdir = $(libdir)/glade3/modules
+
+gladegtksourceview_LTLIBRARIES = libgladegtksourceview.la
+libgladegtksourceview_la_DEPENDENCIES = libgtksourceview-2.0.la
+libgladegtksourceview_la_SOURCES = gtksourceview-glade-catalog.c
+libgladegtksourceview_la_LDFLAGS = -no-undefined -module -avoid-version
+libgladegtksourceview_la_LIBADD = $(top_builddir)/gtksourceview/libgtksourceview-2.0.la
+
+# For now install in our own prefix
+# catalogdir = @GLADE_CATALOG_PATH@
+
+catalogdir = $(datadir)/glade3/catalogs
+catalog_DATA = gtksourceview-glade.xml
+
+endif
+
 EXTRA_DIST = \
 	gtksourceview-marshal.list
 
Index: gtksourceview/gtksourceview-glade.xml
===================================================================
--- gtksourceview/gtksourceview-glade.xml	(revision 0)
+++ gtksourceview/gtksourceview-glade.xml	(revision 0)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<glade-catalog name="gtksourceview" library="gladegtksourceview" 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>
Index: configure.ac
===================================================================
--- configure.ac	(revision 1945)
+++ configure.ac	(working copy)
@@ -36,6 +36,7 @@
 # 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)
@@ -94,6 +95,46 @@
         AC_SUBST(ABS_TOP_SRCDIR)
 fi
 
+dnl Check for Glade3
+dnl ---------------------
+
+AC_ARG_ENABLE(glade-catalog,
+  [  --disable-glade-catalog        Do not build glade catalog files],
+  [ if test "$enableval" = "no"; then
+       user_disabled_glade=1
+    fi ],
+  [ user_disabled_glade=0 ] )
+
+AC_MSG_CHECKING(for glade3 to install catalog)
+if test "$user_disabled_glade" = 1; then
+	AC_MSG_RESULT(yes)
+	libgladeui_found="no"
+else
+	AC_MSG_RESULT(no)
+	AC_PATH_PROG(PKG_PATH, pkg-config, no)
+	gladeui_version=0
+	PKG_CHECK_MODULES(PLUGIN_GLADE, gladeui-1.0,
+	    [
+		libgladeui_found="yes"
+		gladeui_version=`$PKG_PATH --modversion gladeui-1.0 | sed -e 's,\.,,g'`
+	    ], [
+		libgladeui_found="no"
+	    ])
+	if test x$libgladeui_found = xno; then
+	    PKG_CHECK_MODULES(GLADE, [libgladeui-1.0 >= $GLADEUI_REQUIRED],
+		[
+			libgladeui_found="yes"
+			gladeui_version=`$PKG_PATH --modversion libgladeui-1.0 | sed -e 's,\.,,g'`
+		], [
+			libgladeui_found="no"
+		])
+	fi
+	AC_DEFINE_UNQUOTED(GLADEUI_VERSION, [$gladeui_version], [GLADEUI version])
+	AC_SUBST(GLADEUI_VERSION)
+fi
+
+AM_CONDITIONAL(HAVE_GLADE, [test x$libgladeui_found = xyes])
+
 # I18N stuff
 GETTEXT_PACKAGE=gtksourceview-2.0
 AC_SUBST(GETTEXT_PACKAGE)
