From 8a8a9a0f30ba6911c9d638a9d3859ab12d05b3c8 Mon Sep 17 00:00:00 2001 From: Dom Lachowicz Date: Sat, 24 Jan 2009 15:23:35 +0000 Subject: 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 --- src/ispell/ispell_checker.cpp | 12 ++++++++++++ src/myspell/myspell_checker.cpp | 10 ++++++++++ src/uspell/uspell_provider.cpp | 10 ++++++++++ 3 files changed, 32 insertions(+) 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 -- cgit v1.2.1