X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=blobdiff_plain;f=src%2Fbar_comment.c;h=5dbc5b54ef499d6aeb26f09194b96e72be9f1b02;hp=5047077321ff41e90c7893b868e16455f43281f5;hb=c78e429c2949356b893b6c7d5c692c2a4ccaa447;hpb=6d541232b1c2c670ff9417b9797e16ca56439318 diff --git a/src/bar_comment.c b/src/bar_comment.c index 50470773..5dbc5b54 100644 --- a/src/bar_comment.c +++ b/src/bar_comment.c @@ -30,6 +30,10 @@ #include "rcfile.h" #include "layout.h" +#ifdef HAVE_SPELL +#include +#endif + static void bar_pane_comment_changed(GtkTextBuffer *buffer, gpointer data); /* @@ -253,6 +257,9 @@ static GtkWidget *bar_pane_comment_new(const gchar *id, const gchar *title, cons PaneCommentData *pcd; GtkWidget *scrolled; GtkTextBuffer *buffer; +#ifdef HAVE_SPELL + GspellTextView *gspell_view; +#endif pcd = g_new0(PaneCommentData, 1); @@ -289,6 +296,19 @@ static GtkWidget *bar_pane_comment_new(const gchar *id, const gchar *title, cons 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);