summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2014-05-11 06:46:12 -0400
committerTingPing <tingping@tingping.se>2014-05-11 06:46:12 -0400
commit1265eee9e5c7bda90217e943b4a4b8a5729fa15f (patch)
treeaa96354fe95370740ff3517f6ec06a2b8d4f2543
parente5f7441bae4bb2b0cf154a4f3862cc99c59250e4 (diff)
Fix spell check on OSX
-rw-r--r--osx/hexchat.bundle7
-rw-r--r--src/fe-gtk/sexy-spell-entry.c10
2 files changed, 15 insertions, 2 deletions
diff --git a/osx/hexchat.bundle b/osx/hexchat.bundle
index 58baac57..972482ce 100644
--- a/osx/hexchat.bundle
+++ b/osx/hexchat.bundle
@@ -20,6 +20,13 @@
     ${prefix}/lib/hexchat/plugins/*.so
   </binary>
 
+  <binary>
+    ${prefix}/lib/libenchant.dylib
+  </binary>
+  <data>
+    ${prefix}/share/myspell/dicts
+  </data>
+
   <binary dest="${bundle}/Contents/MacOS">
     ${prefix}/bin/python
   </binary>
diff --git a/src/fe-gtk/sexy-spell-entry.c b/src/fe-gtk/sexy-spell-entry.c
index 8345c7d9..6ad7ab49 100644
--- a/src/fe-gtk/sexy-spell-entry.c
+++ b/src/fe-gtk/sexy-spell-entry.c
@@ -162,8 +162,14 @@ initialize_enchant ()
 	{
 #ifndef WIN32
 		enchant = g_module_open("libenchant.so.1", 0);
-				if (enchant == NULL)
-					return;
+		if (enchant == NULL)
+		{
+#ifdef __APPLE__
+			enchant = g_module_open("libenchant.dylib", 0);
+			if (enchant == NULL)
+#endif
+				return;
+		}
 #else
 		return;
 #endif