mirror of https://github.com/GNOME/gimp.git
Bug #658816 - Add a spellchecker to the comment editor
This is an initial version and can be improved. Something is better than nothing. :)
This commit is contained in:
parent
159ee0381d
commit
978c96bbc6
|
@ -201,6 +201,10 @@ gimp_2_7_LDADD = \
|
|||
$(GIMPRC)
|
||||
|
||||
|
||||
if HAVE_GTKSPELL
|
||||
gimp_2_7_LDADD += $(GTKSPELL_LIBS)
|
||||
endif
|
||||
|
||||
if ENABLE_GIMP_CONSOLE
|
||||
|
||||
gimp_console_2_7_SOURCES = $(libapp_sources) main.c
|
||||
|
|
|
@ -14,6 +14,10 @@ INCLUDES = \
|
|||
$(GTK_CFLAGS) \
|
||||
-I$(includedir)
|
||||
|
||||
if HAVE_GTKSPELL
|
||||
INCLUDES += $(GTKSPELL_CFLAGS)
|
||||
endif
|
||||
|
||||
noinst_LIBRARIES = libappwidgets.a
|
||||
|
||||
libappwidgets_a_sources = \
|
||||
|
|
|
@ -25,6 +25,10 @@
|
|||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#ifdef HAVE_GTKSPELL
|
||||
#include <gtkspell/gtkspell.h>
|
||||
#endif
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
|
@ -100,6 +104,11 @@ gimp_image_comment_editor_init (GimpImageCommentEditor *editor)
|
|||
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (text_view), 6);
|
||||
gtk_text_view_set_right_margin (GTK_TEXT_VIEW (text_view), 6);
|
||||
|
||||
#ifdef HAVE_GTKSPELL
|
||||
/* FIXME: Set language here */
|
||||
gtkspell_new_attach (GTK_TEXT_VIEW (text_view), NULL, NULL);
|
||||
#endif
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (scrolled_window), text_view);
|
||||
gtk_widget_show (text_view);
|
||||
|
||||
|
|
24
configure.ac
24
configure.ac
|
@ -62,6 +62,7 @@ m4_define([libgudev_required_version], [167])
|
|||
m4_define([exif_required_version], [0.6.15])
|
||||
m4_define([lcms_required_version], [1.16])
|
||||
m4_define([libpng_required_version], [1.2.37])
|
||||
m4_define([gtkspell_required_version], [2.0.16])
|
||||
|
||||
|
||||
AC_INIT([GIMP], [gimp_version],
|
||||
|
@ -1284,6 +1285,28 @@ AC_SUBST(WEB_PAGE)
|
|||
AM_CONDITIONAL(HAVE_WEBKIT, test "x$have_webkit" = xyes)
|
||||
|
||||
|
||||
####################
|
||||
# Check for gtkspell
|
||||
####################
|
||||
|
||||
AC_ARG_WITH(gtkspell, [ --without-gtkspell don't use a spellchecker])
|
||||
|
||||
have_gtkspell=no
|
||||
if test "x$with_gtkspell" != xno; then
|
||||
PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= gtkspell_required_version,
|
||||
AC_DEFINE(HAVE_GTKSPELL, 1,
|
||||
[Define to 1 if GtkSpell is available])
|
||||
have_gtkspell=yes,
|
||||
have_gtkspell="no (GtkSpell not found)")
|
||||
else
|
||||
have_gtkspell="no (GtkSpell support disabled)"
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(HAVE_GTKSPELL, test "x$have_gtkspell" = xyes)
|
||||
AC_SUBST(GTKSPELL_LIBS)
|
||||
AC_SUBST(GTKSPELL_CFLAGS)
|
||||
|
||||
|
||||
###################
|
||||
# Check for librsvg
|
||||
###################
|
||||
|
@ -2255,6 +2278,7 @@ Optional Features:
|
|||
Optional Plug-Ins:
|
||||
Ascii Art: $have_libaa
|
||||
Help Browser: $have_webkit
|
||||
Spellchecker: $have_gtkspell
|
||||
LCMS: $have_lcms
|
||||
JPEG: $jpeg_ok
|
||||
JPEG 2000: $have_jp2
|
||||
|
|
Loading…
Reference in New Issue