diff options
author | Dom Lachowicz <domlachowicz@gmail.com> | 2009-01-24 15:23:35 +0000 |
---|---|---|
committer | Dom Lachowicz <domlachowicz@gmail.com> | 2009-01-24 15:23:35 +0000 |
commit | 8a8a9a0f30ba6911c9d638a9d3859ab12d05b3c8 (patch) | |
tree | 15025ee6be52dd5e9d71ad2dca090bdcd910a747 | |
parent | f3707f5740bbc69e127628394cc34401e41b34dc (diff) | |
download | enchant-8a8a9a0f30ba6911c9d638a9d3859ab12d05b3c8.tar.gz |
look for myspell/uspell dictionaries in XDG data directories
git-svn-id: svn+ssh://svn.abisource.com/svnroot/enchant/trunk@25544 bcba8976-2d24-0410-9c9c-aab3bd5fdfd6
-rw-r--r-- | src/ispell/ispell_checker.cpp | 12 | ||||
-rw-r--r-- | src/myspell/myspell_checker.cpp | 10 | ||||
-rw-r--r-- | src/uspell/uspell_provider.cpp | 10 |
3 files changed, 32 insertions, 0 deletions
diff --git a/src/ispell/ispell_checker.cpp b/src/ispell/ispell_checker.cpp index 98e9b61..bfdc6fb 100644 --- a/src/ispell/ispell_checker.cpp +++ b/src/ispell/ispell_checker.cpp @@ -320,6 +320,18 @@ ispell_checker_get_dictionary_dirs (void) g_slist_free (config_dirs); } +#if 0 + { + const gchar* const * system_data_dirs = g_get_system_data_dirs (); + const gchar* const * iter; + + for (iter = system_data_dirs; *iter; iter++) + { + dirs = g_slist_append (dirs, g_build_filename (*iter, "ispell", "dicts", NULL)); + } + } +#endif + /* until I work out how to link the modules against enchant in MacOSX - fjf */ #ifndef XP_TARGET_COCOA diff --git a/src/myspell/myspell_checker.cpp b/src/myspell/myspell_checker.cpp index d6313b8..dcadb43 100644 --- a/src/myspell/myspell_checker.cpp +++ b/src/myspell/myspell_checker.cpp @@ -237,6 +237,16 @@ myspell_checker_get_dictionary_dirs (void) g_slist_free (config_dirs); } + { + const gchar* const * system_data_dirs = g_get_system_data_dirs (); + const gchar* const * iter; + + for (iter = system_data_dirs; *iter; iter++) + { + dirs = g_slist_append (dirs, g_build_filename (*iter, "myspell", "dicts", NULL)); + } + } + /* until I work out how to link the modules against enchant in MacOSX - fjf */ #ifndef XP_TARGET_COCOA diff --git a/src/uspell/uspell_provider.cpp b/src/uspell/uspell_provider.cpp index 291d939..f41bf53 100644 --- a/src/uspell/uspell_provider.cpp +++ b/src/uspell/uspell_provider.cpp @@ -70,6 +70,16 @@ uspell_checker_get_dictionary_dirs (void) g_slist_free (config_dirs); } + { + const gchar* const * system_data_dirs = g_get_system_data_dirs (); + const gchar* const * iter; + + for (iter = system_data_dirs; *iter; iter++) + { + dirs = g_slist_append (dirs, g_build_filename (*iter, "uspell", "dicts", NULL)); + } + } + /* until I work out how to link the modules against enchant in MacOSX - fjf */ #ifndef XP_TARGET_COCOA |