about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--xxxterm.16
-rw-r--r--xxxterm.c8
-rw-r--r--xxxterm.conf2
3 files changed, 16 insertions, 0 deletions
diff --git a/xxxterm.1 b/xxxterm.1
index 039d38f..e6b6820 100644
--- a/xxxterm.1
+++ b/xxxterm.1
@@ -749,6 +749,10 @@ Using the -n url option on subsequent
 .Nm
 invocations will cause the specified URL to be loaded in a new tab.
 Only a user with identical UID and GID can use this option.
+.It Cm enable_spell_checking
+Enables spell checking. Preferred languages can be set using 
+.Cm spell_check_languages 
+option.
 .It Cm fancy_bar
 Enables a backward, forward, and stop button to the toolbar.
 Additionally if
@@ -864,6 +868,8 @@ If there is a URL specified it will be opened in a new tab in the already
 running
 .Nm
 session.
+.It Cm spell_check_languages
+The languages to be used for spell checking, separated by commas. For example, en_US.
 .It Cm ssl_ca_file
 If set to a valid PEM file
 all server certificates will be validated against it.
diff --git a/xxxterm.c b/xxxterm.c
index 2218696..8308aa3 100644
--- a/xxxterm.c
+++ b/xxxterm.c
@@ -519,6 +519,8 @@ int		guess_search = 0;
 int		dns_prefetch = FALSE;
 gint		max_connections = 25;
 gint		max_host_connections = 5;
+gint		enable_spell_checking = 0;
+char		*spell_check_languages = NULL;
 
 struct settings;
 struct key_binding;
@@ -664,6 +666,8 @@ struct settings {
 	{ "window_height",		XT_S_INT, 0,		&window_height, NULL, NULL },
 	{ "window_width",		XT_S_INT, 0,		&window_width, NULL, NULL },
 	{ "work_dir",			XT_S_STR, 0, NULL, NULL,&s_work_dir },
+	{ "enable_spell_checking",	XT_S_INT, 0,		&enable_spell_checking, NULL, NULL },
+	{ "spell_check_languages",	XT_S_STR, 0, NULL, &spell_check_languages, NULL },
 
 	/* runtime settings */
 	{ "alias",			XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_alias },
@@ -6963,6 +6967,10 @@ setup_webkit(struct tab *t)
 	    "enable-plugins", enable_plugins, (char *)NULL);
 	g_object_set(G_OBJECT(t->settings),
 	    "javascript-can-open-windows-automatically", enable_scripts, (char *)NULL);
+	g_object_set(G_OBJECT(t->settings),
+	    "enable_spell_checking", enable_spell_checking, (char *)NULL);
+	g_object_set(G_OBJECT(t->settings),
+	    "spell_checking_languages", spell_check_languages, (char *)NULL);
 	g_object_set(G_OBJECT(t->wv),
 	    "full-content-zoom", TRUE, (char *)NULL);
 	adjustfont_webkit(t, XT_FONT_SET);
diff --git a/xxxterm.conf b/xxxterm.conf
index 81c4744..e1be278 100644
--- a/xxxterm.conf
+++ b/xxxterm.conf
@@ -28,6 +28,8 @@
 # guess_search		= 0
 # max_host_connections	= 5
 # max_connections	= 25
+# enable_spell_checking	= 0
+# spell_check_languages = en_US
 
 #
 # resource_dir		= /usr/local/share/xxxterm/