discomfitor pushed a commit to branch enlightenment-0.22. http://git.enlightenment.org/core/enlightenment.git/commit/?id=2c52afb6f4d8dc2a99d03d144b755346a710e25f
commit 2c52afb6f4d8dc2a99d03d144b755346a710e25f Author: Carsten Haitzler (Rasterman) <[email protected]> Date: Tue May 15 15:36:45 2018 +0900 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 --- src/modules/conf_intl/e_int_config_imc.c | 39 +++++++++++++++++++++++++++++--- 1 file 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) --
