From 492b438da65ad813e8803b87e6748536b82fbf8a Mon Sep 17 00:00:00 2001 From: Patrick Storz Date: Sat, 30 Mar 2019 22:57:35 +0100 Subject: Aspell: No need to explicitly set prefix anymore Aspell (at least the MSYS2 version) is properly relocatable these days. --- src/ui/dialog/inkscape-preferences.cpp | 16 +--------------- src/ui/dialog/spellcheck.cpp | 20 -------------------- 2 files changed, 1 insertion(+), 35 deletions(-) (limited to 'src') diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index a3a9baf0f..2b1a23571 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -2309,21 +2309,7 @@ void InkscapePreferences::initPageSpellcheck() std::vector languages; std::vector langValues; - AspellConfig *config = new_aspell_config(); - -#ifdef _WIN32 - // on windows, dictionaries are in a lib/aspell-0.60 subdir off inkscape's executable dir; - // this is some black magick to find out the executable path to give it to aspell - char exeName[MAX_PATH+1]; - GetModuleFileName(NULL, exeName, MAX_PATH); - char *slashPos = strrchr(exeName, '\\'); - if (slashPos) - { - *slashPos = '\0'; - } - // g_print ("%s\n", exeName); - aspell_config_replace(config, "prefix", exeName); -#endif + AspellConfig *config = new_aspell_config(); /* the returned pointer should _not_ need to be deleted */ AspellDictInfoList *dlist = get_aspell_dict_info_list(config); diff --git a/src/ui/dialog/spellcheck.cpp b/src/ui/dialog/spellcheck.cpp index 9d0bb8c67..77b96c696 100644 --- a/src/ui/dialog/spellcheck.cpp +++ b/src/ui/dialog/spellcheck.cpp @@ -311,17 +311,6 @@ SpellCheck::init(SPDesktop *d) gtk_widget_set_sensitive(dictionary_combo, false); start_button.set_sensitive(false); -#ifdef _WIN32 - // on windows, dictionaries are in a lib/aspell-0.60 subdir off inkscape's executable dir; - // this is some black magick to find out the executable path to give it to aspell - char exeName[MAX_PATH+1]; - GetModuleFileName(NULL, exeName, MAX_PATH); - char *slashPos = strrchr(exeName, '\\'); - if (slashPos) - *slashPos = '\0'; - //g_print ("Aspell prefix path: %s\n", exeName); -#endif - _stops = 0; _adds = 0; clearRects(); @@ -329,9 +318,6 @@ SpellCheck::init(SPDesktop *d) #ifdef HAVE_ASPELL { AspellConfig *config = new_aspell_config(); -#ifdef _WIN32 - aspell_config_replace(config, "prefix", exeName); -#endif aspell_config_replace(config, "lang", _lang.c_str()); aspell_config_replace(config, "encoding", "UTF-8"); AspellCanHaveError *ret = new_aspell_speller(config); @@ -346,9 +332,6 @@ SpellCheck::init(SPDesktop *d) if (_lang2 != "") { AspellConfig *config = new_aspell_config(); -#ifdef _WIN32 - aspell_config_replace(config, "prefix", exeName); -#endif aspell_config_replace(config, "lang", _lang2.c_str()); aspell_config_replace(config, "encoding", "UTF-8"); AspellCanHaveError *ret = new_aspell_speller(config); @@ -363,9 +346,6 @@ SpellCheck::init(SPDesktop *d) if (_lang3 != "") { AspellConfig *config = new_aspell_config(); -#ifdef _WIN32 - aspell_config_replace(config, "prefix", exeName); -#endif aspell_config_replace(config, "lang", _lang3.c_str()); aspell_config_replace(config, "encoding", "UTF-8"); AspellCanHaveError *ret = new_aspell_speller(config); -- cgit v1.2.3