summarylogtreecommitdiffstats
path: root/enchant-2.patch
blob: 6767068dc435851ad0004309da0bfa9d8a61f70a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
--- geany-plugins-1.32/spellcheck/src/speller.c.orig	2017-10-17 04:58:25.000000000 +0000
+++ geany-plugins-1.32/spellcheck/src/speller.c	2017-11-23 09:20:27.280196692 +0000
@@ -470,7 +470,7 @@
 	g_return_if_fail(sc_speller_dict != NULL);
 	g_return_if_fail(word != NULL);
 
-	enchant_dict_add_to_pwl(sc_speller_dict, word, -1);
+	enchant_dict_add(sc_speller_dict, word, -1);
 }
 
 gboolean sc_speller_dict_check(const gchar *word)
@@ -518,24 +518,6 @@
 	if (sc_speller_dict != NULL)
 		enchant_broker_free_dict(sc_speller_broker, sc_speller_dict);
 
-#if HAVE_ENCHANT_1_5
-	{
-		const gchar *old_path;
-		gchar *new_path;
-
-		/* add custom dictionary path for myspell (primarily used on Windows) */
-		old_path = enchant_broker_get_param(sc_speller_broker, "enchant.myspell.dictionary.path");
-		if (old_path != NULL)
-			new_path = g_strconcat(
-				old_path, G_SEARCHPATH_SEPARATOR_S, sc_info->dictionary_dir, NULL);
-		else
-			new_path = sc_info->dictionary_dir;
-
-		enchant_broker_set_param(sc_speller_broker, "enchant.myspell.dictionary.path", new_path);
-		if (new_path != sc_info->dictionary_dir)
-			g_free(new_path);
-	}
-#endif
 	create_dicts_array();
 
 	/* Check if the stored default dictionary is (still) available, fall back to the first
--- geany-plugins-1.32/build/spellcheck.m4.orig	2017-07-16 19:00:27.000000000 +0000
+++ geany-plugins-1.32/build/spellcheck.m4	2018-01-21 21:56:47.533646705 +0000
@@ -4,11 +4,11 @@
 
     ENCHANT_VERSION=1.3
     OPT_ENCHANT_VERSION=1.5
-    PKG_CHECK_MODULES([ENCHANT], [enchant >= ${OPT_ENCHANT_VERSION}],
+    PKG_CHECK_MODULES([ENCHANT], [enchant-2 >= ${OPT_ENCHANT_VERSION}],
                       have_enchant_1_5=yes,
                       have_enchant_1_5=no)
     GP_CHECK_PLUGIN_DEPS([spellcheck], [ENCHANT],
-                         [enchant >= ${ENCHANT_VERSION}])
+                         [enchant-2 >= ${ENCHANT_VERSION}])
 
     AM_CONDITIONAL([HAVE_ENCHANT_1_5], [test "$have_enchant_1_5" = yes])
     GP_COMMIT_PLUGIN_STATUS([Spellcheck])