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/ecore_imf | |
parent | 01af3144d420ea8c7fe4aafefe0402c75944895f (diff) |
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/ecore_imf')
-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; | |||
29 | void | 29 | void |
30 | ecore_imf_module_init(void) | 30 | ecore_imf_module_init(void) |
31 | { | 31 | { |
32 | char *homedir; | ||
33 | char buf[PATH_MAX] = ""; | 32 | char buf[PATH_MAX] = ""; |
33 | char *path; | ||
34 | 34 | ||
35 | pfx = eina_prefix_new(NULL, ecore_imf_init, | 35 | pfx = eina_prefix_new(NULL, ecore_imf_init, |
36 | "ECORE_IMF", "ecore_imf", "checkme", | 36 | "ECORE_IMF", "ecore_imf", "checkme", |
@@ -72,15 +72,24 @@ ecore_imf_module_init(void) | |||
72 | } | 72 | } |
73 | } | 73 | } |
74 | 74 | ||
75 | snprintf(buf, sizeof(buf), "%s/ecore_imf/modules", eina_prefix_lib_get(pfx)); | 75 | path = eina_module_environment_path_get("ECORE_IMF_MODULES_DIR", |
76 | "/ecore_imf/modules"); | ||
77 | if (path) | ||
78 | { | ||
79 | module_list = eina_module_arch_list_get(module_list, path, MODULE_ARCH); | ||
80 | free(path); | ||
81 | } | ||
76 | 82 | ||
77 | module_list = eina_module_arch_list_get(NULL, buf, MODULE_ARCH); | 83 | path = eina_module_environment_path_get("HOME", "/.ecore_imf"); |
78 | homedir = eina_module_environment_path_get("HOME", "/.ecore_imf"); | 84 | if (path) |
79 | if (homedir) | ||
80 | { | 85 | { |
81 | module_list = eina_module_arch_list_get(module_list, homedir, MODULE_ARCH); | 86 | module_list = eina_module_arch_list_get(module_list, path, MODULE_ARCH); |
82 | free(homedir); | 87 | free(path); |
83 | } | 88 | } |
89 | |||
90 | snprintf(buf, sizeof(buf), "%s/ecore_imf/modules", eina_prefix_lib_get(pfx)); | ||
91 | module_list = eina_module_arch_list_get(module_list, buf, MODULE_ARCH); | ||
92 | |||
84 | eina_module_list_load(module_list); | 93 | eina_module_list_load(module_list); |
85 | } | 94 | } |
86 | 95 | ||