diff --git a/configure.ac b/configure.ac index 3d6e7e2..ceadc41 100644 --- a/configure.ac +++ b/configure.ac @@ -172,6 +172,16 @@ PKG_CHECK_MODULES(EGG_SMCLIENT, [sm >= 1.0.0]) AC_SUBST(EGG_SMCLIENT_CFLAGS) AC_SUBST(EGG_SMCLIENT_LIBS) +# Introspection +GOBJECT_INTROSPECTION_CHECK([0.9.3]) + +if test "$found_introspection" = "yes"; then + have_introspection=yes + AC_DEFINE([HAVE_INTROSPECTION], [1], [Define to enable GObject Introspection]) +else + have_introspection=no +fi + dnl ================================================================ dnl GSettings related settings dnl ================================================================ @@ -265,5 +275,6 @@ Configuration: Compiler: ${CC} Spell Plugin enabled: $enable_enchant Gvfs metadata enabled: $enable_gvfs_metadata + GObject Introspection: ${have_introspection} Tests enabled: $enable_tests " diff --git a/debian/control b/debian/control index 7ebdb41..7dfecfe 100644 --- a/debian/control +++ b/debian/control @@ -4,10 +4,12 @@ Priority: optional Maintainer: Linux Mint Build-Depends: autotools-dev, debhelper (>= 9), + gobject-introspection, gtk-doc-tools, intltool, iso-codes, libenchant-dev, + libgirepository1.0-dev, libglib2.0-dev, libgtk-3-dev, libgtksourceview-3.0-dev, @@ -137,3 +139,29 @@ Description: generic text editor (documentation files) ChangeLogs, and adjusting indentation levels. . This package contains the documentation files. + +Package: gir1.2-xed +Architecture: any +Depends: ${gir:Depends}, + ${misc:Depends}, + ${shlibs:Depends}, +Description: GObject introspection data for Xed + Xed is a text editor which supports most standard editor features, + extending this basic functionality with other features not usually + found in simple text editors. Xed is a graphical application which + supports editing multiple text files in one window (known sometimes as + tabs or MDI). + . + Xed fully supports international text through its use of the + Unicode UTF-8 encoding in edited files. Its core feature set includes syntax + highlighting of source code, auto indentation and printing and print preview + support. + . + Xed is also extensible through its plugin system, which currently + includes support for spell checking, comparing files, viewing CVS + ChangeLogs, and adjusting indentation levels. + . + This package contains introspection data for Xed. + . + It can be used by packages using the GIRepository format to generate + dynamic bindings. \ No newline at end of file diff --git a/debian/gir1.2-xed.install b/debian/gir1.2-xed.install new file mode 100644 index 0000000..d8bd766 --- /dev/null +++ b/debian/gir1.2-xed.install @@ -0,0 +1,2 @@ +usr/lib/*/girepository-1.0 +usr/share/gir-1.0 \ No newline at end of file diff --git a/xed/Makefile.am b/xed/Makefile.am index c5018fe..1505e33 100644 --- a/xed/Makefile.am +++ b/xed/Makefile.am @@ -5,20 +5,21 @@ bin_PROGRAMS = xed noinst_LTLIBRARIES = libxed.la -AM_CPPFLAGS = \ - -I$(top_srcdir) \ +AM_CPPFLAGS = \ + -I$(top_srcdir) \ -I$(srcdir) \ - -I$(srcdir)/smclient \ - $(XED_CFLAGS) \ - $(WARN_CFLAGS) \ - $(DISABLE_DEPRECATED_CFLAGS) \ - -DDATADIR=\""$(datadir)"\" \ + -I$(srcdir)/smclient \ + $(XED_CFLAGS) \ + $(WARN_CFLAGS) \ + $(INTROSPECTION_CFLAGS) \ + $(DISABLE_DEPRECATED_CFLAGS) \ + -DDATADIR=\""$(datadir)"\" \ -DLIBDIR=\""$(libdir)"\" xed_SOURCES = \ xed.c -xed_LDADD = libxed.la $(XED_LIBS) $(EGG_SMCLIENT_LIBS) +xed_LDADD = libxed.la $(XED_LIBS) $(EGG_SMCLIENT_LIBS) $(INTROSPECTION_LIBS) xed_LDFLAGS = -export-dynamic -no-undefined -export-symbols-regex "^[[^_]].*" @@ -104,22 +105,19 @@ header_DATA = \ $(INST_H_FILES) -libxed_la_SOURCES = \ - $(BUILT_SOURCES) \ - $(BACON_FILES) \ - $(POSIXIO_FILES) \ - xed-app.c \ - xed-close-button.c \ +libxed_c_files = \ + xed-app.c \ + xed-close-button.c \ xed-commands-documents.c \ - xed-commands-edit.c \ - xed-commands-file.c \ + xed-commands-edit.c \ + xed-commands-file.c \ xed-commands-file-print.c \ - xed-commands-help.c \ + xed-commands-help.c \ xed-commands-search.c \ - xed-commands-view.c \ - xed-debug.c \ - xed-dirs.c \ - xed-document.c \ + xed-commands-view.c \ + xed-debug.c \ + xed-dirs.c \ + xed-document.c \ xed-document-input-stream.c \ xed-document-loader.c \ xed-document-output-stream.c \ @@ -127,19 +125,19 @@ libxed_la_SOURCES = \ xed-document-saver.c \ xed-gio-document-saver.c \ xed-documents-panel.c \ - xed-encodings.c \ + xed-encodings.c \ xed-encodings-combo-box.c \ xed-file-chooser-dialog.c \ - xed-help.c \ - xed-history-entry.c \ + xed-help.c \ + xed-history-entry.c \ xed-io-error-message-area.c \ - xed-language-manager.c \ - xed-message-bus.c \ - xed-message-type.c \ - xed-message.c \ - xed-object-module.c \ - xed-notebook.c \ - xed-panel.c \ + xed-language-manager.c \ + xed-message-bus.c \ + xed-message-type.c \ + xed-message.c \ + xed-object-module.c \ + xed-notebook.c \ + xed-panel.c \ xed-plugin-info.c \ xed-plugin.c \ xed-plugin-loader.c \ @@ -162,7 +160,13 @@ libxed_la_SOURCES = \ xed-utils.c \ xed-view.c \ xed-window.c \ - xedtextregion.c \ + xedtextregion.c + +libxed_la_SOURCES = \ + $(libxed_c_files) \ + $(BUILT_SOURCES) \ + $(BACON_FILES) \ + $(POSIXIO_FILES) \ $(NOINST_H_FILES) \ $(INST_H_FILES) @@ -198,6 +202,27 @@ EXTRA_DIST = \ CLEANFILES = $(BUILT_SOURCES) +if HAVE_INTROSPECTION +-include $(INTROSPECTION_MAKEFILE) +INTROSPECTION_GIRS = Xed-1.0.gir +INTROSPECTION_SCANNER_ARGS = -I$(top_srcdir) --warn-all + +Xed-1.0.gir: xed +Xed_1_0_gir_INCLUDES = Gtk-3.0 GtkSource-3.0 +Xed_1_0_gir_FILES = $(INST_H_FILES) $(libxed_c_files) $(BUILT_SOURCES) +Xed_1_0_gir_VERSION = 1.0 +Xed_1_0_gir_PROGRAM = $(builddir)/xed +Xed_1_0_gir_NAMESPACE = Xed + +girdir = $(datadir)/gir-1.0 +gir_DATA = $(INTROSPECTION_GIRS) + +typelibdir = $(libdir)/girepository-1.0 +typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) + +CLEANFILES += $(gir_DATA) $(typelib_DATA) +endif + dist-hook: cd $(distdir); rm -f $(BUILT_SOURCES) diff --git a/xed/xed.c b/xed/xed.c index dc99eac..b2eb973 100644 --- a/xed/xed.c +++ b/xed/xed.c @@ -42,6 +42,10 @@ #include #include +#ifdef HAVE_INTROSPECTION +#include +#endif + #include "xed-app.h" #include "xed-commands.h" #include "xed-debug.h" @@ -522,6 +526,10 @@ main (int argc, char *argv[]) g_option_context_add_group (context, gtk_get_option_group (FALSE)); g_option_context_add_group (context, egg_sm_client_get_option_group ()); +#ifdef HAVE_INTROSPECTION + g_option_context_add_group (context, g_irepository_get_option_group ()); +#endif + gtk_init (&argc, &argv); if (!g_option_context_parse (context, &argc, &argv, &error))