summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/text-edit.cpp
diff options
context:
space:
mode:
authorShlomi Fish <shlomif@shlomifish.org>2015-10-26 22:50:52 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2015-10-26 22:50:52 +0000
commit0d4e511c524d9102d90adbf2defea4f644eb3edd (patch)
treeffd9da7dadc59fa46ca91fa123659f5271214614 /src/ui/dialog/text-edit.cpp
parentExtensions. Fixed 'none' setting in flow control dropdown. Fixes bug #1509580 (diff)
downloadinkscape-0d4e511c524d9102d90adbf2defea4f644eb3edd.tar.gz
inkscape-0d4e511c524d9102d90adbf2defea4f644eb3edd.zip
add gtk3 experimental support in CMake
Fixed bugs: - https://launchpad.net/bugs/1509969 (bzr r14430)
Diffstat (limited to 'src/ui/dialog/text-edit.cpp')
-rw-r--r--src/ui/dialog/text-edit.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp
index 7575cc854..cf53e1441 100644
--- a/src/ui/dialog/text-edit.cpp
+++ b/src/ui/dialog/text-edit.cpp
@@ -175,6 +175,19 @@ TextEdit::TextEdit()
gtk_text_view_set_wrap_mode ((GtkTextView *) text_view, GTK_WRAP_WORD);
#ifdef WITH_GTKSPELL
+#ifdef WITH_GTKMM_3_0
+/*
+ TODO: Use computed xml:lang attribute of relevant element, if present, to specify the
+ language (either as 2nd arg of gtkspell_new_attach, or with explicit
+ gtkspell_set_language call in; see advanced.c example in gtkspell docs).
+ onReadSelection looks like a suitable place.
+*/
+ GtkSpellChecker * speller = gtk_spell_checker_new();
+
+ if (! gtk_spell_checker_attach(speller, GTK_TEXT_VIEW(text_view))) {
+ g_print("gtkspell error:\n");
+ }
+#else
GError *error = NULL;
/*
@@ -188,6 +201,7 @@ TextEdit::TextEdit()
g_error_free(error);
}
#endif
+#endif
gtk_widget_set_size_request (text_view, -1, 64);
gtk_text_view_set_editable (GTK_TEXT_VIEW (text_view), TRUE);