aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-05-15 15:36:45 +0900
committerMike Blumenkrantz <zmike@samsung.com>2018-08-02 09:59:31 -0400
commit2c52afb6f4d8dc2a99d03d144b755346a710e25f (patch)
tree33db15dadea68354b48437ea2aba337d731df9ca
parentmove config/ to data/config/ (diff)
downloadenlightenment-2c52afb6f4d8dc2a99d03d144b755346a710e25f.tar.gz
input method conf dialog - fix filtering of imc's to search path
if exe is not a full path it'd be filtered out... so fix and do a path search to show imc's that can work. @fix
-rw-r--r--src/modules/conf_intl/e_int_config_imc.c39
1 files changed, 36 insertions, 3 deletions
diff --git a/src/modules/conf_intl/e_int_config_imc.c b/src/modules/conf_intl/e_int_config_imc.c
index 64aa15a66..d49159a12 100644
--- a/src/modules/conf_intl/e_int_config_imc.c
+++ b/src/modules/conf_intl/e_int_config_imc.c
@@ -347,10 +347,43 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
{
Efreet_Desktop *desktop;
- if (!ecore_file_exists(imc->e_im_setup_exec))
+ if (imc->e_im_setup_exec[0] == '/')
{
- e_intl_input_method_config_free(imc);
- goto out;
+ if (!ecore_file_exists(imc->e_im_setup_exec))
+ {
+ e_intl_input_method_config_free(imc);
+ goto out;
+ }
+ }
+ else
+ {
+ const char *env = getenv("PATH");
+ char **split, buf[PATH_MAX];
+ Eina_Bool exec_found = EINA_FALSE;
+
+ if (!env)
+ {
+ e_intl_input_method_config_free(imc);
+ goto out;
+ }
+ split = eina_str_split(env, ":", 0);
+ for (i = 0; split[i] != NULL; i++)
+ {
+ snprintf(buf, sizeof(buf), "%s/%s", split[i], imc->e_im_setup_exec);
+
+ if (ecore_file_exists(buf) && ecore_file_can_exec(buf))
+ {
+ exec_found = EINA_TRUE;
+ break;
+ }
+ }
+ free(split[0]);
+ free(split);
+ if (!exec_found)
+ {
+ e_intl_input_method_config_free(imc);
+ goto out;
+ }
}
desktop = efreet_util_desktop_exec_find(imc->e_im_setup_exec);
if (desktop)