AC_SUBST(RAW_CFLAGS)
AC_SUBST(RAW_LIBS)
+# libgspell support
+# ----------------------------------------------------------------------
+
+AC_ARG_ENABLE([spell],
+ AC_HELP_STRING([--disable-spell], [disable libgspell support]),
+ [libgspell=$enableval], [libgspell=auto])
+
+if test "x${libgspell}" != "xno" -a "x${gtk3}" != "xno"; then
+ PKG_CHECK_MODULES(SPELL, [gspell-1 >= 1.6],
+ [
+ HAVE_SPELL=yes
+ AC_DEFINE(HAVE_SPELL, 1, [define to enable libgspell support])
+ ],
+ [
+ HAVE_SPELL=no
+ AC_MSG_WARN([$SPELL_PKG_ERRORS])
+ ])
+else
+ HAVE_SPELL=disabled
+fi
+
+AM_CONDITIONAL(HAVE_SPELL, [test "x$HAVE_SPELL" = xyes])
+AC_SUBST(SPELL_CFLAGS)
+AC_SUBST(SPELL_LIBS)
+
# libffmpegthumbnailer support
# ----------------------------------------------------------------------
LibRaw: $HAVE_RAW
Libjxl: $HAVE_JPEGXL
Libarchive: $HAVE_ARCHIVE
+ Spelling $HAVE_SPELL
Documentation:
Doxygen: $DX_DOXYGEN
</itemizedlist>
<para />
</section>
+ <section id="SpellCheck">
+ <title>Spelling Checks</title>
+ <para>If selected, spelling checks will be enabled on the following panes:</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <guilabel>Title</guilabel>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <guilabel>Comment</guilabel>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <guilabel>Headline</guilabel>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para />
+ </section>
<section id="PreLoadMetadata">
<title>Pre-load metadata</title>
<itemizedlist>
$(CLUTTER_GTK_CFLAGS) \
$(FFMPEGTHUMBNAILER_CFLAGS) \
$(PDF_CFLAGS) \
+ $(SPELL_CFLAGS) \
$(HEIF_CFLAGS) \
$(WEBP_CFLAGS) \
$(J2K_CFLAGS) \
$(CLUTTER_GTK_CFLAGS) \
$(FFMPEGTHUMBNAILER_CFLAGS) \
$(PDF_CFLAGS) \
+ $(SPELL_CFLAGS) \
$(HEIF_CFLAGS) \
$(WEBP_CFLAGS) \
$(J2K_CFLAGS) \
zonedetect.c \
zonedetect.h
-geeqie_LDADD = $(GTK_LIBS) $(GLIB_LIBS) $(INTLLIBS) $(JPEG_LIBS) $(TIFF_LIBS) $(LCMS_LIBS) $(EXIV2_LIBS) $(LIBCHAMPLAIN_LIBS) $(LIBCHAMPLAIN_GTK_LIBS) $(LUA_LIBS) $(CLUTTER_LIBS) $(CLUTTER_GTK_LIBS) $(FFMPEGTHUMBNAILER_LIBS) $(PDF_LIBS) $(HEIF_LIBS) $(WEBP_LIBS) $(DJVU_LIBS) $(J2K_LIBS) $(RAW_LIBS) $(JPEGXL_LIBS) $(ARCHIVE_LIBS)
+geeqie_LDADD = $(GTK_LIBS) $(GLIB_LIBS) $(INTLLIBS) $(JPEG_LIBS) $(TIFF_LIBS) $(LCMS_LIBS) $(EXIV2_LIBS) $(LIBCHAMPLAIN_LIBS) $(LIBCHAMPLAIN_GTK_LIBS) $(LUA_LIBS) $(CLUTTER_LIBS) $(CLUTTER_GTK_LIBS) $(FFMPEGTHUMBNAILER_LIBS) $(PDF_LIBS) $(HEIF_LIBS) $(WEBP_LIBS) $(SPELL_LIBS) $(DJVU_LIBS) $(J2K_LIBS) $(RAW_LIBS) $(JPEGXL_LIBS) $(ARCHIVE_LIBS)
EXTRA_DIST = \
$(extra_SLIK)
#include "rcfile.h"
#include "layout.h"
+#ifdef HAVE_SPELL
+#include <gspell/gspell.h>
+#endif
+
static void bar_pane_comment_changed(GtkTextBuffer *buffer, gpointer data);
/*
PaneCommentData *pcd;
GtkWidget *scrolled;
GtkTextBuffer *buffer;
+#ifdef HAVE_SPELL
+ GspellTextView *gspell_view;
+#endif
pcd = g_new0(PaneCommentData, 1);
G_CALLBACK(bar_pane_comment_populate_popup), pcd);
gtk_widget_show(pcd->comment_view);
+#ifdef HAVE_SPELL
+#if GTK_CHECK_VERSION(3,20,0)
+ if (g_strcmp0(key, "Xmp.xmp.Rating") != 0)
+ {
+ if (options->metadata.check_spelling)
+ {
+ gspell_view = gspell_text_view_get_from_gtk_text_view(GTK_TEXT_VIEW(pcd->comment_view));
+ gspell_text_view_basic_setup(gspell_view);
+ }
+ }
+#endif
+#endif
+
buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(pcd->comment_view));
g_signal_connect(G_OBJECT(buffer), "changed",
G_CALLBACK(bar_pane_comment_changed), pcd);
options->metadata.keywords_case_sensitive = FALSE;
options->metadata.write_orientation = TRUE;
options->metadata.sidecar_extended_name = FALSE;
+ options->metadata.check_spelling = TRUE;
options->show_icon_names = TRUE;
options->show_star_rating = FALSE;
gboolean keywords_case_sensitive;
gboolean write_orientation;
gboolean sidecar_extended_name;
+
+ gboolean check_spelling;
} metadata;
/* Stereo */
options->metadata.confirm_on_dir_change = c_options->metadata.confirm_on_dir_change;
options->metadata.keywords_case_sensitive = c_options->metadata.keywords_case_sensitive;
options->metadata.write_orientation = c_options->metadata.write_orientation;
+ options->metadata.check_spelling = c_options->metadata.check_spelling;
options->stereo.mode = (c_options->stereo.mode & (PR_STEREO_HORIZ | PR_STEREO_VERT | PR_STEREO_FIXED | PR_STEREO_ANAGLYPH | PR_STEREO_HALF)) |
(c_options->stereo.tmp.mirror_right ? PR_STEREO_MIRROR_RIGHT : 0) |
(c_options->stereo.tmp.flip_right ? PR_STEREO_FLIP_RIGHT : 0) |
pref_checkbox_new_int(group, _("Write metadata on directory change"),
options->metadata.confirm_on_dir_change, &c_options->metadata.confirm_on_dir_change);
+#ifdef HAVE_SPELL
+#if GTK_CHECK_VERSION(3,20,0)
+ group = pref_group_new(vbox, FALSE, _("Spelling checks"), GTK_ORIENTATION_VERTICAL);
+
+ ct_button = pref_checkbox_new_int(group, _("Check spelling -Requires restart"), options->metadata.check_spelling, &c_options->metadata.check_spelling);
+#endif
+#endif
+
group = pref_group_new(vbox, FALSE, _("Pre-load metadata"), GTK_ORIENTATION_VERTICAL);
ct_button = pref_checkbox_new_int(group, _("Read metadata in background"),
WRITE_NL(); WRITE_BOOL(*options, metadata.confirm_on_dir_change);
WRITE_NL(); WRITE_BOOL(*options, metadata.keywords_case_sensitive);
WRITE_NL(); WRITE_BOOL(*options, metadata.write_orientation);
+ WRITE_NL(); WRITE_BOOL(*options, metadata.check_spelling);
WRITE_NL(); WRITE_INT(*options, stereo.mode);
WRITE_NL(); WRITE_INT(*options, stereo.fsmode);
if (READ_BOOL(*options, metadata.confirm_on_dir_change)) continue;
if (READ_BOOL(*options, metadata.keywords_case_sensitive)) continue;
if (READ_BOOL(*options, metadata.write_orientation)) continue;
+ if (READ_BOOL(*options, metadata.check_spelling)) continue;
if (READ_INT(*options, stereo.mode)) continue;
if (READ_INT(*options, stereo.fsmode)) continue;