Port to meson (#258)
* Port to meson * plugin generation script: swtich to meson, update to python3, switch to libpeas, add some extra options, and cleanup * clean up some build warnings * kill xed-bugreport.sh with fire: it isn't used anymore, and probably doesn't even work * update gzip command to avoid warnings on some systems and move appdata.xml to /usr/share/metainfo/ as that's where it's supposed to go now * POTFILES.in: fix path that changed in the meson port, which was causing makepot to fail
This commit is contained in:
parent
39cadaa36e
commit
6e36dc4a5f
70
Makefile.am
70
Makefile.am
|
@ -1,70 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
||||
|
||||
SUBDIRS = xed pixmaps po data plugins docs help
|
||||
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
|
||||
EXTRA_DIST = \
|
||||
autogen.sh \
|
||||
ChangeLog \
|
||||
HACKING \
|
||||
NEWS \
|
||||
NEWS.GNOME \
|
||||
README \
|
||||
xmldocs.make \
|
||||
omf.make \
|
||||
intltool-extract.in \
|
||||
intltool-merge.in \
|
||||
intltool-update.in
|
||||
|
||||
DISTCLEANFILES = \
|
||||
intltool-extract \
|
||||
intltool-merge \
|
||||
intltool-update
|
||||
|
||||
MAINTAINERCLEANFILES = \
|
||||
aclocal.m4 \
|
||||
config.guess \
|
||||
config.h.in \
|
||||
config.sub \
|
||||
depcomp \
|
||||
intltool-extract.in \
|
||||
intltool-merge.in \
|
||||
intltool-update.in \
|
||||
configure \
|
||||
INSTALL \
|
||||
gtk-doc.make \
|
||||
install-sh \
|
||||
ltmain.sh \
|
||||
missing \
|
||||
mkinstalldirs \
|
||||
omf.make \
|
||||
py-compile \
|
||||
xmldocs.make \
|
||||
m4/gtk-doc.m4 \
|
||||
m4/intltool.m4 \
|
||||
m4/libtool.m4 \
|
||||
m4/ltoptions.m4 \
|
||||
m4/ltsugar.m4 \
|
||||
m4/ltversion.m4 \
|
||||
m4/lt~obsolete.m4 \
|
||||
`find "$(srcdir)" -type f -name Makefile.in -print`
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
|
||||
|
||||
dist-hook:
|
||||
@if test -d "$(srcdir)/.git"; \
|
||||
then \
|
||||
echo Creating ChangeLog && \
|
||||
(GIT_DIR=$(top_srcdir)/.git \
|
||||
./missing --run git log --stat -M -C --name-status --date=short --no-color) | \
|
||||
fmt --split-only > ChangeLog.tmp \
|
||||
&& mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
|
||||
|| ( rm -f ChangeLog.tmp ; \
|
||||
echo Failed to generate ChangeLog >&2 ); \
|
||||
else \
|
||||
echo A git clone is required to generate a ChangeLog >&2; \
|
||||
fi
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
31
autogen.sh
31
autogen.sh
|
@ -1,31 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
PKG_NAME="xed"
|
||||
|
||||
(test -f $srcdir/configure.ac) || {
|
||||
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
|
||||
echo " top-level $PKG_NAME directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
which gnome-autogen.sh || {
|
||||
echo "You need to install gnome-common"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
which yelp-build || {
|
||||
echo "You need to install yelp-tools"
|
||||
exit 1
|
||||
}
|
||||
|
||||
REQUIRED_AUTOMAKE_VERSION=1.9
|
||||
GNOME_DATADIR="$gnome_datadir"
|
||||
USE_COMMON_DOC_BUILD=yes
|
||||
|
||||
. gnome-autogen.sh
|
||||
|
239
configure.ac
239
configure.ac
|
@ -1,239 +0,0 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.63.2)
|
||||
|
||||
m4_define(xed_major_version, 1)
|
||||
m4_define(xed_minor_version, 8)
|
||||
m4_define(xed_micro_version, 3)
|
||||
m4_define(xed_version, xed_major_version.xed_minor_version.xed_micro_version)
|
||||
|
||||
AC_INIT([xed], [xed_version],
|
||||
[https://github.com/linuxmint/xed/issues],
|
||||
[xed], [http://github.com/linuxmint/xed])
|
||||
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
AC_CONFIG_SRCDIR(xed/xed.c)
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AC_DEFINE(XED_MAJOR_VERSION, xed_major_version, [Xed major version])
|
||||
AC_SUBST(XED_MAJOR_VERSION, xed_major_version)
|
||||
AC_DEFINE(XED_MINOR_VERSION, xed_minor_version, [Xed minor version])
|
||||
AC_SUBST(XED_MINOR_VERSION, xed_minor_version)
|
||||
AC_DEFINE(XED_MICRO_VERSION, xed_micro_version, [Xed micro version])
|
||||
AC_SUBST(XED_MICRO_VERSION, xed_micro_version)
|
||||
|
||||
AM_INIT_AUTOMAKE([1.10 dist-xz no-dist-gzip -Wno-portability check-news])
|
||||
AM_MAINTAINER_MODE
|
||||
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
|
||||
|
||||
# Checks for programs
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
AC_SYS_LARGEFILE
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
# Initialize libtool
|
||||
LT_PREREQ([2.2.6])
|
||||
LT_INIT(disable-static)
|
||||
|
||||
GTK_DOC_CHECK([1.0],[--flavour=no-tmpl])
|
||||
|
||||
AC_CHECK_FUNC(sigaction)
|
||||
AC_CHECK_LIB(m, floor)
|
||||
|
||||
dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
|
||||
AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS -I m4")
|
||||
|
||||
dnl toolbar style for GSettings schemas
|
||||
TOOLBAR_STYLE="XED_TOOLBAR_SYSTEM"
|
||||
AC_SUBST(TOOLBAR_STYLE)
|
||||
|
||||
dnl ===============================================================
|
||||
dnl Expanded dirs
|
||||
dnl ===============================================================
|
||||
|
||||
# This macro expands DIR and assigns it to RET.
|
||||
# If DIR is NONE, then it's replaced by DEFAULT.
|
||||
# Based on AC_DEFINE_DIR
|
||||
AC_DEFUN([XED_FULLPATH], [
|
||||
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
|
||||
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
|
||||
ac_expand=[$]$1
|
||||
test "x$ac_expand" = xNONE && ac_expand="[$]$2"
|
||||
ac_expand=`eval echo [$]ac_expand`
|
||||
$3=`eval echo [$]ac_expand`
|
||||
])
|
||||
|
||||
dnl ================================================================
|
||||
dnl Gettext stuff.
|
||||
dnl ================================================================
|
||||
|
||||
IT_PROG_INTLTOOL([0.50.1])
|
||||
GETTEXT_PACKAGE=xed
|
||||
AC_SUBST([GETTEXT_PACKAGE])
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Define to the Gettext package name])
|
||||
|
||||
dnl ================================================================
|
||||
dnl Use gvfs metadata or the old xml file store.
|
||||
dnl ================================================================
|
||||
|
||||
AC_ARG_ENABLE([gvfs-metadata],
|
||||
AS_HELP_STRING([--enable-gvfs-metadata], [Enable using gvfs to store metadata]),
|
||||
[enable_gvfs_metadata=$enableval],
|
||||
[enable_gvfs_metadata=yes])
|
||||
|
||||
AM_CONDITIONAL(ENABLE_GVFS_METADATA, test "x$enable_gvfs_metadata" != "xno")
|
||||
|
||||
if test "x$enable_gvfs_metadata" != "xno"; then
|
||||
AC_DEFINE([ENABLE_GVFS_METADATA], [1], [Define to enable using gvfs metadata])
|
||||
fi
|
||||
|
||||
dnl ================================================================
|
||||
dnl spell plugins checks: enchant and iso-codes
|
||||
dnl ================================================================
|
||||
|
||||
GSPELL_REQUIRED=0.2.5
|
||||
|
||||
AC_ARG_ENABLE([spell],
|
||||
AS_HELP_STRING([--disable-spell],[Disable spell plugin (default: enabled)]),
|
||||
[enable_spell=$enableval],
|
||||
[enable_spell=yes])
|
||||
|
||||
if test "x$enable_spell" = "xyes" ; then
|
||||
|
||||
PKG_CHECK_MODULES(GSPELL, gspell-1 >= $GSPELL_REQUIRED, \
|
||||
have_gspell=yes, have_gspell=no)
|
||||
|
||||
if test "x$have_gspell" = "xno"; then
|
||||
enable_spell=no
|
||||
AC_MSG_ERROR([gspell library not found or too old. Use --disable-spell to build without spell plugin.])
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(ENABLE_SPELL, test x"$enable_spell" = "xyes")
|
||||
|
||||
dnl ================================================================
|
||||
dnl Start of pkg-config checks
|
||||
dnl ================================================================
|
||||
|
||||
PKG_CHECK_MODULES(GMODULE,gmodule-2.0,[GMODULE_ADD="gmodule-2.0"],[GMODULE_ADD=""])
|
||||
PKG_CHECK_MODULES(XED, [
|
||||
libxml-2.0 >= 2.5.0
|
||||
glib-2.0 >= 2.40.0
|
||||
$GMODULE_ADD
|
||||
gthread-2.0 >= 2.13.0
|
||||
gio-2.0 >= 2.40.0
|
||||
gtk+-3.0 >= 3.19.3
|
||||
gtksourceview-3.0 >= 3.19.0
|
||||
libpeas-1.0 >= 1.12.0
|
||||
libpeas-gtk-1.0 >= 1.12.0
|
||||
xapp
|
||||
])
|
||||
|
||||
PKG_CHECK_MODULES(X11, [x11])
|
||||
|
||||
XED_CFLAGS="$XED_CFLAGS $X11_CFLAGS"
|
||||
XED_LIBS="$XED_LIBS $X11_LIBS"
|
||||
|
||||
AC_SUBST(XED_CFLAGS)
|
||||
AC_SUBST(XED_LIBS)
|
||||
|
||||
# Introspection
|
||||
GOBJECT_INTROSPECTION_CHECK([0.9.3])
|
||||
|
||||
if test "$found_introspection" = "yes"; then
|
||||
enable_introspection=yes
|
||||
AC_DEFINE([ENABLE_INTROSPECTION], [1], [Define to enable GObject Introspection])
|
||||
else
|
||||
enable_introspection=no
|
||||
fi
|
||||
|
||||
AM_PATH_PYTHON([3.4])
|
||||
|
||||
dnl ================================================================
|
||||
dnl GSettings related settings
|
||||
dnl ================================================================
|
||||
|
||||
GLIB_GSETTINGS
|
||||
|
||||
dnl ================================================================
|
||||
dnl Misc
|
||||
dnl ================================================================
|
||||
AC_PATH_PROG(GLIB_COMPILE_RESOURCES, glib-compile-resources)
|
||||
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
|
||||
AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
|
||||
|
||||
GNOME_COMPILE_WARNINGS(yes)
|
||||
|
||||
AC_ARG_ENABLE(deprecations,
|
||||
[AS_HELP_STRING([--enable-deprecations],
|
||||
[warn about deprecated usages [default=no]])],,
|
||||
[enable_deprecations=no])
|
||||
|
||||
if test "x$enable_deprecations" = "xyes"; then
|
||||
DISABLE_DEPRECATED_CFLAGS="\
|
||||
-DG_DISABLE_DEPRECATED \
|
||||
-DGDK_DISABLE_DEPRECATED \
|
||||
-DGTK_DISABLE_DEPRECATED \
|
||||
-DGDK_PIXBUF_DISABLE_DEPRECATED \
|
||||
-DGNOME_DISABLE_DEPRECATED"
|
||||
AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
|
||||
fi
|
||||
|
||||
PLUGIN_LIBTOOL_FLAGS="-module -avoid-version"
|
||||
|
||||
AC_SUBST(PLUGIN_LIBTOOL_FLAGS)
|
||||
|
||||
XED_PLUGINS_DATA_DIR="$datadir/xed/plugins"
|
||||
AC_SUBST(XED_PLUGINS_DATA_DIR)
|
||||
|
||||
XED_PLUGINS_LIBS_DIR="$libdir/xed/plugins"
|
||||
AC_SUBST(XED_PLUGINS_LIBS_DIR)
|
||||
|
||||
YELP_HELP_INIT
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
data/xed.desktop.in
|
||||
data/xed-bugreport.sh
|
||||
data/xed.pc
|
||||
data/org.x.editor.gschema.xml
|
||||
data/Makefile
|
||||
docs/Makefile
|
||||
docs/reference/Makefile
|
||||
xed/Makefile
|
||||
help/Makefile
|
||||
pixmaps/Makefile
|
||||
plugins/Makefile
|
||||
plugins/docinfo/Makefile
|
||||
plugins/filebrowser/Makefile
|
||||
plugins/filebrowser/org.x.editor.plugins.filebrowser.gschema.xml
|
||||
plugins/modelines/Makefile
|
||||
plugins/sort/Makefile
|
||||
plugins/spell/Makefile
|
||||
plugins/spell/org.x.editor.plugins.spell.gschema.xml
|
||||
plugins/taglist/Makefile
|
||||
plugins/textsize/Makefile
|
||||
plugins/textsize/textsize/Makefile
|
||||
plugins/time/Makefile
|
||||
plugins/time/org.x.editor.plugins.time.gschema.xml
|
||||
plugins/trailsave/Makefile
|
||||
plugins/wordcompletion/Makefile
|
||||
plugins/wordcompletion/org.x.editor.plugins.wordcompletion.gschema.xml
|
||||
po/Makefile.in
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
echo "
|
||||
|
||||
Configuration:
|
||||
|
||||
Source code location: ${srcdir}
|
||||
Compiler: ${CC}
|
||||
Spell Plugin enabled: $enable_spell
|
||||
Gvfs metadata enabled: $enable_gvfs_metadata
|
||||
GObject Introspection: ${enable_introspection}
|
||||
"
|
|
@ -1,49 +0,0 @@
|
|||
desktopdir = $(datadir)/applications
|
||||
desktop_in_files = xed.desktop.in
|
||||
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
|
||||
@INTLTOOL_DESKTOP_RULE@
|
||||
|
||||
@INTLTOOL_XML_RULE@
|
||||
|
||||
appdatadir = $(datadir)/appdata
|
||||
appdata_in_files = xed.appdata.xml.in
|
||||
appdata_DATA = $(appdata_in_files:.xml.in=.xml)
|
||||
|
||||
gsettings_SCHEMAS = org.x.editor.gschema.xml
|
||||
|
||||
@GSETTINGS_RULES@
|
||||
|
||||
servicedir = $(datadir)/dbus-1/services
|
||||
service_in_files = org.x.editor.service.in
|
||||
service_DATA = $(service_in_files:.service.in=.service)
|
||||
|
||||
$(service_DATA): $(service_in_files) Makefile
|
||||
@sed -e "s|\@bindir\@|$(bindir)|" $<> $@
|
||||
|
||||
man_MANS = xed.1
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = xed.pc
|
||||
|
||||
bugreportdir = $(libexecdir)/xed
|
||||
bugreport_SCRIPTS = xed-bugreport.sh
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(appdata_in_files) \
|
||||
$(desktop_in_files) \
|
||||
$(service_in_files) \
|
||||
$(man_MANS) \
|
||||
xed.pc.in \
|
||||
xed-bugreport.sh.in
|
||||
|
||||
CLEANFILES = \
|
||||
$(desktop_DATA) \
|
||||
$(service_DATA) \
|
||||
$(gsettings_SCHEMAS) \
|
||||
$(pkgconfig_DATA) \
|
||||
$(appdata_DATA)
|
||||
|
||||
|
||||
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
|
@ -0,0 +1,42 @@
|
|||
desktop = custom_target(
|
||||
'desktop',
|
||||
input: 'xed.desktop.in.in',
|
||||
output: 'xed.desktop',
|
||||
command: [intltool_merge, '-d', '-u', po_dir, '@INPUT@', '@OUTPUT@'],
|
||||
install: true,
|
||||
install_dir: desktopdir,
|
||||
)
|
||||
|
||||
appdata = custom_target(
|
||||
'appdata',
|
||||
input: 'xed.appdata.xml.in',
|
||||
output: 'xed.appdata.xml',
|
||||
command: [intltool_merge, '-x', '-u', po_dir, '@INPUT@', '@OUTPUT@'],
|
||||
install: true,
|
||||
install_dir: join_paths(datadir, 'metainfo'),
|
||||
)
|
||||
|
||||
schema_conf = configuration_data()
|
||||
schema_conf.set('GETTEXT_PACKAGE', 'xed')
|
||||
|
||||
schema_file = configure_file(
|
||||
input: 'org.x.editor.gschema.xml.in',
|
||||
output: 'org.x.editor.gschema.xml',
|
||||
configuration: schema_conf,
|
||||
install_dir: join_paths(datadir, 'glib-2.0', 'schemas')
|
||||
)
|
||||
|
||||
service_conf = configuration_data()
|
||||
service_conf.set('bindir', join_paths(prefix, bindir))
|
||||
|
||||
configure_file(
|
||||
input: 'org.x.editor.service.in',
|
||||
output: 'org.x.editor.service',
|
||||
configuration: service_conf,
|
||||
install_dir: join_paths(datadir, 'dbus-1', 'services')
|
||||
)
|
||||
|
||||
install_data(
|
||||
'xed.1',
|
||||
install_dir : join_paths(get_option('prefix'), get_option('mandir'), 'man1')
|
||||
)
|
|
@ -1,51 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
PKG_CONFIG_MODULES="glib-2.0 gtk+-3.0 gtksourceview-3.0 enchant iso-codes"
|
||||
|
||||
echo_padded ()
|
||||
{
|
||||
echo -n " - $1 "
|
||||
N=$(echo -n $1 | wc -m)
|
||||
while test $N -le 20
|
||||
do
|
||||
echo -n " "
|
||||
N=`expr $N + 1`
|
||||
done
|
||||
}
|
||||
|
||||
if (which gsettings >/dev/null)
|
||||
then
|
||||
echo "GSettings configuration dump:"
|
||||
gsettings list-recursively org.x.editor
|
||||
echo
|
||||
fi
|
||||
|
||||
echo "Active plugins:"
|
||||
gsettings get org.x.editor active-plugins \
|
||||
| sed -r -e 's/^\[(.*)\]$/\1/' -e 's/, /\n/g' \
|
||||
| sed -e 's/^.*$/ - \0/'
|
||||
echo
|
||||
|
||||
# Manually installed plugins (in $HOME)
|
||||
if [ -d $HOME/.config/xed/plugins ]
|
||||
then
|
||||
echo "Plugins in \$HOME:"
|
||||
ls $HOME/.config/xed/plugins/*.xed-plugin \
|
||||
| sed -r -e 's#.*/([^/]*)\.xed-plugin$# - \1#'
|
||||
else
|
||||
echo "No plugin installed in \$HOME."
|
||||
fi
|
||||
echo
|
||||
|
||||
echo "Module versions:"
|
||||
if (which pkg-config > /dev/null)
|
||||
then
|
||||
for i in $PKG_CONFIG_MODULES
|
||||
do
|
||||
echo_padded "`echo -n $i | sed -r -e 's/^(.*)-[0-9]\.[0-9]$/\1/'`"
|
||||
pkg-config --modversion $i 2>/dev/null || echo
|
||||
done
|
||||
else
|
||||
echo " pkg-config unavailable"
|
||||
fi
|
||||
echo
|
|
@ -1,6 +1,6 @@
|
|||
[Desktop Entry]
|
||||
_Name=Text Editor
|
||||
_Comment=Edit text files
|
||||
Name=Text Editor
|
||||
Comment=Edit text files
|
||||
Exec=xed %U
|
||||
Terminal=false
|
||||
Type=Application
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
pluginsdir=@libdir@/xed/plugins
|
||||
|
||||
Name: xed
|
||||
Description: xed
|
||||
Requires: gtksourceview-3.0 libpeas-1.0 libpeas-gtk-1.0
|
||||
Version: @VERSION@
|
||||
Cflags: -I${includedir}/xed
|
||||
Libs: -L${libdir}
|
|
@ -0,0 +1 @@
|
|||
debian/build/
|
|
@ -2,8 +2,7 @@ Source: xed
|
|||
Section: x11
|
||||
Priority: optional
|
||||
Maintainer: Linux Mint <root@linuxmint.com>
|
||||
Build-Depends: autotools-dev,
|
||||
debhelper (>= 9),
|
||||
Build-Depends: debhelper (>= 9),
|
||||
gobject-introspection,
|
||||
gtk-doc-tools,
|
||||
intltool,
|
||||
|
@ -21,6 +20,7 @@ Build-Depends: autotools-dev,
|
|||
python3,
|
||||
python3-gi,
|
||||
yelp-tools,
|
||||
meson
|
||||
Standards-Version: 3.9.6
|
||||
|
||||
Package: xed
|
||||
|
|
|
@ -5,27 +5,28 @@ DHFLAGS=--parallel
|
|||
%:
|
||||
dh $@ $(DHFLAGS) --with gir
|
||||
|
||||
override_dh_install:
|
||||
rm -rfv debian/tmp/usr/lib/*/xed/plugins/*.la
|
||||
rm -rfv debian/tmp/usr/lib/*/xed/*.la
|
||||
dh_install --fail-missing
|
||||
|
||||
override_dh_auto_configure:
|
||||
# upstream tarball is without configure. autogen.sh will create it
|
||||
NOCONFIGURE=1 ./autogen.sh
|
||||
dh_auto_configure $(DHFLAGS) -- \
|
||||
--enable-silent-rules \
|
||||
--libexecdir=/usr/lib/ \
|
||||
--enable-gtk-doc
|
||||
meson debian/build \
|
||||
--prefix=/usr \
|
||||
--buildtype=plain \
|
||||
-D docs=true \
|
||||
-D deprecated_warnings=false
|
||||
|
||||
override_dh_installchangelogs:
|
||||
dh_installchangelogs NEWS
|
||||
|
||||
override_dh_auto_test:
|
||||
DEB_BUILD_OPTIONS=nocheck dh_auto_test
|
||||
ninja -C debian/build test
|
||||
|
||||
override_dh_strip:
|
||||
dh_strip --dbg-package=xed-dbg
|
||||
|
||||
get-orig-source:
|
||||
uscan --noconf --force-download --rename --download-current-version --destdir=..
|
||||
|
||||
override_dh_auto_install:
|
||||
DESTDIR=${CURDIR}/debian/tmp \
|
||||
ninja -C debian/build install
|
||||
|
||||
override_dh_auto_build:
|
||||
ninja -C debian/build
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
usr/share/appdata
|
||||
usr/share/metainfo
|
||||
usr/share/xed/plugins
|
||||
usr/share/glib-2.0
|
||||
usr/share/help
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
usr/bin/xed
|
||||
usr/lib/*/xed/girepository-1.0/
|
||||
usr/lib/xed/xed-bugreport.sh
|
||||
usr/lib/*/xed/plugins/
|
||||
usr/lib/*/xed/*.so
|
||||
usr/share/applications/xed.desktop
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
SUBDIRS = reference
|
||||
|
||||
EXTRA_DIST = class-diagram.dia
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
|
@ -1,74 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
# see /gtk-doc/examples/Makefile.am
|
||||
|
||||
# We require automake 1.6 at least.
|
||||
AUTOMAKE_OPTIONS = 1.6
|
||||
|
||||
# The name of the module, e.g. 'glib'.
|
||||
DOC_MODULE = xed
|
||||
|
||||
# The top-level XML file (SGML in the past).
|
||||
DOC_MAIN_SGML_FILE = xed-docs.xml
|
||||
|
||||
# The directory containing the source code. Relative to $(srcdir).
|
||||
DOC_SOURCE_DIR = ../../xed
|
||||
|
||||
# Extra options to supply to gtkdoc-scan.
|
||||
# e.g. SCAN_OPTIONS = --deprecated-guards="GTK_DISABLE_DEPRECATED"
|
||||
SCAN_OPTIONS = --rebuild-types
|
||||
|
||||
# Extra options to supply to gtkdoc-mkdb.
|
||||
MKDB_OPTIONS = --xml-mode --output-format=xml
|
||||
|
||||
# Used for dependencies. The docs will be rebuilt if any of these change.
|
||||
HFILE_GLOB = $(top_srcdir)/xed/*.h
|
||||
CFILE_GLOB = $(top_srcdir)/xed/*.c
|
||||
|
||||
# Header files to ignore when scanning (These are internal to xed).
|
||||
IGNORE_HFILES= \
|
||||
xed-close-confirmation-dialog.h \
|
||||
xed-dirs.h \
|
||||
xed-commands.h \
|
||||
xed-documents-panel.h \
|
||||
xed-io-error-info-bar.h \
|
||||
xed-languages-manager.h \
|
||||
xed-plugins-engine.h \
|
||||
xed-session.h \
|
||||
xed-ui.h \
|
||||
xed-window-private.h \
|
||||
xed-output-window.h \
|
||||
xed-encodings-dialog.h \
|
||||
xed-open-location-dialog.h \
|
||||
xed-page-setup-dialog.h \
|
||||
xed-preferences-dialog.h \
|
||||
xed-search-dialog.h \
|
||||
xed-marshal.h \
|
||||
xed-enum-types.h
|
||||
|
||||
# Images to copy into HTML directory.
|
||||
HTML_IMAGES =
|
||||
|
||||
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
|
||||
content_files =
|
||||
|
||||
# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
|
||||
# Only needed if you are using gtkdoc-scangobj to dynamically query widget
|
||||
# signals and properties.
|
||||
GTKDOC_CFLAGS = \
|
||||
-I$(top_srcdir)/xed \
|
||||
-I$(top_builddir)/xed \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir) \
|
||||
$(XED_CFLAGS)
|
||||
|
||||
GTKDOC_LIBS = \
|
||||
$(top_builddir)/xed/libxed.la \
|
||||
$(XED_LIBS)
|
||||
|
||||
MAINTAINERCLEANFILES = xed.types
|
||||
|
||||
# This includes the standard gtk-doc make rules, copied by gtkdocize.
|
||||
include $(top_srcdir)/gtk-doc.make
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
|
@ -0,0 +1,36 @@
|
|||
docs_ignore_h = [
|
||||
'xed-close-confirmation-dialog.h',
|
||||
'xed-dirs.h',
|
||||
'xed-commands.h',
|
||||
'xed-documents-panel.h',
|
||||
'xed-io-error-info-bar.h',
|
||||
'xed-languages-manager.h',
|
||||
'xed-plugins-engine.h',
|
||||
'xed-session.h',
|
||||
'xed-ui.h',
|
||||
'xed-window-private.h',
|
||||
'xed-output-window.h',
|
||||
'xed-encodings-dialog.h',
|
||||
'xed-open-location-dialog.h',
|
||||
'xed-page-setup-dialog.h',
|
||||
'xed-preferences-dialog.h',
|
||||
'xed-search-dialog.h',
|
||||
'xed-marshal.h',
|
||||
'xed-enum-types.h'
|
||||
]
|
||||
|
||||
gnome.gtkdoc(
|
||||
'xed',
|
||||
mode: 'xml',
|
||||
install: true,
|
||||
main_xml: 'xed-docs.xml',
|
||||
gobject_typesfile: 'xed.types',
|
||||
src_dir: [
|
||||
join_paths(meson.source_root(), 'xed'),
|
||||
join_paths(meson.build_root(), 'xed'),
|
||||
],
|
||||
ignore_headers: docs_ignore_h,
|
||||
dependencies: libxed_dep,
|
||||
scan_args: ['--rebuild-types'],
|
||||
mkdb_args: ['--xml-mode', '--output-format=xml'],
|
||||
)
|
|
@ -0,0 +1,23 @@
|
|||
ar
|
||||
bg
|
||||
ca
|
||||
cs
|
||||
da
|
||||
de
|
||||
el
|
||||
es
|
||||
fi
|
||||
fr
|
||||
hu
|
||||
it
|
||||
ja
|
||||
ko
|
||||
oc
|
||||
pt_BR
|
||||
ru
|
||||
sv
|
||||
th
|
||||
uk
|
||||
zh_CN
|
||||
zh_HK
|
||||
zh_TW
|
|
@ -1,16 +0,0 @@
|
|||
@YELP_HELP_RULES@
|
||||
|
||||
HELP_ID = xed
|
||||
HELP_FILES = index.docbook legal.xml
|
||||
HELP_MEDIA = \
|
||||
figures/xed_format_bold.png \
|
||||
figures/xed_format_italic.png \
|
||||
figures/xed_format_strikethrough.png \
|
||||
figures/xed_format_underline.png \
|
||||
figures/xed_recent_files_menu_icon.png \
|
||||
figures/xed_window.png
|
||||
|
||||
HELP_LINGUAS = ar bg ca cs da de el es fi fr hu it ja ko oc pt_BR ru sv th uk zh_CN zh_HK zh_TW
|
||||
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
|
@ -0,0 +1,20 @@
|
|||
help_sources = [
|
||||
'index.docbook',
|
||||
'legal.xml'
|
||||
]
|
||||
|
||||
help_media = [
|
||||
'figures/xed_format_bold.png',
|
||||
'figures/xed_format_italic.png',
|
||||
'figures/xed_format_strikethrough.png',
|
||||
'figures/xed_format_underline.png',
|
||||
'figures/xed_recent_files_menu_icon.png',
|
||||
'figures/xed_window.png'
|
||||
]
|
||||
|
||||
gnome.yelp(
|
||||
meson.project_name(),
|
||||
sources: help_sources,
|
||||
media: help_media,
|
||||
symlink_media: false
|
||||
)
|
|
@ -0,0 +1,103 @@
|
|||
project('xed', 'c', version : '1.8.3')
|
||||
|
||||
gnome = import('gnome')
|
||||
i18n = import('i18n')
|
||||
pkgconfig = import('pkgconfig')
|
||||
|
||||
version = meson.project_version()
|
||||
|
||||
xed_conf = configuration_data()
|
||||
xed_conf.set_quoted('VERSION', version)
|
||||
xed_conf.set_quoted('GETTEXT_PACKAGE', 'xed')
|
||||
|
||||
# directories
|
||||
prefix = get_option('prefix')
|
||||
bindir = get_option('bindir')
|
||||
datadir = get_option('datadir')
|
||||
libdir = get_option('libdir')
|
||||
includedir = get_option('includedir')
|
||||
libexecdir = get_option('libexecdir')
|
||||
desktopdir = join_paths(datadir, 'applications')
|
||||
schema_dir = join_paths(datadir, 'glib-2.0', 'schemas')
|
||||
|
||||
po_dir = join_paths(meson.source_root(), 'po')
|
||||
|
||||
# dependencies
|
||||
libxml = dependency('libxml-2.0', version: '>= 2.5.0')
|
||||
glib = dependency('glib-2.0', version: '>= 2.40.0')
|
||||
gthread = dependency('gthread-2.0', version: '>= 2.13.0')
|
||||
gio = dependency('gio-2.0', version: '>= 2.40.0')
|
||||
gtk = dependency('gtk+-3.0', version: '>= 3.19.3')
|
||||
gtksourceview = dependency('gtksourceview-3.0', version: '>= 3.19.0')
|
||||
libpeas = dependency('libpeas-1.0', version: '>= 1.12.0')
|
||||
libpeas_gtk = dependency('libpeas-gtk-1.0', version: '>= 1.12.0')
|
||||
gir_dep = dependency('gobject-introspection-1.0', version: '>= 0.6.7', required: false)
|
||||
gmodule = dependency('gmodule-2.0')
|
||||
xapp = dependency('xapp')
|
||||
X11 = dependency('x11')
|
||||
pango = dependency('pango')
|
||||
|
||||
if gir_dep.found()
|
||||
xed_conf.set('ENABLE_INTROSPECTION', 1)
|
||||
endif
|
||||
|
||||
enable_spell = get_option('enable_spell')
|
||||
if enable_spell
|
||||
gspell = dependency('gspell-1', version: '>= 0.2.5')
|
||||
endif
|
||||
|
||||
if get_option('enable_gvfs_metadata')
|
||||
xed_conf.set('ENABLE_GVFS_METADATA', true)
|
||||
endif
|
||||
|
||||
# on some systems we need to find the math lib to make sure it builds
|
||||
cc = meson.get_compiler('c')
|
||||
math = cc.find_library('m', required: false)
|
||||
|
||||
intltool_merge = find_program('intltool-merge')
|
||||
|
||||
# generate config.h
|
||||
config_h_file = configure_file(
|
||||
output : 'config.h',
|
||||
configuration : xed_conf
|
||||
)
|
||||
|
||||
config_h = declare_dependency(
|
||||
sources: config_h_file
|
||||
)
|
||||
|
||||
include_dirs = include_directories('.', 'xed')
|
||||
|
||||
# compiler flags
|
||||
add_global_arguments('-DDATADIR="@0@"'.format(join_paths(prefix, datadir)), language: 'c')
|
||||
add_global_arguments('-DLIBDIR="@0@"'.format(join_paths(prefix, libdir)), language: 'c')
|
||||
|
||||
# remove this later or add as build option
|
||||
if not get_option('deprecated_warnings')
|
||||
add_global_arguments([
|
||||
'-Wno-deprecated-declarations',
|
||||
'-Wno-deprecated',
|
||||
'-Wno-declaration-after-statement',
|
||||
],
|
||||
language: 'c',
|
||||
)
|
||||
endif
|
||||
|
||||
subdir('xed')
|
||||
subdir('pixmaps')
|
||||
subdir('po')
|
||||
subdir('data')
|
||||
subdir('plugins')
|
||||
subdir('help')
|
||||
if get_option('docs')
|
||||
subdir('docs/reference')
|
||||
endif
|
||||
|
||||
message('prefix = @0@'.format(prefix))
|
||||
message('bindir = @0@'.format(bindir))
|
||||
message('datadir = @0@'.format(datadir))
|
||||
message('libdir = @0@'.format(libdir))
|
||||
message('includedir = @0@'.format(includedir))
|
||||
message('libexecdir = @0@'.format(libexecdir))
|
||||
message('desktopdir = @0@'.format(desktopdir))
|
||||
message('schema_dir = @0@'.format(schema_dir))
|
|
@ -0,0 +1,23 @@
|
|||
option(
|
||||
'enable_spell',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'enable gspell'
|
||||
)
|
||||
option(
|
||||
'enable_gvfs_metadata',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'enable gvfs metadata'
|
||||
)
|
||||
option('docs',
|
||||
type: 'boolean',
|
||||
value: false,
|
||||
description: 'Build the API references (requires gtk-doc)'
|
||||
)
|
||||
option(
|
||||
'deprecated_warnings',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description: 'Show build warnings for deprecations'
|
||||
)
|
|
@ -1,8 +0,0 @@
|
|||
icondir = $(datadir)/xed/icons
|
||||
icon_DATA = xed-plugin.png
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(icon_DATA) \
|
||||
xed.ico
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
|
@ -0,0 +1,4 @@
|
|||
install_data(
|
||||
'xed-plugin.png',
|
||||
install_dir: join_paths(datadir, 'xed', 'icons')
|
||||
)
|
|
@ -1,28 +0,0 @@
|
|||
DIST_SUBDIRS = \
|
||||
docinfo \
|
||||
filebrowser \
|
||||
modelines \
|
||||
sort \
|
||||
spell \
|
||||
taglist \
|
||||
textsize \
|
||||
time \
|
||||
trailsave \
|
||||
wordcompletion
|
||||
|
||||
SUBDIRS = \
|
||||
docinfo \
|
||||
filebrowser \
|
||||
modelines \
|
||||
sort \
|
||||
taglist \
|
||||
textsize \
|
||||
time \
|
||||
trailsave \
|
||||
wordcompletion
|
||||
|
||||
if ENABLE_SPELL
|
||||
SUBDIRS += spell
|
||||
endif
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
|
@ -1,34 +0,0 @@
|
|||
# docinfo plugin
|
||||
plugindir = $(XED_PLUGINS_LIBS_DIR)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(XED_CFLAGS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(DISABLE_DEPRECATED_CFLAGS)
|
||||
|
||||
plugin_LTLIBRARIES = libdocinfo.la
|
||||
|
||||
libdocinfo_la_SOURCES = \
|
||||
xed-docinfo-plugin.h \
|
||||
xed-docinfo-plugin.c
|
||||
|
||||
libdocinfo_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
|
||||
libdocinfo_la_LIBADD = $(XED_LIBS)
|
||||
|
||||
uidir = $(XED_PLUGINS_DATA_DIR)/docinfo
|
||||
ui_DATA = docinfo.ui
|
||||
|
||||
plugin_in_files = docinfo.plugin.desktop.in
|
||||
|
||||
%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
|
||||
|
||||
plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
|
||||
|
||||
EXTRA_DIST = $(ui_DATA) $(plugin_in_files)
|
||||
|
||||
CLEANFILES = $(plugin_DATA)
|
||||
DISTCLEANFILES = $(plugin_DATA)
|
||||
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
|
@ -0,0 +1,37 @@
|
|||
docinfo_sources = [
|
||||
'xed-docinfo-plugin.h',
|
||||
'xed-docinfo-plugin.c'
|
||||
]
|
||||
|
||||
docinfo_deps = [
|
||||
config_h,
|
||||
glib,
|
||||
gmodule,
|
||||
gtksourceview,
|
||||
libpeas,
|
||||
pango
|
||||
]
|
||||
|
||||
library('docinfo',
|
||||
docinfo_sources,
|
||||
dependencies: docinfo_deps,
|
||||
include_directories: include_dirs,
|
||||
link_with: libxed,
|
||||
install_rpath: join_paths(prefix, libdir, 'xed'),
|
||||
install: true,
|
||||
install_dir: join_paths(libdir, 'xed', 'plugins')
|
||||
)
|
||||
|
||||
install_data(
|
||||
'docinfo.ui',
|
||||
install_dir: join_paths(pluginsdatadir, 'docinfo')
|
||||
)
|
||||
|
||||
docinfo_desktop = custom_target(
|
||||
'docinfo_desktop',
|
||||
input: 'docinfo.plugin.desktop.in',
|
||||
output: 'docinfo.plugin',
|
||||
command: [intltool_merge, '-d', '-u', po_dir, '@INPUT@', '@OUTPUT@'],
|
||||
install: true,
|
||||
install_dir: pluginslibdir,
|
||||
)
|
|
@ -19,14 +19,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "xed-docinfo-plugin.h"
|
||||
|
||||
#include <string.h> /* For strlen (...) */
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <pango/pango-break.h>
|
||||
#include <gmodule.h>
|
||||
|
@ -36,6 +30,8 @@
|
|||
#include <xed/xed-debug.h>
|
||||
#include <xed/xed-utils.h>
|
||||
|
||||
#include "xed-docinfo-plugin.h"
|
||||
|
||||
#define MENU_PATH "/MenuBar/ToolsMenu/ToolsOps_2"
|
||||
|
||||
struct _XedDocInfoPluginPrivate
|
||||
|
|
|
@ -1,94 +0,0 @@
|
|||
# filebrowser
|
||||
|
||||
plugindir = $(XED_PLUGINS_LIBS_DIR)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(XED_CFLAGS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(DISABLE_DEPRECATED_CFLAGS)
|
||||
|
||||
BUILT_SOURCES = \
|
||||
xed-file-browser-enum-types.h \
|
||||
xed-file-browser-enum-types.c \
|
||||
xed-file-browser-marshal.h \
|
||||
xed-file-browser-marshal.c
|
||||
|
||||
plugin_LTLIBRARIES = libfilebrowser.la
|
||||
|
||||
NOINST_H_FILES = \
|
||||
xed-file-bookmarks-store.h \
|
||||
xed-file-browser-store.h \
|
||||
xed-file-browser-view.h \
|
||||
xed-file-browser-widget.h \
|
||||
xed-file-browser-error.h \
|
||||
xed-file-browser-utils.h \
|
||||
xed-file-browser-plugin.h \
|
||||
xed-file-browser-messages.h
|
||||
|
||||
libfilebrowser_la_SOURCES = \
|
||||
$(BUILT_SOURCES) \
|
||||
xed-file-bookmarks-store.c \
|
||||
xed-file-browser-store.c \
|
||||
xed-file-browser-view.c \
|
||||
xed-file-browser-widget.c \
|
||||
xed-file-browser-utils.c \
|
||||
xed-file-browser-plugin.c \
|
||||
xed-file-browser-messages.c \
|
||||
$(NOINST_H_FILES)
|
||||
|
||||
libfilebrowser_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
|
||||
libfilebrowser_la_LIBADD = $(XED_LIBS)
|
||||
|
||||
# UI files (if you use ui for your plugin, list those files here)
|
||||
uidir = $(XED_PLUGINS_DATA_DIR)/filebrowser
|
||||
ui_DATA = xed-file-browser-widget-ui.xml
|
||||
|
||||
plugin_in_files = filebrowser.plugin.desktop.in
|
||||
|
||||
%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
|
||||
|
||||
xed-file-browser-enum-types.h: xed-file-browser-enum-types.h.template $(NOINST_H_FILES) $(GLIB_MKENUMS)
|
||||
(cd $(srcdir) && $(GLIB_MKENUMS) --template xed-file-browser-enum-types.h.template $(NOINST_H_FILES)) > $@
|
||||
|
||||
xed-file-browser-enum-types.c: xed-file-browser-enum-types.c.template xed-file-browser-enum-register.c.template $(NOINST_H_FILES) $(GLIB_MKENUMS)
|
||||
$(AM_V_GEN) (cd $(srcdir) && \
|
||||
$(GLIB_MKENUMS) --template xed-file-browser-enum-types.c.template $(NOINST_H_FILES) && \
|
||||
$(GLIB_MKENUMS) --template xed-file-browser-enum-register.c.template $(NOINST_H_FILES)) > $@
|
||||
|
||||
xed-file-browser-marshal.h: xed-file-browser-marshal.list $(GLIB_GENMARSHAL)
|
||||
$(AM_V_GEN) $(GLIB_GENMARSHAL) $< --header --prefix=xed_file_browser_marshal > $@
|
||||
|
||||
xed-file-browser-marshal.c: xed-file-browser-marshal.list $(GLIB_GENMARSHAL)
|
||||
$(AM_V_GEN) echo "#include \"xed-file-browser-marshal.h\"" > $@ && \
|
||||
$(GLIB_GENMARSHAL) $< --body --prefix=xed_file_browser_marshal >> $@
|
||||
|
||||
plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
|
||||
|
||||
@INTLTOOL_XML_NOMERGE_RULE@
|
||||
filebrowser_gschema_in = org.x.editor.plugins.filebrowser.gschema.xml.in
|
||||
gsettings_SCHEMAS = $(filebrowser_gschema_in:.xml.in=.xml)
|
||||
@GSETTINGS_RULES@
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(ui_DATA) \
|
||||
$(plugin_in_files) \
|
||||
$(filebrowser_gschema_in) \
|
||||
xed-file-browser-enum-types.h.template \
|
||||
xed-file-browser-enum-types.c.template \
|
||||
xed-file-browser-enum-register.c.template \
|
||||
xed-file-browser-marshal.list
|
||||
|
||||
CLEANFILES = \
|
||||
$(plugin_DATA) \
|
||||
$(gsettings_SCHEMAS_in) \
|
||||
$(gsettings_SCHEMAS) \
|
||||
$(BUILT_SOURCES)
|
||||
|
||||
DISTCLEANFILES = \
|
||||
$(plugin_DATA) \
|
||||
$(gsettings_SCHEMAS_in) \
|
||||
$(gsettings_SCHEMAS) \
|
||||
$(BUILT_SOURCES)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
|
@ -0,0 +1,73 @@
|
|||
filebrowser_headers = [
|
||||
'xed-file-bookmarks-store.h',
|
||||
'xed-file-browser-store.h',
|
||||
'xed-file-browser-view.h',
|
||||
'xed-file-browser-widget.h',
|
||||
'xed-file-browser-error.h',
|
||||
'xed-file-browser-utils.h',
|
||||
'xed-file-browser-plugin.h',
|
||||
'xed-file-browser-messages.h'
|
||||
]
|
||||
|
||||
filebrowser_lib_sources = [
|
||||
'xed-file-bookmarks-store.c',
|
||||
'xed-file-browser-store.c',
|
||||
'xed-file-browser-view.c',
|
||||
'xed-file-browser-widget.c',
|
||||
'xed-file-browser-utils.c',
|
||||
'xed-file-browser-plugin.c',
|
||||
'xed-file-browser-messages.c'
|
||||
]
|
||||
|
||||
filebrowser_enums = gnome.mkenums_simple(
|
||||
'xed-file-browser-enum-types',
|
||||
sources : filebrowser_headers,
|
||||
identifier_prefix : 'XedFileBrowser',
|
||||
symbol_prefix : 'xed_file_browser'
|
||||
)
|
||||
|
||||
filebrowser_marshal = gnome.genmarshal(
|
||||
'xed-file-browser-marshal',
|
||||
sources: 'xed-file-browser-marshal.list',
|
||||
prefix: 'xed_file_browser_marshal'
|
||||
)
|
||||
|
||||
filebrowser_deps = [
|
||||
config_h,
|
||||
gio,
|
||||
glib,
|
||||
gmodule,
|
||||
gtk,
|
||||
gtksourceview,
|
||||
libpeas
|
||||
]
|
||||
|
||||
library(
|
||||
'filebrowser',
|
||||
filebrowser_headers + filebrowser_lib_sources + filebrowser_enums + filebrowser_marshal,
|
||||
link_with: libxed,
|
||||
dependencies: filebrowser_deps,
|
||||
include_directories: include_dirs,
|
||||
install_rpath: join_paths(prefix, libdir, 'xed'),
|
||||
install: true,
|
||||
install_dir: join_paths(libdir, 'xed', 'plugins')
|
||||
)
|
||||
|
||||
install_data(
|
||||
'xed-file-browser-widget-ui.xml',
|
||||
install_dir: join_paths(pluginsdatadir, 'filebrowser')
|
||||
)
|
||||
|
||||
filebrowser_desktop = custom_target(
|
||||
'filebrowser_desktop',
|
||||
input: 'filebrowser.plugin.desktop.in',
|
||||
output: 'filebrowser.plugin',
|
||||
command: [intltool_merge, '-d', '-u', po_dir, '@INPUT@', '@OUTPUT@'],
|
||||
install: true,
|
||||
install_dir: pluginslibdir,
|
||||
)
|
||||
|
||||
install_data(
|
||||
'org.x.editor.plugins.filebrowser.gschema.xml',
|
||||
install_dir: schema_dir
|
||||
)
|
|
@ -911,7 +911,7 @@ xed_file_bookmarks_store_get_location (XedFileBookmarksStore *model,
|
|||
}
|
||||
else if (!isfs)
|
||||
{
|
||||
file = g_object_ref (obj);
|
||||
file = G_FILE (g_object_ref (obj));
|
||||
}
|
||||
|
||||
g_object_unref (obj);
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
/*** BEGIN file-header ***/
|
||||
void
|
||||
xed_file_browser_enum_and_flag_register_type (GTypeModule * module)
|
||||
{
|
||||
/*** END file-header ***/
|
||||
|
||||
/*** BEGIN file-production ***/
|
||||
/* Enumerations from "@filename@" */
|
||||
|
||||
/*** END file-production ***/
|
||||
|
||||
/*** BEGIN enumeration-production ***/
|
||||
register_@enum_name@ (module);
|
||||
|
||||
/*** END enumeration-production ***/
|
||||
|
||||
/*** BEGIN file-tail ***/
|
||||
}
|
||||
|
||||
/*** END file-tail ***/
|
|
@ -1,45 +0,0 @@
|
|||
/*** BEGIN file-header ***/
|
||||
#include "xed-file-browser-enum-types.h"
|
||||
|
||||
/*** END file-header ***/
|
||||
|
||||
/*** BEGIN file-production ***/
|
||||
/* enumerations from "@filename@" */
|
||||
#include "@filename@"
|
||||
|
||||
/*** END file-production ***/
|
||||
|
||||
/*** BEGIN value-header ***/
|
||||
static GType @enum_name@_type = 0;
|
||||
|
||||
static GType
|
||||
register_@enum_name@ (GTypeModule *module)
|
||||
{
|
||||
static const G@Type@Value values[] = {
|
||||
/*** END value-header ***/
|
||||
|
||||
/*** BEGIN value-production ***/
|
||||
{ @VALUENAME@,
|
||||
"@VALUENAME@",
|
||||
"@valuenick@" },
|
||||
/*** END value-production ***/
|
||||
|
||||
/*** BEGIN value-tail ***/
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
@enum_name@_type =
|
||||
g_type_module_register_@type@ (module,
|
||||
"@EnumName@",
|
||||
values);
|
||||
|
||||
return @enum_name@_type;
|
||||
}
|
||||
|
||||
GType
|
||||
@enum_name@_get_type (void)
|
||||
{
|
||||
return @enum_name@_type;
|
||||
}
|
||||
|
||||
/*** END value-tail ***/
|
|
@ -1,29 +0,0 @@
|
|||
/*** BEGIN file-header ***/
|
||||
#ifndef __XED_FILE_BROWSER_ENUM_TYPES_H__
|
||||
#define __XED_FILE_BROWSER_ENUM_TYPES_H__
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/*** END file-header ***/
|
||||
|
||||
/*** BEGIN file-production ***/
|
||||
/* Enumerations from "@filename@" */
|
||||
|
||||
/*** END file-production ***/
|
||||
|
||||
/*** BEGIN enumeration-production ***/
|
||||
#define XED_TYPE_@ENUMSHORT@ (@enum_name@_get_type())
|
||||
GType @enum_name@_get_type (void) G_GNUC_CONST;
|
||||
|
||||
/*** END enumeration-production ***/
|
||||
|
||||
/*** BEGIN file-tail ***/
|
||||
void xed_file_browser_enum_and_flag_register_type (GTypeModule * module);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __XED_FILE_BROWSER_ENUM_TYPES_H__ */
|
||||
/*** END file-tail ***/
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
VOID:UINT,STRING
|
||||
VOID:OBJECT,OBJECT
|
||||
BOOL:OBJECT,POINTER
|
||||
BOOL:POINTER
|
||||
BOOL:VOID
|
||||
BOOLEAN:OBJECT,POINTER
|
||||
BOOLEAN:POINTER
|
||||
BOOLEAN:VOID
|
||||
|
|
|
@ -20,10 +20,7 @@
|
|||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <gmodule.h>
|
||||
|
@ -111,7 +108,6 @@ G_DEFINE_DYNAMIC_TYPE_EXTENDED (XedFileBrowserPlugin,
|
|||
G_IMPLEMENT_INTERFACE_DYNAMIC (XED_TYPE_WINDOW_ACTIVATABLE,
|
||||
xed_window_activatable_iface_init) \
|
||||
\
|
||||
xed_file_browser_enum_and_flag_register_type (type_module); \
|
||||
_xed_file_browser_store_register_type (type_module); \
|
||||
_xed_file_bookmarks_store_register_type (type_module); \
|
||||
_xed_file_browser_view_register_type (type_module); \
|
||||
|
|
|
@ -19,10 +19,7 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <gio/gio.h>
|
||||
|
@ -350,7 +347,7 @@ xed_file_browser_store_class_init (XedFileBrowserStoreClass * klass)
|
|||
g_param_spec_flags ("filter-mode",
|
||||
"Filter Mode",
|
||||
"The filter mode",
|
||||
XED_TYPE_FILE_BROWSER_STORE_FILTER_MODE,
|
||||
XED_FILE_BROWSER_TYPE_STORE_FILTER_MODE,
|
||||
xed_file_browser_store_filter_mode_get_default (),
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
|
@ -384,7 +381,7 @@ xed_file_browser_store_class_init (XedFileBrowserStoreClass * klass)
|
|||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (XedFileBrowserStoreClass,
|
||||
no_trash), g_signal_accumulator_true_handled, NULL,
|
||||
xed_file_browser_marshal_BOOL__POINTER,
|
||||
xed_file_browser_marshal_BOOLEAN__POINTER,
|
||||
G_TYPE_BOOLEAN, 1, G_TYPE_POINTER);
|
||||
model_signals[RENAME] =
|
||||
g_signal_new ("rename",
|
||||
|
|
|
@ -19,10 +19,7 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <xed/xed-utils.h>
|
||||
|
||||
|
|
|
@ -947,7 +947,7 @@ xed_file_browser_view_class_init (XedFileBrowserViewClass *klass)
|
|||
g_param_spec_enum ("click-policy",
|
||||
"Click Policy",
|
||||
"The click policy",
|
||||
XED_TYPE_FILE_BROWSER_VIEW_CLICK_POLICY,
|
||||
XED_FILE_BROWSER_TYPE_VIEW_CLICK_POLICY,
|
||||
XED_FILE_BROWSER_VIEW_CLICK_POLICY_DOUBLE,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
||||
|
||||
|
|
|
@ -19,10 +19,7 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
|
@ -30,7 +27,6 @@
|
|||
#include <glib/gi18n-lib.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
|
||||
#include <xed/xed-utils.h>
|
||||
|
||||
#include "xed-file-browser-utils.h"
|
||||
|
@ -470,7 +466,7 @@ xed_file_browser_widget_class_init (XedFileBrowserWidgetClass *klass)
|
|||
confirm_delete),
|
||||
g_signal_accumulator_true_handled,
|
||||
NULL,
|
||||
xed_file_browser_marshal_BOOL__OBJECT_POINTER,
|
||||
xed_file_browser_marshal_BOOLEAN__OBJECT_POINTER,
|
||||
G_TYPE_BOOLEAN,
|
||||
2,
|
||||
G_TYPE_OBJECT,
|
||||
|
@ -483,7 +479,7 @@ xed_file_browser_widget_class_init (XedFileBrowserWidgetClass *klass)
|
|||
confirm_no_trash),
|
||||
g_signal_accumulator_true_handled,
|
||||
NULL,
|
||||
xed_file_browser_marshal_BOOL__POINTER,
|
||||
xed_file_browser_marshal_BOOLEAN__POINTER,
|
||||
G_TYPE_BOOLEAN,
|
||||
1,
|
||||
G_TYPE_POINTER);
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
pluginsdatadir = join_paths(datadir, 'xed', 'plugins')
|
||||
pluginslibdir = join_paths(libdir, 'xed', 'plugins')
|
||||
|
||||
subdir('docinfo')
|
||||
subdir('filebrowser')
|
||||
subdir('modelines')
|
||||
subdir('sort')
|
||||
subdir('taglist')
|
||||
subdir('textsize')
|
||||
subdir('time')
|
||||
subdir('trailsave')
|
||||
subdir('wordcompletion')
|
||||
|
||||
if enable_spell
|
||||
subdir('spell')
|
||||
endif
|
|
@ -1,38 +0,0 @@
|
|||
# Modelines Plugin
|
||||
plugindir = $(XED_PLUGINS_LIBS_DIR)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(XED_CFLAGS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(DISABLE_DEPRECATED_CFLAGS)
|
||||
|
||||
modelinesdir = $(XED_PLUGINS_DATA_DIR)/modelines
|
||||
modelines_DATA = \
|
||||
language-mappings
|
||||
|
||||
plugin_LTLIBRARIES = libmodelines.la
|
||||
|
||||
libmodelines_la_SOURCES = \
|
||||
xed-modeline-plugin.h \
|
||||
xed-modeline-plugin.c \
|
||||
modeline-parser.h \
|
||||
modeline-parser.c
|
||||
|
||||
libmodelines_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
|
||||
libmodelines_la_LIBADD = $(XED_LIBS)
|
||||
|
||||
plugin_in_files = modelines.plugin.desktop.in
|
||||
%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
|
||||
|
||||
plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(plugin_in_files) \
|
||||
$(modelines_DATA)
|
||||
|
||||
CLEANFILES = $(plugin_DATA)
|
||||
DISTCLEANFILES = $(plugin_DATA)
|
||||
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
|
@ -0,0 +1,40 @@
|
|||
modelines_sources = [
|
||||
'xed-modeline-plugin.h',
|
||||
'xed-modeline-plugin.c',
|
||||
'modeline-parser.h',
|
||||
'modeline-parser.c'
|
||||
]
|
||||
|
||||
modelines_deps = [
|
||||
config_h,
|
||||
glib,
|
||||
gmodule,
|
||||
gtk,
|
||||
gtksourceview,
|
||||
libpeas
|
||||
]
|
||||
|
||||
library(
|
||||
'modelines',
|
||||
modelines_sources,
|
||||
link_with: libxed,
|
||||
dependencies: modelines_deps,
|
||||
include_directories: include_dirs,
|
||||
install_rpath: join_paths(prefix, libdir, 'xed'),
|
||||
install: true,
|
||||
install_dir: join_paths(libdir, 'xed', 'plugins')
|
||||
)
|
||||
|
||||
install_data(
|
||||
'language-mappings',
|
||||
install_dir: join_paths(pluginsdatadir, 'modelines')
|
||||
)
|
||||
|
||||
modelines_desktop = custom_target(
|
||||
'modelines_desktop',
|
||||
input: 'modelines.plugin.desktop.in',
|
||||
output: 'modelines.plugin',
|
||||
command: [intltool_merge, '-d', '-u', po_dir, '@INPUT@', '@OUTPUT@'],
|
||||
install: true,
|
||||
install_dir: pluginslibdir,
|
||||
)
|
|
@ -19,19 +19,16 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <config.h>
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <gmodule.h>
|
||||
#include "xed-modeline-plugin.h"
|
||||
#include "modeline-parser.h"
|
||||
|
||||
#include <xed/xed-debug.h>
|
||||
#include <xed/xed-view-activatable.h>
|
||||
#include <xed/xed-view.h>
|
||||
|
||||
#include "xed-modeline-plugin.h"
|
||||
#include "modeline-parser.h"
|
||||
|
||||
struct _XedModelinePluginPrivate
|
||||
{
|
||||
XedView *view;
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
# sort plugin
|
||||
plugindir = $(XED_PLUGINS_LIBS_DIR)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(XED_CFLAGS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(DISABLE_DEPRECATED_CFLAGS)
|
||||
|
||||
plugin_LTLIBRARIES = libsort.la
|
||||
|
||||
libsort_la_SOURCES = \
|
||||
xed-sort-plugin.h \
|
||||
xed-sort-plugin.c
|
||||
|
||||
libsort_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
|
||||
libsort_la_LIBADD = $(XED_LIBS)
|
||||
|
||||
plugin_in_files = sort.plugin.desktop.in
|
||||
|
||||
%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
|
||||
|
||||
plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
|
||||
|
||||
EXTRA_DIST = $(plugin_in_files)
|
||||
|
||||
CLEANFILES = $(plugin_DATA)
|
||||
DISTCLEANFILES = $(plugin_DATA)
|
||||
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
|
@ -0,0 +1,31 @@
|
|||
sort_sources = [
|
||||
'xed-sort-plugin.h',
|
||||
'xed-sort-plugin.c'
|
||||
]
|
||||
|
||||
sort_deps = [
|
||||
config_h,
|
||||
glib,
|
||||
gtksourceview,
|
||||
libpeas
|
||||
]
|
||||
|
||||
library(
|
||||
'sort',
|
||||
sort_sources,
|
||||
link_with: libxed,
|
||||
dependencies: sort_deps,
|
||||
include_directories: include_dirs,
|
||||
install_rpath: join_paths(prefix, libdir, 'xed'),
|
||||
install: true,
|
||||
install_dir: join_paths(libdir, 'xed', 'plugins'),
|
||||
)
|
||||
|
||||
sort_desktop = custom_target(
|
||||
'sort_desktop',
|
||||
input: 'sort.plugin.desktop.in',
|
||||
output: 'sort.plugin',
|
||||
command: [intltool_merge, '-d', '-u', po_dir, '@INPUT@', '@OUTPUT@'],
|
||||
install: true,
|
||||
install_dir: pluginslibdir,
|
||||
)
|
|
@ -21,22 +21,18 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "xed-sort-plugin.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include <xed/xed-window.h>
|
||||
#include <xed/xed-window-activatable.h>
|
||||
#include <xed/xed-debug.h>
|
||||
#include <xed/xed-utils.h>
|
||||
#include <xed/xed-app.h>
|
||||
|
||||
#include "xed-sort-plugin.h"
|
||||
|
||||
#define XED_SORT_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), XED_TYPE_SORT_PLUGIN, XedSortPluginPrivate))
|
||||
|
||||
#define MENU_PATH "/MenuBar/EditMenu/EditOps_6"
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
# Spell checker plugin
|
||||
plugindir = $(XED_PLUGINS_LIBS_DIR)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(XED_CFLAGS) \
|
||||
$(GSPELL_CFLAGS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(DISABLE_DEPRECATED_CFLAGS)
|
||||
|
||||
BUILT_SOURCES = \
|
||||
xed-spell-marshal.c \
|
||||
xed-spell-marshal.h
|
||||
|
||||
plugin_LTLIBRARIES = libspell.la
|
||||
|
||||
libspell_la_SOURCES = \
|
||||
xed-spell-plugin.c \
|
||||
xed-spell-plugin.h \
|
||||
$(BUILT_SOURCES)
|
||||
|
||||
libspell_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
|
||||
libspell_la_LIBADD = $(XED_LIBS) $(GSPELL_LIBS)
|
||||
|
||||
uidir = $(XED_PLUGINS_DATA_DIR)/spell
|
||||
ui_DATA = xed-spell-setup-dialog.ui
|
||||
|
||||
xed-spell-marshal.h: xed-spell-marshal.list $(GLIB_GENMARSHAL)
|
||||
$(AM_V_GEN) $(GLIB_GENMARSHAL) $< --header --prefix=xed_marshal > $@
|
||||
|
||||
xed-spell-marshal.c: xed-spell-marshal.list $(GLIB_GENMARSHAL)
|
||||
$(AM_V_GEN) echo "#include \"xed-spell-marshal.h\"" > $@ && \
|
||||
$(GLIB_GENMARSHAL) $< --body --prefix=xed_marshal >> $@
|
||||
|
||||
plugin_in_files = spell.plugin.desktop.in
|
||||
|
||||
%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
|
||||
|
||||
plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
|
||||
|
||||
@INTLTOOL_XML_NOMERGE_RULE@
|
||||
spell_gschema_in = org.x.editor.plugins.spell.gschema.xml.in
|
||||
gsettings_SCHEMAS = $(spell_gschema_in:.xml.in=.xml)
|
||||
@GSETTINGS_RULES@
|
||||
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(ui_DATA) \
|
||||
$(plugin_in_files) \
|
||||
xed-spell-marshal.list \
|
||||
$(spell_gschema_in)
|
||||
|
||||
CLEANFILES = $(BUILT_SOURCES) $(plugin_DATA) $(gsettings_SCHEMAS)
|
||||
|
||||
dist-hook:
|
||||
cd $(distdir); rm -f $(BUILT_SOURCES)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
|
@ -0,0 +1,57 @@
|
|||
spell_sources = [
|
||||
'xed-spell-plugin.c',
|
||||
'xed-spell-plugin.h'
|
||||
]
|
||||
|
||||
spell_marshal = gnome.genmarshal(
|
||||
'xed-spell-marshal',
|
||||
sources: 'xed-spell-marshal.list',
|
||||
prefix: 'xed_spell_marshal'
|
||||
)
|
||||
|
||||
spell_deps = [
|
||||
config_h,
|
||||
glib,
|
||||
gspell,
|
||||
gtksourceview,
|
||||
libpeas,
|
||||
libpeas_gtk
|
||||
]
|
||||
|
||||
library(
|
||||
'spell',
|
||||
spell_sources + spell_marshal,
|
||||
link_with: libxed,
|
||||
dependencies: spell_deps,
|
||||
include_directories: include_dirs,
|
||||
install_rpath: join_paths(prefix, libdir, 'xed'),
|
||||
install: true,
|
||||
install_dir: join_paths(libdir, 'xed', 'plugins')
|
||||
)
|
||||
|
||||
install_data(
|
||||
'xed-spell-setup-dialog.ui',
|
||||
install_dir: join_paths(pluginsdatadir, 'spell')
|
||||
)
|
||||
|
||||
spell_desktop = custom_target(
|
||||
'spell_desktop',
|
||||
input: 'spell.plugin.desktop.in',
|
||||
output: 'spell.plugin',
|
||||
command: [intltool_merge, '-d', '-u', po_dir, '@INPUT@', '@OUTPUT@'],
|
||||
install: true,
|
||||
install_dir: pluginslibdir,
|
||||
)
|
||||
|
||||
|
||||
spell_schema_file = configure_file(
|
||||
input: 'org.x.editor.plugins.spell.gschema.xml.in',
|
||||
output: 'org.x.editor.plugins.spell.gschema.xml',
|
||||
configuration: schema_conf,
|
||||
install_dir: join_paths(datadir, 'glib-2.0', 'schemas')
|
||||
)
|
||||
|
||||
install_data(
|
||||
spell_schema_file,
|
||||
install_dir: schema_dir
|
||||
)
|
|
@ -19,14 +19,9 @@
|
|||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "xed-spell-plugin.h"
|
||||
|
||||
#include <string.h> /* For strlen */
|
||||
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <libpeas-gtk/peas-gtk-configurable.h>
|
||||
|
||||
#include <xed/xed-app.h>
|
||||
#include <xed/xed-window.h>
|
||||
#include <xed/xed-window-activatable.h>
|
||||
|
@ -34,6 +29,8 @@
|
|||
#include <xed/xed-utils.h>
|
||||
#include <gspell/gspell.h>
|
||||
|
||||
#include "xed-spell-plugin.h"
|
||||
|
||||
#define XED_METADATA_ATTRIBUTE_SPELL_LANGUAGE "metadata::xed-spell-language"
|
||||
#define XED_METADATA_ATTRIBUTE_SPELL_ENABLED "metadata::xed-spell-enabled"
|
||||
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
# Tag list plugin
|
||||
plugindir = $(XED_PLUGINS_LIBS_DIR)
|
||||
|
||||
taglistdir = $(XED_PLUGINS_DATA_DIR)/taglist
|
||||
|
||||
taglist_in_files = \
|
||||
HTML.tags.xml.in \
|
||||
Latex.tags.xml.in \
|
||||
XSLT.tags.xml.in \
|
||||
XUL.tags.xml.in
|
||||
|
||||
taglist_DATA = $(taglist_in_files:.tags.xml.in=.tags.gz)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(XED_CFLAGS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(DISABLE_DEPRECATED_CFLAGS)
|
||||
|
||||
plugin_LTLIBRARIES = libtaglist.la
|
||||
|
||||
libtaglist_la_SOURCES = \
|
||||
xed-taglist-plugin-parser.c \
|
||||
xed-taglist-plugin-parser.h \
|
||||
xed-taglist-plugin-panel.c \
|
||||
xed-taglist-plugin-panel.h \
|
||||
xed-taglist-plugin.c \
|
||||
xed-taglist-plugin.h
|
||||
|
||||
libtaglist_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
|
||||
libtaglist_la_LIBADD = $(XED_LIBS)
|
||||
|
||||
plugin_in_files = taglist.plugin.desktop.in
|
||||
|
||||
%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po)
|
||||
$(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
|
||||
|
||||
GZIP_ENV = -9
|
||||
|
||||
%.tags.gz: %.tags.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po)
|
||||
LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< $(@:.gz=) -x -u -c $(top_builddir)/po/.intltool-merge-cache
|
||||
GZIP=$(GZIP_ENV) gzip -n -f $(@:.gz=)
|
||||
|
||||
plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(taglist_in_files) $(taglist_DATA) \
|
||||
$(plugin_in_files) $(plugin_DATA)
|
||||
|
||||
CLEANFILES = \
|
||||
$(taglist_DATA) \
|
||||
$(plugin_DATA)
|
||||
DISTCLEANFILES = \
|
||||
$(taglist_DATA) \
|
||||
$(plugin_DATA)
|
||||
|
||||
|
||||
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
|
@ -0,0 +1,63 @@
|
|||
taglist_sources = [
|
||||
'xed-taglist-plugin-parser.c',
|
||||
'xed-taglist-plugin-parser.h',
|
||||
'xed-taglist-plugin-panel.c',
|
||||
'xed-taglist-plugin-panel.h',
|
||||
'xed-taglist-plugin.c',
|
||||
'xed-taglist-plugin.h'
|
||||
]
|
||||
|
||||
taglist_in_files = [
|
||||
'C.tags@0@',
|
||||
'HTML.tags@0@',
|
||||
'Latex.tags@0@',
|
||||
'XSLT.tags@0@',
|
||||
'XUL.tags@0@'
|
||||
]
|
||||
|
||||
taglist_deps = [
|
||||
config_h,
|
||||
glib,
|
||||
gtk,
|
||||
gtksourceview,
|
||||
libpeas,
|
||||
libxml
|
||||
]
|
||||
|
||||
library(
|
||||
'taglist',
|
||||
taglist_sources,
|
||||
link_with: libxed,
|
||||
dependencies: taglist_deps,
|
||||
include_directories: include_dirs,
|
||||
install_rpath: join_paths(prefix, libdir, 'xed'),
|
||||
install: true,
|
||||
install_dir: join_paths(libdir, 'xed', 'plugins')
|
||||
)
|
||||
|
||||
taglist_desktop = custom_target(
|
||||
'taglist_desktop',
|
||||
input: 'taglist.plugin.desktop.in',
|
||||
output: 'taglist.plugin',
|
||||
command: [intltool_merge, '-d', '-u', po_dir, '@INPUT@', '@OUTPUT@'],
|
||||
install: true,
|
||||
install_dir: pluginslibdir,
|
||||
)
|
||||
|
||||
foreach tagtype : taglist_in_files
|
||||
taglist_xml = custom_target(
|
||||
'@0@xmltags'.format(tagtype.format('')),
|
||||
input: tagtype.format('.xml.in'),
|
||||
output: tagtype.format(''),
|
||||
command: [intltool_merge, '-x', '-u', po_dir, '@INPUT@', '@OUTPUT@'],
|
||||
)
|
||||
|
||||
taglist_gz = custom_target(
|
||||
'@0@gztags'.format(tagtype.format('')),
|
||||
input: taglist_xml,
|
||||
output: tagtype.format('.gz'),
|
||||
command: ['gzip', '-9', '-n', '-f', '@INPUT@'],
|
||||
install: true,
|
||||
install_dir: join_paths(pluginsdatadir, 'taglist')
|
||||
)
|
||||
endforeach
|
|
@ -28,22 +28,17 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "xed-taglist-plugin-panel.h"
|
||||
#include "xed-taglist-plugin-parser.h"
|
||||
|
||||
#include <xed/xed-utils.h>
|
||||
#include <xed/xed-debug.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include "xed-taglist-plugin-panel.h"
|
||||
#include "xed-taglist-plugin-parser.h"
|
||||
|
||||
#define XED_TAGLIST_PLUGIN_PANEL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
|
||||
XED_TYPE_TAGLIST_PLUGIN_PANEL, \
|
||||
XedTaglistPluginPanelPrivate))
|
||||
|
|
|
@ -30,15 +30,11 @@
|
|||
|
||||
/* FIXME: we should rewrite the parser to avoid using DOM */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <glib.h>
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include <xed/xed-debug.h>
|
||||
|
||||
#include "xed-taglist-plugin-parser.h"
|
||||
|
|
|
@ -27,20 +27,16 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <xed/xed-window.h>
|
||||
#include <xed/xed-window-activatable.h>
|
||||
#include <xed/xed-debug.h>
|
||||
|
||||
#include "xed-taglist-plugin.h"
|
||||
#include "xed-taglist-plugin-panel.h"
|
||||
#include "xed-taglist-plugin-parser.h"
|
||||
|
||||
#include <glib/gi18n-lib.h>
|
||||
|
||||
#include <xed/xed-window.h>
|
||||
#include <xed/xed-window-activatable.h>
|
||||
#include <xed/xed-debug.h>
|
||||
|
||||
#define XED_TAGLIST_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), XED_TYPE_TAGLIST_PLUGIN, XedTaglistPluginPrivate))
|
||||
|
||||
struct _XedTaglistPluginPrivate
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
# Textsize Plugin
|
||||
SUBDIRS = textsize
|
||||
plugindir = $(XED_PLUGINS_LIBS_DIR)
|
||||
|
||||
plugin_in_files = textsize.plugin.desktop.in
|
||||
%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
|
||||
|
||||
plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(plugin_in_files)
|
||||
|
||||
CLEANFILES = $(plugin_DATA)
|
||||
DISTCLEANFILES = $(plugin_DATA)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
|
@ -0,0 +1,13 @@
|
|||
install_subdir(
|
||||
'textsize',
|
||||
install_dir: pluginslibdir
|
||||
)
|
||||
|
||||
textsize_desktop = custom_target(
|
||||
'textsize_desktop',
|
||||
input: 'textsize.plugin.desktop.in',
|
||||
output: 'textsize.plugin',
|
||||
command: [intltool_merge, '-d', '-u', po_dir, '@INPUT@', '@OUTPUT@'],
|
||||
install: true,
|
||||
install_dir: pluginslibdir,
|
||||
)
|
|
@ -1,11 +0,0 @@
|
|||
plugindir = $(XED_PLUGINS_LIBS_DIR)/textsize
|
||||
|
||||
plugin_PYTHON = \
|
||||
__init__.py \
|
||||
signals.py \
|
||||
documenthelper.py
|
||||
|
||||
CLEANFILES =
|
||||
DISTCLEANFILES =
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
|
@ -1,41 +0,0 @@
|
|||
# time plugin
|
||||
plugindir = $(XED_PLUGINS_LIBS_DIR)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(XED_CFLAGS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(DISABLE_DEPRECATED_CFLAGS)
|
||||
|
||||
plugin_LTLIBRARIES = libtime.la
|
||||
|
||||
libtime_la_SOURCES = \
|
||||
xed-time-plugin.h \
|
||||
xed-time-plugin.c
|
||||
|
||||
libtime_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
|
||||
libtime_la_LIBADD = $(XED_LIBS)
|
||||
|
||||
uidir = $(XED_PLUGINS_DATA_DIR)/time
|
||||
ui_DATA = \
|
||||
xed-time-dialog.ui \
|
||||
xed-time-setup-dialog.ui
|
||||
|
||||
plugin_in_files = time.plugin.desktop.in
|
||||
|
||||
%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
|
||||
|
||||
plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
|
||||
|
||||
@INTLTOOL_XML_NOMERGE_RULE@
|
||||
time_gschema_in = org.x.editor.plugins.time.gschema.xml.in
|
||||
gsettings_SCHEMAS = $(time_gschema_in:.xml.in=.xml)
|
||||
@GSETTINGS_RULES@
|
||||
|
||||
EXTRA_DIST = $(ui_DATA) $(plugin_in_files) $(time_gschema_in)
|
||||
|
||||
CLEANFILES = $(plugin_DATA) $(gsettings_SCHEMAS_in) $(gsettings_SCHEMASn)
|
||||
DISTCLEANFILES = $(plugin_DATA) $(gsettings_SCHEMAS_in) $(gsettings_SCHEMAS)
|
||||
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
|
@ -0,0 +1,55 @@
|
|||
time_sources = [
|
||||
'xed-time-plugin.h',
|
||||
'xed-time-plugin.c'
|
||||
]
|
||||
|
||||
time_deps = [
|
||||
config_h,
|
||||
gio,
|
||||
glib,
|
||||
gtksourceview,
|
||||
libpeas,
|
||||
libpeas_gtk
|
||||
]
|
||||
|
||||
library(
|
||||
'time',
|
||||
time_sources,
|
||||
link_with: libxed,
|
||||
dependencies: time_deps,
|
||||
include_directories: include_dirs,
|
||||
install_rpath: join_paths(prefix, libdir, 'xed'),
|
||||
install: true,
|
||||
install_dir: join_paths(libdir, 'xed', 'plugins')
|
||||
)
|
||||
|
||||
time_ui_sources = [
|
||||
'xed-time-dialog.ui',
|
||||
'xed-time-setup-dialog.ui'
|
||||
]
|
||||
|
||||
install_data(
|
||||
time_ui_sources,
|
||||
install_dir: join_paths(pluginsdatadir, 'time')
|
||||
)
|
||||
|
||||
time_desktop = custom_target(
|
||||
'time_desktop',
|
||||
input: 'time.plugin.desktop.in',
|
||||
output: 'time.plugin',
|
||||
command: [intltool_merge, '-d', '-u', po_dir, '@INPUT@', '@OUTPUT@'],
|
||||
install: true,
|
||||
install_dir: pluginslibdir,
|
||||
)
|
||||
|
||||
time_schema_file = configure_file(
|
||||
input: 'org.x.editor.plugins.time.gschema.xml.in',
|
||||
output: 'org.x.editor.plugins.time.gschema.xml',
|
||||
configuration: schema_conf,
|
||||
install_dir: join_paths(datadir, 'glib-2.0', 'schemas')
|
||||
)
|
||||
|
||||
install_data(
|
||||
time_schema_file,
|
||||
install_dir: schema_dir
|
||||
)
|
|
@ -24,22 +24,18 @@
|
|||
* See the ChangeLog files for a list of changes.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <glib.h>
|
||||
#include <gio/gio.h>
|
||||
|
||||
#include <xed/xed-window.h>
|
||||
#include <xed/xed-window-activatable.h>
|
||||
#include <libpeas-gtk/peas-gtk-configurable.h>
|
||||
#include <xed/xed-debug.h>
|
||||
#include <xed/xed-utils.h>
|
||||
#include <xed/xed-app.h>
|
||||
|
||||
#include "xed-time-plugin.h"
|
||||
|
||||
#define XED_TIME_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
# trailsave plugin
|
||||
plugindir = $(XED_PLUGINS_LIBS_DIR)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(XED_CFLAGS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(DISABLE_DEPRECATED_CFLAGS)
|
||||
|
||||
plugin_LTLIBRARIES = libtrailsave.la
|
||||
|
||||
libtrailsave_la_SOURCES = \
|
||||
xed-trail-save-plugin.h \
|
||||
xed-trail-save-plugin.c
|
||||
|
||||
libtrailsave_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
|
||||
libtrailsave_la_LIBADD = $(XED_LIBS)
|
||||
|
||||
plugin_in_files = trailsave.plugin.desktop.in
|
||||
|
||||
%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
|
||||
|
||||
plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
|
||||
|
||||
EXTRA_DIST = $(plugin_in_files)
|
||||
|
||||
CLEANFILES = $(plugin_DATA)
|
||||
DISTCLEANFILES = $(plugin_DATA)
|
||||
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
|
@ -0,0 +1,31 @@
|
|||
trailsave_sources = [
|
||||
'xed-trail-save-plugin.h',
|
||||
'xed-trail-save-plugin.c'
|
||||
]
|
||||
|
||||
trailsave_deps = [
|
||||
config_h,
|
||||
glib,
|
||||
gtksourceview,
|
||||
libpeas
|
||||
]
|
||||
|
||||
library(
|
||||
'trailsave',
|
||||
trailsave_sources,
|
||||
link_with: libxed,
|
||||
dependencies: trailsave_deps,
|
||||
include_directories: include_dirs,
|
||||
install_rpath: join_paths(prefix, libdir, 'xed'),
|
||||
install: true,
|
||||
install_dir: join_paths(libdir, 'xed', 'plugins')
|
||||
)
|
||||
|
||||
trailsave_desktop = custom_target(
|
||||
'trailsave_desktop',
|
||||
input: 'trailsave.plugin.desktop.in',
|
||||
output: 'trailsave.plugin',
|
||||
command: [intltool_merge, '-d', '-u', po_dir, '@INPUT@', '@OUTPUT@'],
|
||||
install: true,
|
||||
install_dir: pluginslibdir,
|
||||
)
|
|
@ -16,18 +16,14 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "xed-trail-save-plugin.h"
|
||||
|
||||
#include <xed/xed-window.h>
|
||||
#include <xed/xed-window-activatable.h>
|
||||
#include <xed/xed-debug.h>
|
||||
|
||||
#include "xed-trail-save-plugin.h"
|
||||
|
||||
#define XED_TRAIL_SAVE_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
|
||||
XED_TYPE_TRAIL_SAVE_PLUGIN, \
|
||||
XedTrailSavePluginPrivate))
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
# Word completion plugin
|
||||
plugindir = $(XED_PLUGINS_LIBS_DIR)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(XED_CFLAGS) \
|
||||
$(ENCHANT_CFLAGS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(DISABLE_DEPRECATED_CFLAGS)
|
||||
|
||||
plugin_LTLIBRARIES = libwordcompletion.la
|
||||
|
||||
libwordcompletion_la_SOURCES = \
|
||||
xed-wordcompletion-plugin.h \
|
||||
xed-wordcompletion-plugin.c
|
||||
|
||||
libwordcompletion_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
|
||||
libwordcompletion_la_LIBADD = $(XED_LIBS) $(ENCHANT_LIBS)
|
||||
|
||||
plugin_in_files = wordcompletion.plugin.desktop.in
|
||||
|
||||
%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
|
||||
|
||||
plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
|
||||
|
||||
uidir = $(XED_PLUGINS_DATA_DIR)/wordcompletion
|
||||
ui_DATA = xed-wordcompletion-configure.ui
|
||||
|
||||
@INTLTOOL_XML_NOMERGE_RULE@
|
||||
wordcompletion_gschema_in = org.x.editor.plugins.wordcompletion.gschema.xml.in
|
||||
gsettings_SCHEMAS = $(wordcompletion_gschema_in:.xml.in=.xml)
|
||||
@GSETTINGS_RULES@
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(plugin_in_files) \
|
||||
$(wordcompletion_gschema_in)
|
||||
|
||||
|
||||
CLEANFILES = \
|
||||
$(plugin_DATA) \
|
||||
$(gsettings_SCHEMAS)
|
||||
|
||||
DISTCLEANFILES = \
|
||||
$(plugin_DATA)
|
||||
|
||||
dist-hook:
|
||||
cd $(distdir); rm -f $(BUILT_SOURCES)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
|
@ -0,0 +1,43 @@
|
|||
wordcompletion_sources = [
|
||||
'xed-wordcompletion-plugin.h',
|
||||
'xed-wordcompletion-plugin.c'
|
||||
]
|
||||
|
||||
wordcompletion_deps = [
|
||||
config_h,
|
||||
gio,
|
||||
glib,
|
||||
gtksourceview,
|
||||
libpeas,
|
||||
libpeas_gtk
|
||||
]
|
||||
|
||||
library(
|
||||
'wordcompletion',
|
||||
wordcompletion_sources,
|
||||
link_with: libxed,
|
||||
dependencies: wordcompletion_deps,
|
||||
include_directories: include_dirs,
|
||||
install_rpath: join_paths(prefix, libdir, 'xed'),
|
||||
install: true,
|
||||
install_dir: join_paths(libdir, 'xed', 'plugins')
|
||||
)
|
||||
|
||||
wordcompletion_desktop = custom_target(
|
||||
'wordcompletion_desktop',
|
||||
input: 'wordcompletion.plugin.desktop.in',
|
||||
output: 'wordcompletion.plugin',
|
||||
command: [intltool_merge, '-d', '-u', po_dir, '@INPUT@', '@OUTPUT@'],
|
||||
install: true,
|
||||
install_dir: pluginslibdir,
|
||||
)
|
||||
|
||||
install_data(
|
||||
'xed-wordcompletion-configure.ui',
|
||||
install_dir: join_paths(pluginsdatadir, 'wordcompletion')
|
||||
)
|
||||
|
||||
install_data(
|
||||
'org.x.editor.plugins.wordcompletion.gschema.xml',
|
||||
install_dir: schema_dir
|
||||
)
|
|
@ -19,16 +19,10 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "xed-wordcompletion-plugin.h"
|
||||
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <glib.h>
|
||||
#include <gio/gio.h>
|
||||
|
||||
#include <xed/xed-debug.h>
|
||||
#include <xed/xed-window.h>
|
||||
#include <xed/xed-window-activatable.h>
|
||||
|
@ -39,6 +33,8 @@
|
|||
#include <gtksourceview/gtksource.h>
|
||||
#include <gtksourceview/completion-providers/words/gtksourcecompletionwords.h>
|
||||
|
||||
#include "xed-wordcompletion-plugin.h"
|
||||
|
||||
#define WINDOW_PROVIDER "XedWordCompletionPluginProvider"
|
||||
|
||||
#define WORDCOMPLETION_SETTINGS_BASE "org.x.editor.plugins.wordcompletion"
|
||||
|
|
|
@ -65,7 +65,7 @@ plugins/docinfo/docinfo.plugin.desktop.in
|
|||
[type: gettext/glade]plugins/docinfo/docinfo.ui
|
||||
plugins/docinfo/xed-docinfo-plugin.c
|
||||
plugins/filebrowser/filebrowser.plugin.desktop.in
|
||||
[type: gettext/gsettings]plugins/filebrowser/org.x.editor.plugins.filebrowser.gschema.xml.in
|
||||
[type: gettext/gsettings]plugins/filebrowser/org.x.editor.plugins.filebrowser.gschema.xml
|
||||
plugins/filebrowser/xed-file-bookmarks-store.c
|
||||
plugins/filebrowser/xed-file-browser-messages.c
|
||||
plugins/filebrowser/xed-file-browser-plugin.c
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
i18n.gettext('xed',
|
||||
preset: 'glib'
|
||||
)
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# generate-plugin.py - xed plugin skeletton generator
|
||||
|
@ -23,95 +23,41 @@
|
|||
|
||||
import re
|
||||
import os
|
||||
import sys
|
||||
import getopt
|
||||
import argparse
|
||||
from datetime import date
|
||||
import preprocessor
|
||||
|
||||
# Default values of command line options
|
||||
options = {
|
||||
'language' : 'c',
|
||||
'description' : 'Type here a short description of your plugin',
|
||||
'author' : os.getenv('USERNAME'),
|
||||
'email' : os.getenv('LOGNAME') + '@email.com',
|
||||
'standalone' : False,
|
||||
'with-side-pane' : False,
|
||||
'with-bottom-pane' : False,
|
||||
'with-menu' : False,
|
||||
'with-config-dlg' : False
|
||||
}
|
||||
|
||||
USAGE = """Usage:
|
||||
%s [OPTIONS...] pluginname
|
||||
""" % os.path.basename(sys.argv[0])
|
||||
HELP = USAGE + """
|
||||
generate skeleton source tree for a new xed plugin.
|
||||
|
||||
Options:
|
||||
--author Set the author name
|
||||
--email Set the author email
|
||||
--description Set the description you want for your new plugin
|
||||
--standalone Is this plugin intended to be distributed as a
|
||||
standalone package ? (N/A)
|
||||
--language / -l Set the language (C) [default: %(language)s]
|
||||
--with-$feature Enable $feature
|
||||
--without-$feature Disable $feature
|
||||
--help / -h Show this message and exits
|
||||
|
||||
Features:
|
||||
config-dlg Plugin configuration dialog
|
||||
menu Plugin menu entries
|
||||
side-pane Side pane item (N/A)
|
||||
bottom-pane Bottom pane item (N/A)
|
||||
""" % options
|
||||
|
||||
TEMPLATE_DIR = os.path.join(os.path.dirname(sys.argv[0]), "plugin_template")
|
||||
TEMPLATE_DIR = os.path.join(os.path.dirname(__file__), 'plugin_template')
|
||||
PLUGIN_DIR = os.path.normpath(os.path.join(os.path.dirname(__file__), '../plugins'))
|
||||
|
||||
# Parsing command line options
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:],
|
||||
'l:h',
|
||||
['language=',
|
||||
'description=',
|
||||
'author=',
|
||||
'email=',
|
||||
'standalone',
|
||||
'with-menu' , 'without-menu',
|
||||
'with-side-pane' , 'without-side-pane',
|
||||
'with-bottom-pane' , 'without-bottom-pane',
|
||||
'with-config-dlg' , 'without-config-dlg',
|
||||
'help'])
|
||||
except getopt.error, exc:
|
||||
print >>sys.stderr, '%s: %s' % (sys.argv[0], str(exc))
|
||||
print >>sys.stderr, USAGE
|
||||
sys.exit(1)
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('-S', '--standalone', dest='standalone', action='store_true',
|
||||
help='indicates that this plugin is intended to be distributed as a standalone package')
|
||||
parser.add_argument('-s', '--with-side-pane', dest='side_pane', action='store_true',
|
||||
help='Indicates that this plugin will use a side pane')
|
||||
parser.add_argument('-b', '--with-bottom-pane', dest='bottom_pane', action='store_true',
|
||||
help='Indicates that this plugin will use a bottom pane')
|
||||
parser.add_argument('-m', '--with-menu', dest='menu', action='store_true',
|
||||
help='Indicates that this plugin will use menu entries')
|
||||
parser.add_argument('-c', '--with-config', dest='config', action='store_true',
|
||||
help='Indicates that this plugin will use a configuration dialog')
|
||||
parser.add_argument('-d', '--description', dest='description', default='Type here a short description of your plugin', metavar='DESC',
|
||||
help='Description of the plugin')
|
||||
parser.add_argument('-a', '--author', dest='author', default=os.getenv('USERNAME'), metavar='AUTH',
|
||||
help='Author of the plugin')
|
||||
parser.add_argument('-e', '--email', dest='email', default=os.getenv('LOGNAME') + '@email.com', metavar='EMAIL',
|
||||
help='Email address of the author')
|
||||
parser.add_argument('-l', '--language', dest='language', default='c', metavar='LANG',
|
||||
help='Language of the plugin')
|
||||
parser.add_argument('-o', '--output-directory', dest='directory', default=None, metavar='LANG',
|
||||
help='Language of the plugin')
|
||||
parser.add_argument('name', metavar='PLUGIN_NAME',
|
||||
help='The name of the plugin')
|
||||
|
||||
for opt, arg in opts:
|
||||
if opt in ('-h', '--help'):
|
||||
print >>sys.stderr, HELP
|
||||
sys.exit(0)
|
||||
args = parser.parse_args()
|
||||
|
||||
elif opt in ('--description', '--author', '--email'):
|
||||
options[opt[2:]] = arg
|
||||
|
||||
elif opt in ('-l', '--language'):
|
||||
options['language'] = arg.lower()
|
||||
|
||||
elif opt == '--standalone':
|
||||
options['standalone'] = True
|
||||
|
||||
elif opt[0:7] == '--with-':
|
||||
options['with-' + opt[7:]] = True
|
||||
|
||||
elif opt[0:10] == '--without-':
|
||||
options['with-' + opt[10:]] = False
|
||||
|
||||
# What's the new plugin name ?
|
||||
if len(args) < 1:
|
||||
print >>sys.stderr, USAGE
|
||||
sys.exit(1)
|
||||
|
||||
plugin_name = args[0]
|
||||
plugin_name = args.name
|
||||
plugin_id = re.sub('[^a-z0-9_]', '', plugin_name.lower().replace(' ', '_'))
|
||||
plugin_module = plugin_id.replace('_', '-')
|
||||
|
||||
|
@ -119,52 +65,85 @@ directives = {
|
|||
'PLUGIN_NAME' : plugin_name,
|
||||
'PLUGIN_MODULE' : plugin_module,
|
||||
'PLUGIN_ID' : plugin_id,
|
||||
'AUTHOR_FULLNAME' : options['author'],
|
||||
'AUTHOR_EMAIL' : options['email'],
|
||||
'AUTHOR_FULLNAME' : args.author,
|
||||
'AUTHOR_EMAIL' : args.email,
|
||||
'DATE_YEAR' : date.today().year,
|
||||
'DESCRIPTION' : options['description'],
|
||||
'DESCRIPTION' : args.description,
|
||||
}
|
||||
|
||||
# Files to be generated by the preprocessor, in the form "template : outfile"
|
||||
output_files = {
|
||||
'Makefile.am': '%s/Makefile.am' % plugin_module,
|
||||
'xed-plugin.desktop.in': '%s/%s.xed-plugin.desktop.in' % (plugin_module, plugin_module)
|
||||
'meson.build': 'meson.build',
|
||||
'xed-plugin.desktop.in': '%s.plugin.desktop.in' % plugin_module
|
||||
}
|
||||
|
||||
if options['language'] == 'c':
|
||||
output_files['xed-plugin.c'] = '%s/%s-plugin.c' % (plugin_module, plugin_module)
|
||||
output_files['xed-plugin.h'] = '%s/%s-plugin.h' % (plugin_module, plugin_module)
|
||||
else:
|
||||
print >>sys.stderr, 'Value of --language should be C'
|
||||
print >>sys.stderr, USAGE
|
||||
sys.exit(1)
|
||||
if args.language == 'c':
|
||||
directives['HAS_C_FILES'] = True
|
||||
output_files['xed-plugin.c'] = 'xed-%s-plugin.c' % plugin_module
|
||||
output_files['xed-plugin.h'] = 'xed-%s-plugin.h' % plugin_module
|
||||
|
||||
if options['standalone']:
|
||||
output_files['configure.ac'] = 'configure.ac'
|
||||
|
||||
if options['with-side-pane']:
|
||||
if args.side_pane:
|
||||
directives['WITH_SIDE_PANE'] = True
|
||||
|
||||
if options['with-bottom-pane']:
|
||||
if args.bottom_pane:
|
||||
directives['WITH_BOTTOM_PANE'] = True
|
||||
|
||||
if options['with-menu']:
|
||||
if args.menu:
|
||||
directives['WITH_MENU'] = True
|
||||
|
||||
if options['with-config-dlg']:
|
||||
if args.config:
|
||||
directives['WITH_CONFIGURE_DIALOG'] = True
|
||||
|
||||
if args.directory is None:
|
||||
directory = os.getcwd() if args.standalone else PLUGIN_DIR
|
||||
elif os.path.isdir(args.directory):
|
||||
directory = args.directory
|
||||
else:
|
||||
print('Unable to create plugin: %s does not exist or is not a directory' % args.directory)
|
||||
quit(1)
|
||||
|
||||
directory = os.path.join(directory, plugin_module)
|
||||
if os.path.exists(directory):
|
||||
print('Unable to create plugin: directory %s already exists' % directory)
|
||||
quit(1)
|
||||
else:
|
||||
os.makedirs(directory)
|
||||
|
||||
if not args.standalone:
|
||||
with open(os.path.join(PLUGIN_DIR, 'meson.build'), 'r') as f:
|
||||
contents = f.read()
|
||||
lines = contents.split('\n')
|
||||
|
||||
start = False
|
||||
for i in range(len(lines)):
|
||||
line = lines[i].rstrip()
|
||||
print(line)
|
||||
if line.startswith('subdir('):
|
||||
start = True
|
||||
elif start:
|
||||
break
|
||||
else:
|
||||
continue
|
||||
|
||||
if line[8:-2] > plugin_module:
|
||||
break
|
||||
|
||||
lines.insert(i, 'subdir(\'%s\')' % plugin_module)
|
||||
|
||||
with open(os.path.join(PLUGIN_DIR, 'meson.build'), 'w') as f:
|
||||
f.write('\n'.join(lines))
|
||||
|
||||
# Generate the plugin base
|
||||
for infile, outfile in output_files.iteritems():
|
||||
print 'Processing %s\n' \
|
||||
' into %s...' % (infile, outfile)
|
||||
print('Generating file %s from template %s...' % (outfile, infile))
|
||||
|
||||
file_directives = directives.copy()
|
||||
|
||||
infile = os.path.join(TEMPLATE_DIR, infile)
|
||||
outfile = os.path.join(os.getcwd(), outfile)
|
||||
outfile = os.path.join(directory, outfile)
|
||||
|
||||
if not os.path.isfile(infile):
|
||||
print >>sys.stderr, 'Input file does not exist : %s.' % os.path.basename(infile)
|
||||
print('Input file %s does not exist: skipping' % os.path.basename(infile))
|
||||
continue
|
||||
|
||||
# Make sure the destination directory exists
|
||||
|
@ -172,11 +151,11 @@ for infile, outfile in output_files.iteritems():
|
|||
os.makedirs(os.path.split(outfile)[0])
|
||||
|
||||
# Variables relative to the generated file
|
||||
directives['DIRNAME'], directives['FILENAME'] = os.path.split(outfile)
|
||||
file_directives['DIRNAME'], file_directives['FILENAME'] = os.path.split(outfile)
|
||||
|
||||
# Generate the file
|
||||
preprocessor.process(infile, outfile, directives.copy())
|
||||
preprocessor.process(infile, outfile, file_directives)
|
||||
|
||||
print 'Done.'
|
||||
print('Done')
|
||||
|
||||
# ex:ts=4:et:
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
# ##(PLUGIN_NAME)
|
||||
|
||||
plugindir = $(XED_PLUGINS_LIBS_DIR)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(XED_CFLAGS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(DISABLE_DEPRECATED_CFLAGS) \
|
||||
-DXED_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
|
||||
|
||||
plugin_LTLIBRARIES = lib##(PLUGIN_MODULE).la
|
||||
|
||||
lib##(PLUGIN_MODULE)_la_SOURCES = \
|
||||
##(PLUGIN_MODULE)-plugin.h \
|
||||
##(PLUGIN_MODULE)-plugin.c
|
||||
|
||||
lib##(PLUGIN_MODULE)_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
|
||||
lib##(PLUGIN_MODULE)_la_LIBADD = $(XED_LIBS)
|
||||
|
||||
# UI files (if you use gtkbuilder for your plugin, list those files here)
|
||||
uidir = $(XED_PLUGINS_DATA_DIR)/##(PLUGIN_MODULE)
|
||||
ui_DATA =
|
||||
|
||||
plugin_in_files = ##(PLUGIN_MODULE).xed-plugin.desktop.in
|
||||
|
||||
%.xed-plugin: %.xed-plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
|
||||
|
||||
plugin_DATA = $(plugin_in_files:.xed-plugin.desktop.in=.xed-plugin)
|
||||
|
||||
EXTRA_DIST = $(plugin_in_files)
|
||||
|
||||
CLEANFILES = $(plugin_DATA) $(ui_DATA)
|
||||
|
||||
DISTCLEANFILES = $(plugin_DATA) $(ui_DATA)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
|
@ -0,0 +1,34 @@
|
|||
##ifdef HAS_C_FILES
|
||||
##(PLUGIN_ID.lower)_sources = [
|
||||
xed-##(PLUGIN_MODULE.lower)-plugin.h
|
||||
xed-##(PLUGIN_MODULE.lower)-plugin.c,
|
||||
]
|
||||
|
||||
##(PLUGIN_ID.lower)_deps = [
|
||||
config_h,
|
||||
glib,
|
||||
gtksourceview,
|
||||
libpeas,
|
||||
libpeas_gtk
|
||||
]
|
||||
|
||||
library(
|
||||
'##(PLUGIN_ID.lower)',
|
||||
##(PLUGIN_ID.lower)_sources,
|
||||
link_with: libxed,
|
||||
dependencies: ##(PLUGIN_ID.lower)_deps,
|
||||
include_directories: include_dirs,
|
||||
install_rpath: join_paths(prefix, libdir, 'xed'),
|
||||
install: true,
|
||||
install_dir: join_paths(libdir, 'xed', 'plugins')
|
||||
)
|
||||
|
||||
##endif
|
||||
##(PLUGIN_ID.lower)_desktop = custom_target(
|
||||
'##(PLUGIN_ID)_desktop',
|
||||
input: '##(PLUGIN_ID).plugin.desktop.in',
|
||||
output: '##(PLUGIN_ID).plugin',
|
||||
command: [intltool_merge, '-d', '-u', po_dir, '@INPUT@', '@OUTPUT@'],
|
||||
install: true,
|
||||
install_dir: pluginslibdir,
|
||||
)
|
|
@ -18,167 +18,185 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "##(PLUGIN_MODULE)-plugin.h"
|
||||
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <xed/xed-debug.h>
|
||||
|
||||
#define WINDOW_DATA_KEY "##(PLUGIN_ID.camel)PluginWindowData"
|
||||
|
||||
#define ##(PLUGIN_ID.upper)_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), TYPE_##(PLUGIN_ID.upper)_PLUGIN, ##(PLUGIN_ID.camel)PluginPrivate))
|
||||
#include "##(PLUGIN_MODULE)-plugin.h"
|
||||
|
||||
struct _##(PLUGIN_ID.camel)PluginPrivate
|
||||
{
|
||||
gpointer dummy;
|
||||
gpointer dummy;
|
||||
|
||||
##ifdef WITH_MENU
|
||||
GtkActionGroup *action_group;
|
||||
guint ui_id;
|
||||
##endif
|
||||
};
|
||||
|
||||
XED_PLUGIN_REGISTER_TYPE (##(PLUGIN_ID.camel)Plugin, ##(PLUGIN_ID.lower)_plugin)
|
||||
struct _##(PLUGIN_ID.camel)Plugin
|
||||
{
|
||||
PeasExtensionBase;
|
||||
};
|
||||
|
||||
static void peas_activatable_iface_init (PeasActivatableInterface *iface);
|
||||
static void peas_gtk_configurable_iface_init (PeasGtkConfigurableInterface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (##(PLUGIN_ID.camel)Plugin, ##(PLUGIN_ID.lower)_plugin, PeasExtensionBase)
|
||||
|
||||
##ifdef WITH_MENU
|
||||
/* UI string. See xed-ui.xml for reference */
|
||||
static const gchar ui_str =
|
||||
"<ui>"
|
||||
" <menubar name='MenuBar'>"
|
||||
" <!-- Put your menu entries here -->"
|
||||
" </menubar>"
|
||||
"</ui>";
|
||||
"<ui>"
|
||||
" <menubar name='MenuBar'>"
|
||||
" <!-- Put your menu entries here -->"
|
||||
" </menubar>"
|
||||
"</ui>";
|
||||
|
||||
/* UI actions */
|
||||
static const GtkActionEntry action_entries[] =
|
||||
{
|
||||
/* Put your actions here */
|
||||
};
|
||||
{
|
||||
/* Put your actions here */
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GtkActionGroup *action_group;
|
||||
guint ui_id;
|
||||
} WindowData;
|
||||
##endif
|
||||
|
||||
static void
|
||||
##(PLUGIN_ID.lower)_plugin_init (##(PLUGIN_ID.camel)Plugin *plugin)
|
||||
{
|
||||
plugin->priv = ##(PLUGIN_ID.upper)_PLUGIN_GET_PRIVATE (plugin);
|
||||
plugin->priv = ##(PLUGIN_ID.upper)_PLUGIN_GET_PRIVATE (plugin);
|
||||
|
||||
xed_debug_message (DEBUG_PLUGINS,
|
||||
"##(PLUGIN_ID.camel)Plugin initializing");
|
||||
xed_debug_message (DEBUG_PLUGINS, "##(PLUGIN_ID.camel)Plugin initializing");
|
||||
}
|
||||
|
||||
static void
|
||||
##(PLUGIN_ID.lower)_plugin_finalize (GObject *object)
|
||||
{
|
||||
xed_debug_message (DEBUG_PLUGINS,
|
||||
"##(PLUGIN_ID.camel)Plugin finalizing");
|
||||
xed_debug_message (DEBUG_PLUGINS, "##(PLUGIN_ID.camel)Plugin finalizing");
|
||||
|
||||
G_OBJECT_CLASS (##(PLUGIN_ID.lower)_plugin_parent_class)->finalize (object);
|
||||
G_OBJECT_CLASS (##(PLUGIN_ID.lower)_plugin_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
##ifdef WITH_MENU
|
||||
static void
|
||||
free_window_data (WindowData *data)
|
||||
##(PLUGIN_ID.lower)_plugin_dispose (GObject *object)
|
||||
{
|
||||
g_return_if_fail (data != NULL);
|
||||
##(PLUGIN_ID.camelPlugin *plugin = ##(PLUGIN_ID.upper)_PLUGIN (object);
|
||||
xed_debug_message (DEBUG_PLUGINS, "##(PLUGIN_ID.camel)Plugin disposing");
|
||||
if (plugin->priv->window != NULL)
|
||||
{
|
||||
g_object_unref (plugin->priv->window);
|
||||
plugin->priv->window = NULL;
|
||||
}
|
||||
if (plugin->priv->action_group)
|
||||
{
|
||||
g_object_unref (plugin->priv->action_group);
|
||||
plugin->priv->action_group = NULL;
|
||||
}
|
||||
|
||||
g_object_unref (data->action_group);
|
||||
g_free (data);
|
||||
G_OBJECT_CLASS (##(PLUGIN_ID.lower)_plugin_parent_class)->dispose (object);
|
||||
}
|
||||
##endif
|
||||
|
||||
static void
|
||||
impl_activate (XedPlugin *plugin,
|
||||
XedWindow *window)
|
||||
##(PLUGIN_ID.lower)_plugin_activate (PeasActivatable *activatable)
|
||||
{
|
||||
##ifdef WITH_MENU
|
||||
GtkUIManager *manager;
|
||||
WindowData *data;
|
||||
##(PLUGIN_ID.camel)Plugin *plugin;
|
||||
##(PLUGIN_ID.camel)PluginPrivate *data;
|
||||
XedWindow *window;
|
||||
GtkUIManager *manager;
|
||||
##endif
|
||||
|
||||
xed_debug (DEBUG_PLUGINS);
|
||||
xed_debug (DEBUG_PLUGINS);
|
||||
|
||||
##ifdef WITH_MENU
|
||||
data = g_new (WindowData, 1);
|
||||
manager = xed_window_get_ui_manager (window);
|
||||
plugin = ##(PLUGIN_ID.upper)_PLUGIN (activatable);
|
||||
data = plugin->priv;
|
||||
window = XED_WINDOW (data->window);
|
||||
|
||||
data->action_group = gtk_action_group_new ("##(PLUGIN_ID.camel)PluginActions");
|
||||
gtk_action_group_set_translation_domain (data->action_group,
|
||||
GETTEXT_PACKAGE);
|
||||
gtk_action_group_add_actions (data->action_group,
|
||||
action_entries,
|
||||
G_N_ELEMENTS (action_entries),
|
||||
window);
|
||||
manager = xed_window_get_ui_manager (window);
|
||||
|
||||
gtk_ui_manager_insert_action_group (manager, data->action_group, -1);
|
||||
data->action_group = gtk_action_group_new ("##(PLUGIN_ID.camel)PluginActions");
|
||||
gtk_action_group_set_translation_domain (data->action_group,
|
||||
GETTEXT_PACKAGE);
|
||||
gtk_action_group_add_actions (data->action_group,
|
||||
action_entries,
|
||||
G_N_ELEMENTS (action_entries),
|
||||
window);
|
||||
|
||||
data->ui_id = gtk_ui_manager_add_ui_from_string (manager, ui_str,
|
||||
-1, NULL);
|
||||
gtk_ui_manager_insert_action_group (manager, data->action_group, -1);
|
||||
|
||||
g_object_set_data_full (G_OBJECT (window),
|
||||
WINDOW_DATA_KEY,
|
||||
data,
|
||||
(GDestroyNotify) free_window_data);
|
||||
data->ui_id = gtk_ui_manager_add_ui_from_string (manager, ui_str,
|
||||
-1, NULL);
|
||||
##endif
|
||||
}
|
||||
|
||||
static void
|
||||
impl_deactivate (XedPlugin *plugin,
|
||||
XedWindow *window)
|
||||
##(PLUGIN_ID.lower)_plugin_deactivate (PeasActivatable *activatable)
|
||||
{
|
||||
##ifdef WITH_MENU
|
||||
GtkUIManager *manager;
|
||||
WindowData *data;
|
||||
##(PLUGIN_ID.camel)PluginPrivate *data;
|
||||
XedWindow *window;
|
||||
GtkUIManager *manager;
|
||||
##endif
|
||||
|
||||
xed_debug (DEBUG_PLUGINS);
|
||||
xed_debug (DEBUG_PLUGINS);
|
||||
|
||||
##ifdef WITH_MENU
|
||||
manager = xed_window_get_ui_manager (window);
|
||||
data = ##(PLUGIN_ID.upper)_PLUGIN (activatable)->priv;
|
||||
window = XED_WINDOW (data->window);
|
||||
|
||||
data = (WindowData *) g_object_get_data (G_OBJECT (window),
|
||||
WINDOW_DATA_KEY);
|
||||
g_return_if_fail (data != NULL);
|
||||
manager = xed_window_get_ui_manager (window);
|
||||
|
||||
gtk_ui_manager_remove_ui (manager, data->ui_id);
|
||||
gtk_ui_manager_remove_action_group (manager, data->action_group);
|
||||
data = (WindowData *) g_object_get_data (G_OBJECT (window),
|
||||
WINDOW_DATA_KEY);
|
||||
g_return_if_fail (data != NULL);
|
||||
|
||||
g_object_set_data (G_OBJECT (window), WINDOW_DATA_KEY, NULL);
|
||||
gtk_ui_manager_remove_ui (manager, data->ui_id);
|
||||
gtk_ui_manager_remove_action_group (manager, data->action_group);
|
||||
##endif
|
||||
}
|
||||
|
||||
static void
|
||||
impl_update_ui (XedPlugin *plugin,
|
||||
XedWindow *window)
|
||||
##(PLUGIN_ID.lower)_plugin_update_state (PeasActivatable *activatable)
|
||||
{
|
||||
xed_debug (DEBUG_PLUGINS);
|
||||
xed_debug (DEBUG_PLUGINS);
|
||||
}
|
||||
|
||||
static void
|
||||
peas_activatable_iface_init (PeasActivatableInterface *iface)
|
||||
{
|
||||
iface->activate = ##(PLUGIN_ID.lower)_plugin_activate;
|
||||
iface->deactivate = ##(PLUGIN_ID.lower)_plugin_deactivate;
|
||||
iface->update_state = ##(PLUGIN_ID.lower)_plugin_update_state;
|
||||
}
|
||||
|
||||
##ifdef WITH_CONFIGURE_DIALOG
|
||||
static GtkWidget *
|
||||
impl_create_configure_dialog (XedPlugin *plugin)
|
||||
static void
|
||||
peas_gtk_configurable_iface_init (PeasGtkConfigurableInterface *iface)
|
||||
{
|
||||
xed_debug (DEBUG_PLUGINS);
|
||||
iface->create_configure_widget = xed_time_plugin_create_configure_widget;
|
||||
}
|
||||
##endif
|
||||
|
||||
static void
|
||||
##(PLUGIN_ID.lower)_plugin_class_init (##(PLUGIN_ID.camel)PluginClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
XedPluginClass *plugin_class = XED_PLUGIN_CLASS (klass);
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
XedPluginClass *plugin_class = XED_PLUGIN_CLASS (klass);
|
||||
|
||||
object_class->finalize = ##(PLUGIN_ID.lower)_plugin_finalize;
|
||||
|
||||
plugin_class->activate = impl_activate;
|
||||
plugin_class->deactivate = impl_deactivate;
|
||||
plugin_class->update_ui = impl_update_ui;
|
||||
##ifdef WITH_CONFIGURE_DIALOG
|
||||
plugin_class->create_configure_dialog = impl_create_configure_dialog;
|
||||
##endif
|
||||
|
||||
g_type_class_add_private (object_class,
|
||||
sizeof (##(PLUGIN_ID.camel)PluginPrivate));
|
||||
object_class->finalize = ##(PLUGIN_ID.lower)_plugin_finalize;
|
||||
object_class->dispose = ##(PLUGIN_ID.lower)_plugin_dispose;
|
||||
}
|
||||
|
||||
G_MODULE_EXPORT void
|
||||
peas_register_types (PeasObjectModule *module)
|
||||
{
|
||||
##(PLUGIN_ID.lower)_plugin_register_type (G_TYPE_MODULE (module));
|
||||
peas_object_module_register_extension_type (module,
|
||||
PEAS_TYPE_ACTIVATABLE,
|
||||
##(PLUGIN_ID.lower)_TYPE_PLUGIN);
|
||||
|
||||
peas_object_module_register_extension_type (module,
|
||||
PEAS_GTK_TYPE_CONFIGURABLE,
|
||||
##(PLUGIN_ID.lower)_TYPE_PLUGIN);
|
||||
}
|
||||
|
|
|
@ -23,53 +23,16 @@
|
|||
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
#include <xed/xed-plugin.h>
|
||||
#include <libpeas/peas-extension-base.h>
|
||||
#include <libpeas/peas-object-module.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/*
|
||||
* Type checking and casting macros
|
||||
*/
|
||||
#define TYPE_##(PLUGIN_ID.upper)_PLUGIN (##(PLUGIN_ID.lower)_plugin_get_type ())
|
||||
#define ##(PLUGIN_ID.upper)_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_##(PLUGIN_ID.upper)_PLUGIN, ##(PLUGIN_ID.camel)Plugin))
|
||||
#define ##(PLUGIN_ID.upper)_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), TYPE_##(PLUGIN_ID.upper)_PLUGIN, ##(PLUGIN_ID.camel)PluginClass))
|
||||
#define IS_##(PLUGIN_ID.upper)_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_##(PLUGIN_ID.upper)_PLUGIN))
|
||||
#define IS_##(PLUGIN_ID.upper)_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_##(PLUGIN_ID.upper)_PLUGIN))
|
||||
#define ##(PLUGIN_ID.upper)_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_##(PLUGIN_ID.upper)_PLUGIN, ##(PLUGIN_ID.camel)PluginClass))
|
||||
|
||||
/* Private structure type */
|
||||
typedef struct _##(PLUGIN_ID.camel)PluginPrivate ##(PLUGIN_ID.camel)PluginPrivate;
|
||||
|
||||
/*
|
||||
* Main object structure
|
||||
*/
|
||||
typedef struct _##(PLUGIN_ID.camel)Plugin ##(PLUGIN_ID.camel)Plugin;
|
||||
|
||||
struct _##(PLUGIN_ID.camel)Plugin
|
||||
{
|
||||
XedPlugin parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
##(PLUGIN_ID.camel)PluginPrivate *priv;
|
||||
};
|
||||
|
||||
/*
|
||||
* Class definition
|
||||
*/
|
||||
typedef struct _##(PLUGIN_ID.camel)PluginClass ##(PLUGIN_ID.camel)PluginClass;
|
||||
|
||||
struct _##(PLUGIN_ID.camel)PluginClass
|
||||
{
|
||||
XedPluginClass parent_class;
|
||||
};
|
||||
|
||||
/*
|
||||
* Public methods
|
||||
*/
|
||||
GType ##(PLUGIN_ID.lower)_plugin_get_type (void) G_GNUC_CONST;
|
||||
#define ##(PLUGIN_ID.upper)_TYPE_PLUGIN (##(PLUGIN_ID.lower)_plugin_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (##(PLUGIN_ID.camel)Plugin, ##(PLUGIN_ID.lower)_plugin, ##(PLUGIN_ID.upper), PLUGIN, PeasExtensionBase)
|
||||
|
||||
/* All the plugins must implement this function */
|
||||
G_MODULE_EXPORT GType register_xed_plugin (GTypeModule *module);
|
||||
G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
205
xed/Makefile.am
205
xed/Makefile.am
|
@ -1,205 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
bin_PROGRAMS = xed
|
||||
|
||||
pkglib_LTLIBRARIES = libxed.la
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(srcdir) \
|
||||
$(XED_CFLAGS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(INTROSPECTION_CFLAGS) \
|
||||
$(DISABLE_DEPRECATED_CFLAGS) \
|
||||
-DDATADIR=\""$(datadir)"\" \
|
||||
-DLIBDIR=\""$(libdir)"\"
|
||||
|
||||
xed_SOURCES = \
|
||||
xed.c
|
||||
|
||||
xed_LDADD = \
|
||||
libxed.la \
|
||||
$(XED_LIBS) \
|
||||
$(INTROSPECTION_LIBS)
|
||||
|
||||
xed_LDFLAGS = -export-dynamic -no-undefined -export-symbols-regex "^[[^_]].*"
|
||||
|
||||
libxed_la_LDFLAGS = -avoid-version -export-dynamic -no-undefined -export-symbols-regex "^[^_].*"
|
||||
|
||||
# XED_LIBS must be the last to ensure correct order on some platforms
|
||||
libxed_la_LIBADD = $(XED_LIBS)
|
||||
|
||||
BUILT_SOURCES = \
|
||||
xed-enum-types.c \
|
||||
xed-enum-types.h \
|
||||
xed-marshal.c \
|
||||
xed-marshal.h
|
||||
|
||||
|
||||
NOINST_H_FILES = \
|
||||
xed-close-button.h \
|
||||
xed-close-confirmation-dialog.h \
|
||||
xed-dirs.h \
|
||||
xed-document-private.h \
|
||||
xed-documents-panel.h \
|
||||
xed-encodings-dialog.h \
|
||||
xed-history-entry.h \
|
||||
xed-io-error-info-bar.h \
|
||||
xed-metadata-manager.h \
|
||||
xed-paned.h \
|
||||
xed-plugins-engine.h \
|
||||
xed-preferences-dialog.h \
|
||||
xed-print-job.h \
|
||||
xed-print-preview.h \
|
||||
xed-settings.h \
|
||||
xed-status-combo-box.h \
|
||||
xed-tab-label.h \
|
||||
xed-ui.h \
|
||||
xed-utils.h \
|
||||
xed-view-frame.h \
|
||||
xed-view-gutter-renderer.h \
|
||||
xed-window-private.h
|
||||
|
||||
INST_H_FILES = \
|
||||
xed-app.h \
|
||||
xed-app-activatable.h \
|
||||
xed-commands.h \
|
||||
xed-debug.h \
|
||||
xed-document.h \
|
||||
xed-encodings-combo-box.h \
|
||||
xed-file-chooser-dialog.h \
|
||||
xed-message-bus.h \
|
||||
xed-message-type.h \
|
||||
xed-message.h \
|
||||
xed-notebook.h \
|
||||
xed-panel.h \
|
||||
xed-progress-info-bar.h \
|
||||
xed-searchbar.h \
|
||||
xed-statusbar.h \
|
||||
xed-tab.h \
|
||||
xed-view.h \
|
||||
xed-view-activatable.h \
|
||||
xed-window.h \
|
||||
xed-window-activatable.h
|
||||
|
||||
headerdir = $(prefix)/include/xed
|
||||
|
||||
header_DATA = \
|
||||
$(INST_H_FILES)
|
||||
|
||||
BUILT_SOURCES_PRIVATE = \
|
||||
xed-resources.c
|
||||
|
||||
libxed_c_files = \
|
||||
xed-app.c \
|
||||
xed-app-activatable.c \
|
||||
xed-view-activatable.c \
|
||||
xed-window-activatable.c \
|
||||
xed-resources.c \
|
||||
xed-close-button.c \
|
||||
xed-close-confirmation-dialog.c \
|
||||
xed-commands-documents.c \
|
||||
xed-commands-edit.c \
|
||||
xed-commands-file.c \
|
||||
xed-commands-file-print.c \
|
||||
xed-commands-help.c \
|
||||
xed-commands-search.c \
|
||||
xed-commands-view.c \
|
||||
xed-debug.c \
|
||||
xed-dirs.c \
|
||||
xed-document.c \
|
||||
xed-documents-panel.c \
|
||||
xed-encodings-combo-box.c \
|
||||
xed-encodings-dialog.c \
|
||||
xed-file-chooser-dialog.c \
|
||||
xed-history-entry.c \
|
||||
xed-io-error-info-bar.c \
|
||||
xed-message-bus.c \
|
||||
xed-message-type.c \
|
||||
xed-message.c \
|
||||
xed-metadata-manager.c \
|
||||
xed-notebook.c \
|
||||
xed-paned.c \
|
||||
xed-panel.c \
|
||||
xed-plugins-engine.c \
|
||||
xed-preferences-dialog.c \
|
||||
xed-print-job.c \
|
||||
xed-print-preview.c \
|
||||
xed-progress-info-bar.c \
|
||||
xed-settings.c \
|
||||
xed-searchbar.c \
|
||||
xed-statusbar.c \
|
||||
xed-status-combo-box.c \
|
||||
xed-tab.c \
|
||||
xed-tab-label.c \
|
||||
xed-utils.c \
|
||||
xed-view.c \
|
||||
xed-view-frame.c \
|
||||
xed-view-gutter-renderer.c \
|
||||
xed-window.c
|
||||
|
||||
libxed_la_SOURCES = \
|
||||
$(BUILT_SOURCES) \
|
||||
$(libxed_c_files) \
|
||||
$(POSIXIO_FILES) \
|
||||
$(NOINST_H_FILES) \
|
||||
$(INST_H_FILES)
|
||||
|
||||
xed-enum-types.h: xed-enum-types.h.template $(INST_H_FILES) $(GLIB_MKENUMS)
|
||||
$(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template xed-enum-types.h.template $(INST_H_FILES)) > $@
|
||||
|
||||
xed-enum-types.c: xed-enum-types.c.template $(INST_H_FILES) $(GLIB_MKENUMS)
|
||||
$(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template xed-enum-types.c.template $(INST_H_FILES)) > $@
|
||||
|
||||
xed-marshal.h: xed-marshal.list $(GLIB_GENMARSHAL)
|
||||
$(AM_V_GEN) $(GLIB_GENMARSHAL) $< --header --prefix=xed_marshal > $@
|
||||
|
||||
xed-marshal.c: xed-marshal.list $(GLIB_GENMARSHAL)
|
||||
$(AM_V_GEN) echo "#include \"xed-marshal.h\"" > $@ && \
|
||||
$(GLIB_GENMARSHAL) $< --body --prefix=xed_marshal >> $@
|
||||
|
||||
xed-resources.c: resources/xed.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/resources --generate-dependencies $(srcdir)/resources/xed.gresource.xml)
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/resources --generate-source $(srcdir)/resources/xed.gresource.xml
|
||||
|
||||
EXTRA_DIST = \
|
||||
xed-enum-types.h.template \
|
||||
xed-enum-types.c.template \
|
||||
xed-marshal.list \
|
||||
xed.rc \
|
||||
resources/xed.gresource.xml \
|
||||
resources/ui/xed-ui.xml \
|
||||
resources/ui/xed-encodings-dialog.ui \
|
||||
resources/ui/xed-preferences-dialog.ui \
|
||||
resources/ui/xed-print-preferences.ui \
|
||||
resources/ui/xed-searchbar.ui \
|
||||
resources/ui/xed-view-frame.ui
|
||||
|
||||
CLEANFILES = $(BUILT_SOURCES) $(BUILT_SOURCES_PRIVATE)
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
-include $(INTROSPECTION_MAKEFILE)
|
||||
INTROSPECTION_GIRS = Xed-1.0.gir
|
||||
|
||||
Xed-1.0.gir: xed
|
||||
INTROSPECTION_SCANNER_ARGS = -I$(top_srcdir) --warn-all
|
||||
Xed_1_0_gir_NAMESPACE = Xed
|
||||
Xed_1_0_gir_VERSION = 1.0
|
||||
Xed_1_0_gir_PROGRAM = $(builddir)/xed
|
||||
Xed_1_0_gir_FILES = $(INST_H_FILES) $(libxed_c_files) $(BUILT_SOURCES)
|
||||
Xed_1_0_gir_INCLUDES = Gtk-3.0 GtkSource-3.0
|
||||
|
||||
girdir = $(datadir)/xed/gir-1.0
|
||||
gir_DATA = $(INTROSPECTION_GIRS)
|
||||
|
||||
typelibdir = $(libdir)/xed/girepository-1.0
|
||||
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
|
||||
|
||||
CLEANFILES += \
|
||||
$(gir_DATA) \
|
||||
$(typelib_DATA)
|
||||
endif
|
||||
|
||||
dist-hook:
|
||||
cd $(distdir); rm -f $(BUILT_SOURCES) $(BUILT_SOURCES_PRIVATE)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
|
@ -0,0 +1,193 @@
|
|||
xed_sources = [
|
||||
'xed.c'
|
||||
]
|
||||
|
||||
private_headers = [
|
||||
'xed-close-button.h',
|
||||
'xed-close-confirmation-dialog.h',
|
||||
'xed-dirs.h',
|
||||
'xed-document-private.h',
|
||||
'xed-documents-panel.h',
|
||||
'xed-encodings-dialog.h',
|
||||
'xed-history-entry.h',
|
||||
'xed-io-error-info-bar.h',
|
||||
'xed-metadata-manager.h',
|
||||
'xed-paned.h',
|
||||
'xed-plugins-engine.h',
|
||||
'xed-preferences-dialog.h',
|
||||
'xed-print-job.h',
|
||||
'xed-print-preview.h',
|
||||
'xed-settings.h',
|
||||
'xed-status-combo-box.h',
|
||||
'xed-tab-label.h',
|
||||
'xed-ui.h',
|
||||
'xed-utils.h',
|
||||
'xed-view-frame.h',
|
||||
'xed-view-gutter-renderer.h',
|
||||
'xed-window-private.h'
|
||||
]
|
||||
|
||||
public_headers = [
|
||||
'xed-app.h',
|
||||
'xed-app-activatable.h',
|
||||
'xed-commands.h',
|
||||
'xed-debug.h',
|
||||
'xed-document.h',
|
||||
'xed-encodings-combo-box.h',
|
||||
'xed-file-chooser-dialog.h',
|
||||
'xed-message-bus.h',
|
||||
'xed-message-type.h',
|
||||
'xed-message.h',
|
||||
'xed-notebook.h',
|
||||
'xed-panel.h',
|
||||
'xed-progress-info-bar.h',
|
||||
'xed-searchbar.h',
|
||||
'xed-statusbar.h',
|
||||
'xed-tab.h',
|
||||
'xed-view.h',
|
||||
'xed-view-activatable.h',
|
||||
'xed-window.h',
|
||||
'xed-window-activatable.h'
|
||||
]
|
||||
|
||||
libxed_sources = [
|
||||
'xed-app.c',
|
||||
'xed-app-activatable.c',
|
||||
'xed-view-activatable.c',
|
||||
'xed-window-activatable.c',
|
||||
'xed-close-button.c',
|
||||
'xed-close-confirmation-dialog.c',
|
||||
'xed-commands-documents.c',
|
||||
'xed-commands-edit.c',
|
||||
'xed-commands-file.c',
|
||||
'xed-commands-file-print.c',
|
||||
'xed-commands-help.c',
|
||||
'xed-commands-search.c',
|
||||
'xed-commands-view.c',
|
||||
'xed-debug.c',
|
||||
'xed-dirs.c',
|
||||
'xed-document.c',
|
||||
'xed-documents-panel.c',
|
||||
'xed-encodings-combo-box.c',
|
||||
'xed-encodings-dialog.c',
|
||||
'xed-file-chooser-dialog.c',
|
||||
'xed-history-entry.c',
|
||||
'xed-io-error-info-bar.c',
|
||||
'xed-message-bus.c',
|
||||
'xed-message-type.c',
|
||||
'xed-message.c',
|
||||
'xed-metadata-manager.c',
|
||||
'xed-notebook.c',
|
||||
'xed-paned.c',
|
||||
'xed-panel.c',
|
||||
'xed-plugins-engine.c',
|
||||
'xed-preferences-dialog.c',
|
||||
'xed-print-job.c',
|
||||
'xed-print-preview.c',
|
||||
'xed-progress-info-bar.c',
|
||||
'xed-settings.c',
|
||||
'xed-searchbar.c',
|
||||
'xed-statusbar.c',
|
||||
'xed-status-combo-box.c',
|
||||
'xed-tab.c',
|
||||
'xed-tab-label.c',
|
||||
'xed-utils.c',
|
||||
'xed-view.c',
|
||||
'xed-view-frame.c',
|
||||
'xed-view-gutter-renderer.c',
|
||||
'xed-window.c'
|
||||
]
|
||||
|
||||
xed_enums = gnome.mkenums(
|
||||
'xed-enum-types',
|
||||
sources : public_headers,
|
||||
c_template : 'xed-enum-types.c.template',
|
||||
h_template : 'xed-enum-types.h.template',
|
||||
identifier_prefix : 'Xed',
|
||||
symbol_prefix : 'xed'
|
||||
)
|
||||
|
||||
xed_marshal = gnome.genmarshal(
|
||||
'xed-marshal',
|
||||
sources: 'xed-marshal.list',
|
||||
prefix: 'xed_marshal'
|
||||
)
|
||||
|
||||
xed_resources = gnome.compile_resources(
|
||||
'xed-resources', 'resources/xed.gresource.xml',
|
||||
source_dir: ['resources', 'resources/css', 'resources/ui'],
|
||||
c_name: 'xed'
|
||||
)
|
||||
|
||||
xed_deps = [
|
||||
config_h,
|
||||
gio,
|
||||
glib,
|
||||
gtk,
|
||||
gtksourceview,
|
||||
libpeas,
|
||||
libpeas_gtk,
|
||||
libxml,
|
||||
math,
|
||||
xapp,
|
||||
X11
|
||||
]
|
||||
|
||||
libxed = library(
|
||||
'xed',
|
||||
libxed_sources + private_headers + public_headers + xed_enums + xed_marshal + xed_resources,
|
||||
dependencies: xed_deps,
|
||||
include_directories: include_dirs,
|
||||
install: true,
|
||||
install_dir: join_paths(libdir, 'xed')
|
||||
)
|
||||
|
||||
install_headers(
|
||||
public_headers,
|
||||
subdir: 'xed'
|
||||
)
|
||||
|
||||
libxed_dep = declare_dependency(
|
||||
dependencies: xed_deps,
|
||||
link_with: libxed,
|
||||
link_args: ['-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now'],
|
||||
include_directories: [include_dirs, include_directories('.')]
|
||||
)
|
||||
|
||||
executable(
|
||||
'xed',
|
||||
xed_sources,
|
||||
dependencies: libxed_dep,
|
||||
install_rpath: join_paths(prefix, libdir, 'xed'),
|
||||
install: true
|
||||
)
|
||||
|
||||
gir = gnome.generate_gir(
|
||||
libxed,
|
||||
namespace: 'Xed',
|
||||
nsversion: '1.0',
|
||||
sources: public_headers + libxed_sources + xed_enums + xed_marshal,
|
||||
identifier_prefix: 'Xed',
|
||||
symbol_prefix: 'xed',
|
||||
includes: ['Gtk-3.0', 'GtkSource-3.0'],
|
||||
install: true,
|
||||
install_dir_typelib: join_paths(libdir, 'xed', 'girepository-1.0'),
|
||||
install_dir_gir: join_paths(datadir, 'xed', 'gir-1.0')
|
||||
)
|
||||
|
||||
pkgconfig.generate(
|
||||
name: 'xed',
|
||||
description: 'xed',
|
||||
filebase: 'xed',
|
||||
version: meson.project_version(),
|
||||
libraries: libxed,
|
||||
requires: [
|
||||
'gtksourceview-3.0',
|
||||
'libpeas-1.0',
|
||||
'libpeas-gtk-1.0'
|
||||
],
|
||||
variables: [
|
||||
'exec_prefix=${prefix}',
|
||||
'pluginsdir=${prefix}/@0@/xed/plugins'.format(libdir)
|
||||
]
|
||||
)
|
|
@ -20,9 +20,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "xed-app-activatable.h"
|
||||
#include "xed-app.h"
|
||||
|
|
|
@ -28,10 +28,7 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -28,20 +28,15 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "xed-close-confirmation-dialog.h"
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include <xed/xed-app.h>
|
||||
#include <xed/xed-document.h>
|
||||
#include <xed/xed-document-private.h>
|
||||
#include <xed/xed-utils.h>
|
||||
#include <xed/xed-window.h>
|
||||
|
||||
#include "xed-close-confirmation-dialog.h"
|
||||
|
||||
/* Properties */
|
||||
enum
|
||||
|
|
|
@ -30,10 +30,7 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "xed-commands.h"
|
||||
|
|
|
@ -30,10 +30,7 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "xed-commands.h"
|
||||
|
|
|
@ -30,10 +30,7 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
|
|
|
@ -30,10 +30,7 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gio/gio.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
|
|
@ -31,10 +31,7 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
|
|
@ -30,10 +30,7 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "xed-commands.h"
|
||||
|
|
|
@ -30,11 +30,9 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "xed-debug.h"
|
||||
|
||||
#define ENABLE_PROFILING
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "xed-dirs.h"
|
||||
|
||||
|
|
|
@ -30,13 +30,9 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
|
@ -1016,8 +1012,8 @@ xed_document_get_short_name_for_display (XedDocument *doc)
|
|||
|
||||
/**
|
||||
* xed_document_set_short_name_for_display:
|
||||
* @doc:
|
||||
* @short_name: (allow-none):
|
||||
* @doc: a #XedDocument
|
||||
* @short_name: (allow-none): the short name to use
|
||||
*/
|
||||
void
|
||||
xed_document_set_short_name_for_display (XedDocument *doc,
|
||||
|
@ -1626,7 +1622,7 @@ xed_document_set_search_context (XedDocument *doc,
|
|||
* xed_document_get_search_context:
|
||||
* @doc: a #XedDocument
|
||||
*
|
||||
* Returns: the current search context of the document,
|
||||
* Returns: (transfer full): the current search context of the document,
|
||||
* or NULL if there is no search context
|
||||
*/
|
||||
GtkSourceSearchContext *
|
||||
|
|
|
@ -76,7 +76,7 @@ gchar *xed_document_get_uri_for_display (XedDocument *doc);
|
|||
gchar *xed_document_get_short_name_for_display (XedDocument *doc);
|
||||
|
||||
void xed_document_set_short_name_for_display (XedDocument *doc,
|
||||
const gchar *name);
|
||||
const gchar *short_name);
|
||||
|
||||
gchar *xed_document_get_content_type (XedDocument *doc);
|
||||
|
||||
|
|
|
@ -28,15 +28,13 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include "xed-documents-panel.h"
|
||||
#include "xed-utils.h"
|
||||
#include "xed-notebook.h"
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#define XED_DOCUMENTS_PANEL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
|
||||
XED_TYPE_DOCUMENTS_PANEL, \
|
||||
|
|
|
@ -29,15 +29,11 @@
|
|||
* $Id: xed-encodings-combo-box.c 6112 2008-01-23 08:26:24Z sfre $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include <glib/gi18n.h>
|
||||
#include <xed/xed-encodings-dialog.h>
|
||||
|
||||
#include "xed-encodings-combo-box.h"
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include <xed/xed-encodings-dialog.h>
|
||||
#include "xed-settings.h"
|
||||
#include "xed-utils.h"
|
||||
|
||||
|
|
|
@ -28,12 +28,8 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtksourceview/gtksource.h>
|
||||
|
||||
|
|
|
@ -31,12 +31,8 @@
|
|||
/* TODO: Override set_extra_widget */
|
||||
/* TODO: add encoding property */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include "xed-file-chooser-dialog.h"
|
||||
|
|
|
@ -28,10 +28,7 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
|
|
@ -32,21 +32,17 @@
|
|||
* Verbose error reporting for file I/O operations (load, save, revert, create)
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gio/gio.h>
|
||||
#include <xed/xed-encodings-combo-box.h>
|
||||
|
||||
#include "xed-settings.h"
|
||||
#include "xed-utils.h"
|
||||
#include "xed-document.h"
|
||||
#include "xed-io-error-info-bar.h"
|
||||
#include <xed/xed-encodings-combo-box.h>
|
||||
|
||||
#define MAX_URI_IN_DIALOG_LENGTH 50
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
BOOLEAN:NONE
|
||||
BOOLEAN:VOID
|
||||
BOOLEAN:OBJECT
|
||||
VOID:BOOLEAN
|
||||
VOID:BOOLEAN,POINTER
|
||||
|
|
|
@ -32,14 +32,14 @@ XedMessageType *xed_message_type_new (const gchar *object_path,
|
|||
XedMessageType *xed_message_type_new_valist (const gchar *object_path,
|
||||
const gchar *method,
|
||||
guint num_optional,
|
||||
va_list va_args);
|
||||
va_list var_args);
|
||||
|
||||
void xed_message_type_set (XedMessageType *message_type,
|
||||
guint num_optional,
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
void xed_message_type_set_valist (XedMessageType *message_type,
|
||||
guint num_optional,
|
||||
va_list va_args);
|
||||
va_list var_args);
|
||||
|
||||
XedMessageType *xed_message_type_ref (XedMessageType *message_type);
|
||||
void xed_message_type_unref (XedMessageType *message_type);
|
||||
|
|
|
@ -35,10 +35,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
@ -984,6 +981,13 @@ xed_notebook_remove_all_tabs (XedNotebook *nb)
|
|||
gtk_container_foreach (GTK_CONTAINER (nb), (GtkCallback)remove_tab, nb);
|
||||
}
|
||||
|
||||
/**
|
||||
* xed_notebook_get_all_tabs:
|
||||
* @nb: a #XedNotebook
|
||||
*
|
||||
* Gets all #XedTab from @nb.
|
||||
* Returns: (element-type GtkWidget) (transfer container): #GList of all tabs
|
||||
*/
|
||||
GList *
|
||||
xed_notebook_get_all_tabs (XedNotebook *nb)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "xed-paned.h"
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue