diff options
author | Gustavo Sverzut Barbieri <barbieri@gmail.com> | 2013-01-10 05:27:31 +0000 |
---|---|---|
committer | Gustavo Sverzut Barbieri <barbieri@gmail.com> | 2013-01-10 05:27:31 +0000 |
commit | f80eef880678c861f572dddc8825be8d3d4e5265 (patch) | |
tree | 2788e27163051bca707192561a9783819324bd0c /src/lib | |
parent | 01af3144d420ea8c7fe4aafefe0402c75944895f (diff) | |
download | efl-f80eef880678c861f572dddc8825be8d3d4e5265.tar.gz |
efl/ecore_imf: consider ECORE_IMF_MODULES_DIR.
also do the standard eina_prefix_lib_get() usage as the last one.
SVN revision: 82505
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/ecore_imf/ecore_imf_module.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/lib/ecore_imf/ecore_imf_module.c b/src/lib/ecore_imf/ecore_imf_module.c index fa9bd725a7..1aa8934c3d 100644 --- a/src/lib/ecore_imf/ecore_imf_module.c +++ b/src/lib/ecore_imf/ecore_imf_module.c @@ -29,8 +29,8 @@ static Eina_Prefix *pfx = NULL; void ecore_imf_module_init(void) { - char *homedir; char buf[PATH_MAX] = ""; + char *path; pfx = eina_prefix_new(NULL, ecore_imf_init, "ECORE_IMF", "ecore_imf", "checkme", @@ -72,15 +72,24 @@ ecore_imf_module_init(void) } } - snprintf(buf, sizeof(buf), "%s/ecore_imf/modules", eina_prefix_lib_get(pfx)); + path = eina_module_environment_path_get("ECORE_IMF_MODULES_DIR", + "/ecore_imf/modules"); + if (path) + { + module_list = eina_module_arch_list_get(module_list, path, MODULE_ARCH); + free(path); + } - module_list = eina_module_arch_list_get(NULL, buf, MODULE_ARCH); - homedir = eina_module_environment_path_get("HOME", "/.ecore_imf"); - if (homedir) + path = eina_module_environment_path_get("HOME", "/.ecore_imf"); + if (path) { - module_list = eina_module_arch_list_get(module_list, homedir, MODULE_ARCH); - free(homedir); + module_list = eina_module_arch_list_get(module_list, path, MODULE_ARCH); + free(path); } + + snprintf(buf, sizeof(buf), "%s/ecore_imf/modules", eina_prefix_lib_get(pfx)); + module_list = eina_module_arch_list_get(module_list, buf, MODULE_ARCH); + eina_module_list_load(module_list); } |