[recipes] details: Set up spell checking for the notes field
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] details: Set up spell checking for the notes field
- Date: Sun, 25 Dec 2016 20:04:50 +0000 (UTC)
commit 4a23f03acea49bcdf8742c6fcd25689e450cc9ba
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Dec 25 14:45:23 2016 -0500
details: Set up spell checking for the notes field
This add spell checking using gspell.
src/gr-details-page.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/gr-details-page.c b/src/gr-details-page.c
index d7496c3..27c7ab4 100644
--- a/src/gr-details-page.c
+++ b/src/gr-details-page.c
@@ -25,6 +25,8 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
+#include <gspell/gspell.h>
+
#include "gr-details-page.h"
#include "gr-recipe-store.h"
#include "gr-app.h"
@@ -578,6 +580,8 @@ schedule_save (GtkTextBuffer *buffer, GrDetailsPage *page)
static void
gr_details_page_init (GrDetailsPage *page)
{
+ GspellTextView *gspell_view;
+
gtk_widget_set_has_window (GTK_WIDGET (page), FALSE);
gtk_widget_init_template (GTK_WIDGET (page));
connect_store_signals (page);
@@ -592,6 +596,9 @@ gr_details_page_init (GrDetailsPage *page)
NULL);
g_signal_connect (gtk_text_view_get_buffer (GTK_TEXT_VIEW (page->notes_field)), "changed",
G_CALLBACK (schedule_save), page);
+
+ gspell_view = gspell_text_view_get_from_gtk_text_view (GTK_TEXT_VIEW (page->notes_field));
+ gspell_text_view_basic_setup (gspell_view);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]