changeset 29597:140990e07e01

We're not going to support aspell dictionaries on Windows anymore.
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 15 Mar 2010 22:00:43 +0000
parents d4ebabbfdeb6
children 7df13b4b49a3
files ChangeLog.win32 pidgin/win32/winpidgin.c pidgin/win32/wspell.c
diffstat 3 files changed, 4 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog.win32	Mon Mar 15 21:54:23 2010 +0000
+++ b/ChangeLog.win32	Mon Mar 15 22:00:43 2010 +0000
@@ -7,8 +7,8 @@
 	  directory instead of the installation directory.
 	* NSS SSL Library upgraded to 3.12.5 (thanks to Berke Viktor)
 	* GtkSpell upgraded to 2.0.16, changing the spellchecking backend to
-	  enchant.  This means that myspell, hunspell (OpenOffice) and existing
-	  aspell dictionaries can be used.
+	  enchant.  This means that myspell and hunspell (OpenOffice)
+	  dictionaries can be used (previously used aspell dictionaries won't).
 
 version 2.6.6 (02/18/2010):
 	* Installer translations for: Norwegian nynorsk
--- a/pidgin/win32/winpidgin.c	Mon Mar 15 21:54:23 2010 +0000
+++ b/pidgin/win32/winpidgin.c	Mon Mar 15 22:00:43 2010 +0000
@@ -198,9 +198,9 @@
 }
 
 static void portable_mode_dll_prep(const wchar_t *pidgin_dir) {
-	/* need to be able to fit MAX_PATH + "PIDGIN_ASPELL_DIR=\\Aspell\\bin" in path2 */
+	/* need to be able to fit MAX_PATH + "PURPLEHOME=" in path2 */
 	wchar_t path[MAX_PATH + 1];
-	wchar_t path2[MAX_PATH + 33];
+	wchar_t path2[MAX_PATH + 12];
 	const wchar_t *prev = NULL;
 
 	/* We assume that GTK+ is installed under \\path\to\Pidgin\..\GTK
@@ -231,10 +231,6 @@
 	wprintf(L"Setting settings dir: %s\n", path2);
 	_wputenv(path2);
 
-	_snwprintf(path2, sizeof(path2) / sizeof(wchar_t), L"PIDGIN_ASPELL_DIR=%s\\Aspell\\bin", path);
-	wprintf(L"%s\n", path2);
-	_wputenv(path2);
-
 	if (!dll_prep(pidgin_dir)) {
 		/* set the GTK+ path to be \\path\to\GTK\bin */
 		wcscat(path, L"\\GTK\\bin");
--- a/pidgin/win32/wspell.c	Mon Mar 15 21:54:23 2010 +0000
+++ b/pidgin/win32/wspell.c	Mon Mar 15 22:00:43 2010 +0000
@@ -95,41 +95,6 @@
 	SetErrorMode(old_error_mode);
 }
 
-static void lookup_aspell_path() {
-	const char *tmp;
-	gchar *aspell_path;
-
-	if ((tmp = g_getenv("PIDGIN_ASPELL_DIR")))
-		aspell_path = g_strdup(tmp);
-	else
-		aspell_path = wpurple_read_reg_string(HKEY_LOCAL_MACHINE, "Software\\Aspell", "Path");
-
-	if (aspell_path != NULL) {
-		char *tmp = g_build_filename(aspell_path, "aspell-15.dll", NULL);
-		if (g_file_test(tmp, G_FILE_TEST_EXISTS)) {
-			const char *path = g_getenv("PATH");
-			purple_debug_info("wspell", "Found Aspell in %s\n", aspell_path);
-
-			g_free(tmp);
-
-			tmp = g_strdup_printf("%s%s%s", (path ? path : ""),
-					(path ? G_SEARCHPATH_SEPARATOR_S : ""),
-					aspell_path);
-
-			g_setenv("PATH", tmp, TRUE);
-
-		} else
-			purple_debug_warning("wspell", "Couldn't find aspell-15.dll\n");
-
-		g_free(tmp);
-		g_free(aspell_path);
-	} else
-		purple_debug_warning("wspell", "Aspell installation not found (this isn't necessarily a problem)\n");
-}
-
 void winpidgin_spell_init() {
-	/* We keep doing the aspell path thing so that previously installed dictionaries still work */
-	lookup_aspell_path();
-
 	load_gtkspell();
 }