forked from enlightenment/enlightenment
fix memory problem with input_method listing
SVN revision: 17588
This commit is contained in:
parent
609a553581
commit
acad00c68c
|
@ -488,7 +488,7 @@ e_config_init(void)
|
|||
e_config->menu_eap_name_show = 1;
|
||||
e_config->menu_eap_generic_show = 1;
|
||||
e_config->menu_eap_comment_show = 0;
|
||||
e_config->input_method = NULL;
|
||||
e_config->input_method = NULL;
|
||||
|
||||
{
|
||||
E_Config_Module *em;
|
||||
|
|
|
@ -222,7 +222,7 @@ e_intl_input_method_set(const char *method)
|
|||
e_util_env_set("GTK_IM_MODULE", _e_intl_orig_gtk_im_module);
|
||||
e_util_env_set("QT_IM_MODULE", _e_intl_orig_qt_im_module);
|
||||
e_util_env_set("XMODIFIERS", _e_intl_orig_xmodifiers);
|
||||
e_util_env_set("GTK_IM_MODULE_FILE", _e_intl_orig_gtk_im_module_file);
|
||||
e_util_env_set("GTk_IM_MODULE_FILE", _e_intl_orig_gtk_im_module_file);
|
||||
}
|
||||
|
||||
if (method)
|
||||
|
@ -236,7 +236,7 @@ e_intl_input_method_set(const char *method)
|
|||
e_util_env_set("GTK_IM_MODULE", elp->gtk_im_module);
|
||||
e_util_env_set("QT_IM_MODULE", elp->qt_im_module);
|
||||
e_util_env_set("XMODIFIERS", elp->xmodifiers);
|
||||
e_util_env_set("GTK_IM_MODULE_FILE", elp->gtk_im_module_file);
|
||||
e_util_env_set("GTk_IM_MODULE_FILE", elp->gtk_im_module_file);
|
||||
if (elp->e_im_exec != NULL)
|
||||
{
|
||||
/* FIXME: first check ok exec availability */
|
||||
|
@ -258,7 +258,7 @@ e_intl_input_method_get(void)
|
|||
return _e_intl_input_method;
|
||||
}
|
||||
|
||||
const Evas_List *
|
||||
Evas_List *
|
||||
e_intl_input_method_list(void)
|
||||
{
|
||||
Evas_List *im_list;
|
||||
|
@ -270,7 +270,7 @@ e_intl_input_method_list(void)
|
|||
for (next = _e_intl_input_methods; next; next = next->next)
|
||||
{
|
||||
elp = next->data;
|
||||
im_list = evas_list_append(im_list, elp->e_im_name);
|
||||
im_list = evas_list_append(im_list, strdup(elp->e_im_name));
|
||||
}
|
||||
|
||||
return im_list;
|
||||
|
|
|
@ -35,7 +35,7 @@ EAPI const Evas_List *e_intl_language_list(void);
|
|||
/* Setting & Getting Input Method */
|
||||
EAPI void e_intl_input_method_set(const char *method);
|
||||
EAPI const char *e_intl_input_method_get(void);
|
||||
EAPI const Evas_List *e_intl_input_method_list(void);
|
||||
EAPI Evas_List *e_intl_input_method_list(void);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -5457,8 +5457,11 @@ break;
|
|||
#elif (TYPE == E_WM_IN)
|
||||
GENERIC(HDL);
|
||||
LIST_DATA();
|
||||
ENCODE((Evas_List *)e_intl_input_method_list(), e_ipc_codec_str_list_enc);
|
||||
Evas_List *iml;
|
||||
iml = e_intl_input_method_list();
|
||||
ENCODE(iml, e_ipc_codec_str_list_enc);
|
||||
SEND_DATA(E_IPC_OP_IM_LIST_REPLY);
|
||||
FREE_LIST(iml);
|
||||
END_GENERIC();
|
||||
#elif (TYPE == E_REMOTE_IN)
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue