diff options
| author | Patrick Storz <eduard.braun2@gmx.de> | 2019-03-30 21:57:35 +0000 |
|---|---|---|
| committer | Patrick Storz <eduard.braun2@gmx.de> | 2019-03-30 21:57:35 +0000 |
| commit | 492b438da65ad813e8803b87e6748536b82fbf8a (patch) | |
| tree | 83cb15284d1395dba975844585c3315c1c0591da /src | |
| parent | Usage of get_program_dir() is more appropriate here (diff) | |
| download | inkscape-492b438da65ad813e8803b87e6748536b82fbf8a.tar.gz inkscape-492b438da65ad813e8803b87e6748536b82fbf8a.zip | |
Aspell: No need to explicitly set prefix anymore
Aspell (at least the MSYS2 version) is properly relocatable these
days.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.cpp | 16 | ||||
| -rw-r--r-- | src/ui/dialog/spellcheck.cpp | 20 |
2 files changed, 1 insertions, 35 deletions
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<Glib::ustring> languages; std::vector<Glib::ustring> 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); |
