complete work for xim support in e - so e sets up env vars right.. and
scim, uim and iimf are set to use xim compat modules for ecore. SVN revision: 61794
This commit is contained in:
parent
e32856d084
commit
8b464f5c4a
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -21,6 +21,7 @@ main(int argc, char **argv)
|
||||||
char *set_gtk_im_module = NULL;
|
char *set_gtk_im_module = NULL;
|
||||||
char *set_qt_im_module = NULL;
|
char *set_qt_im_module = NULL;
|
||||||
char *set_xmodifiers = NULL;
|
char *set_xmodifiers = NULL;
|
||||||
|
char *set_ecore_imf_module = NULL;
|
||||||
int list = 0;
|
int list = 0;
|
||||||
|
|
||||||
/* handle some command-line parameters */
|
/* handle some command-line parameters */
|
||||||
|
@ -68,6 +69,13 @@ main(int argc, char **argv)
|
||||||
valid_args++;
|
valid_args++;
|
||||||
write_ops++;
|
write_ops++;
|
||||||
}
|
}
|
||||||
|
else if ((!strcmp(argv[i], "-set-ecore-imf-module")) && (i < (argc - 1)))
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
set_ecore_imf_module = argv[i];
|
||||||
|
valid_args++;
|
||||||
|
write_ops++;
|
||||||
|
}
|
||||||
else if ((!strcmp(argv[i], "-h")) ||
|
else if ((!strcmp(argv[i], "-h")) ||
|
||||||
(!strcmp(argv[i], "-help")) ||
|
(!strcmp(argv[i], "-help")) ||
|
||||||
(!strcmp(argv[i], "--h")) ||
|
(!strcmp(argv[i], "--h")) ||
|
||||||
|
@ -115,7 +123,8 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
if (!ef)
|
if (!ef)
|
||||||
{
|
{
|
||||||
printf("ERROR: cannot open file %s for READ/WRITE (%d:%s)\n", file, errno, strerror(errno));
|
printf("ERROR: cannot open file %s for READ/WRITE (%i:%s)\n",
|
||||||
|
file, errno, strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,6 +142,7 @@ main(int argc, char **argv)
|
||||||
write_imc->gtk_im_module = read_imc->gtk_im_module;
|
write_imc->gtk_im_module = read_imc->gtk_im_module;
|
||||||
write_imc->qt_im_module = read_imc->qt_im_module;
|
write_imc->qt_im_module = read_imc->qt_im_module;
|
||||||
write_imc->xmodifiers = read_imc->xmodifiers;
|
write_imc->xmodifiers = read_imc->xmodifiers;
|
||||||
|
write_imc->ecore_imf_module = read_imc->ecore_imf_module;
|
||||||
write_imc->e_im_exec = read_imc->e_im_exec;
|
write_imc->e_im_exec = read_imc->e_im_exec;
|
||||||
write_imc->e_im_setup_exec = read_imc->e_im_setup_exec;
|
write_imc->e_im_setup_exec = read_imc->e_im_setup_exec;
|
||||||
}
|
}
|
||||||
|
@ -145,6 +155,8 @@ main(int argc, char **argv)
|
||||||
write_imc->qt_im_module = set_qt_im_module;
|
write_imc->qt_im_module = set_qt_im_module;
|
||||||
if (set_xmodifiers)
|
if (set_xmodifiers)
|
||||||
write_imc->xmodifiers = set_xmodifiers;
|
write_imc->xmodifiers = set_xmodifiers;
|
||||||
|
if (set_ecore_imf_module)
|
||||||
|
write_imc->ecore_imf_module = set_ecore_imf_module;
|
||||||
if (set_exe)
|
if (set_exe)
|
||||||
write_imc->e_im_exec = set_exe;
|
write_imc->e_im_exec = set_exe;
|
||||||
if (set_setup)
|
if (set_setup)
|
||||||
|
@ -159,13 +171,14 @@ main(int argc, char **argv)
|
||||||
if (list)
|
if (list)
|
||||||
{
|
{
|
||||||
printf("Config File List:\n");
|
printf("Config File List:\n");
|
||||||
printf("Config Version:\t%d\n", read_imc->version);
|
printf("Config Version: %i\n", read_imc->version);
|
||||||
printf("Config Name:\t%s\n", read_imc->e_im_name);
|
printf("Config Name: %s\n", read_imc->e_im_name);
|
||||||
printf("Command Line:\t%s\n", read_imc->e_im_exec);
|
printf("Command Line: %s\n", read_imc->e_im_exec);
|
||||||
printf("Setup Line:\t%s\n", read_imc->e_im_setup_exec);
|
printf("Setup Line: %s\n", read_imc->e_im_setup_exec);
|
||||||
printf("gtk_im_module:\t%s\n", read_imc->gtk_im_module);
|
printf("gtk_im_module: %s\n", read_imc->gtk_im_module);
|
||||||
printf("qt_im_module:\t%s\n", read_imc->qt_im_module);
|
printf("qt_im_module: %s\n", read_imc->qt_im_module);
|
||||||
printf("xmodifiers:\t%s\n", read_imc->xmodifiers);
|
printf("xmodifiers: %s\n", read_imc->xmodifiers);
|
||||||
|
printf("ecore_imf_module: %s\n", read_imc->ecore_imf_module);
|
||||||
}
|
}
|
||||||
|
|
||||||
e_intl_input_method_config_free(read_imc);
|
e_intl_input_method_config_free(read_imc);
|
||||||
|
@ -186,6 +199,7 @@ _e_help(void)
|
||||||
" -set-setup EXE Set the setup application execute line\n"
|
" -set-setup EXE Set the setup application execute line\n"
|
||||||
" -set-gtk-im-module Set the gtk_im_module env var\n"
|
" -set-gtk-im-module Set the gtk_im_module env var\n"
|
||||||
" -set-qt-im-module Set the qt_im_module env var\n"
|
" -set-qt-im-module Set the qt_im_module env var\n"
|
||||||
|
" -set-ecore-imf-module Set the ecore_imf_module env var\n"
|
||||||
" -set-xmodifiers Set the xmodifiers env var\n"
|
" -set-xmodifiers Set the xmodifiers env var\n"
|
||||||
" -list List Contents of Input Method Config file\n"
|
" -list List Contents of Input Method Config file\n"
|
||||||
);
|
);
|
||||||
|
|
|
@ -11,6 +11,7 @@ static char *_e_intl_language_alias = NULL;
|
||||||
static char *_e_intl_orig_xmodifiers = NULL;
|
static char *_e_intl_orig_xmodifiers = NULL;
|
||||||
static char *_e_intl_orig_qt_im_module = NULL;
|
static char *_e_intl_orig_qt_im_module = NULL;
|
||||||
static char *_e_intl_orig_gtk_im_module = NULL;
|
static char *_e_intl_orig_gtk_im_module = NULL;
|
||||||
|
static char *_e_intl_orig_ecore_imf_module = NULL;
|
||||||
|
|
||||||
static const char *_e_intl_imc_personal_path = NULL;
|
static const char *_e_intl_imc_personal_path = NULL;
|
||||||
static const char *_e_intl_imc_system_path = NULL;
|
static const char *_e_intl_imc_system_path = NULL;
|
||||||
|
@ -59,6 +60,7 @@ e_intl_init(void)
|
||||||
if ((s = getenv("GTK_IM_MODULE"))) _e_intl_orig_gtk_im_module = strdup(s);
|
if ((s = getenv("GTK_IM_MODULE"))) _e_intl_orig_gtk_im_module = strdup(s);
|
||||||
if ((s = getenv("QT_IM_MODULE"))) _e_intl_orig_qt_im_module = strdup(s);
|
if ((s = getenv("QT_IM_MODULE"))) _e_intl_orig_qt_im_module = strdup(s);
|
||||||
if ((s = getenv("XMODIFIERS"))) _e_intl_orig_xmodifiers = strdup(s);
|
if ((s = getenv("XMODIFIERS"))) _e_intl_orig_xmodifiers = strdup(s);
|
||||||
|
if ((s = getenv("ECORE_IMF_MODULE"))) _e_intl_orig_ecore_imf_module = strdup(s);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -72,6 +74,7 @@ e_intl_shutdown(void)
|
||||||
E_FREE(_e_intl_orig_gtk_im_module);
|
E_FREE(_e_intl_orig_gtk_im_module);
|
||||||
E_FREE(_e_intl_orig_qt_im_module);
|
E_FREE(_e_intl_orig_qt_im_module);
|
||||||
E_FREE(_e_intl_orig_xmodifiers);
|
E_FREE(_e_intl_orig_xmodifiers);
|
||||||
|
E_FREE(_e_intl_orig_ecore_imf_module);
|
||||||
|
|
||||||
if (_e_intl_imc_personal_path)
|
if (_e_intl_imc_personal_path)
|
||||||
eina_stringshare_del(_e_intl_imc_personal_path);
|
eina_stringshare_del(_e_intl_imc_personal_path);
|
||||||
|
@ -309,6 +312,7 @@ e_intl_input_method_set(const char *imc_path)
|
||||||
e_util_env_set("GTK_IM_MODULE", _e_intl_orig_gtk_im_module);
|
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("QT_IM_MODULE", _e_intl_orig_qt_im_module);
|
||||||
e_util_env_set("XMODIFIERS", _e_intl_orig_xmodifiers);
|
e_util_env_set("XMODIFIERS", _e_intl_orig_xmodifiers);
|
||||||
|
e_util_env_set("ECORE_IMF_MODULE", _e_intl_orig_ecore_imf_module);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (imc_path)
|
if (imc_path)
|
||||||
|
@ -327,6 +331,7 @@ e_intl_input_method_set(const char *imc_path)
|
||||||
e_util_env_set("GTK_IM_MODULE", imc->gtk_im_module);
|
e_util_env_set("GTK_IM_MODULE", imc->gtk_im_module);
|
||||||
e_util_env_set("QT_IM_MODULE", imc->qt_im_module);
|
e_util_env_set("QT_IM_MODULE", imc->qt_im_module);
|
||||||
e_util_env_set("XMODIFIERS", imc->xmodifiers);
|
e_util_env_set("XMODIFIERS", imc->xmodifiers);
|
||||||
|
e_util_env_set("ECORE_IMF_MODULE", imc->ecore_imf_module);
|
||||||
|
|
||||||
E_EXE_STOP(_e_intl_input_method_exec);
|
E_EXE_STOP(_e_intl_input_method_exec);
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ e_intl_data_init(void)
|
||||||
E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, gtk_im_module, STR);
|
E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, gtk_im_module, STR);
|
||||||
E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, qt_im_module, STR);
|
E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, qt_im_module, STR);
|
||||||
E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, xmodifiers, STR);
|
E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, xmodifiers, STR);
|
||||||
|
E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, ecore_imf_module, STR);
|
||||||
E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, e_im_exec, STR);
|
E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, e_im_exec, STR);
|
||||||
E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, e_im_setup_exec, STR);
|
E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, e_im_setup_exec, STR);
|
||||||
|
|
||||||
|
@ -66,6 +67,7 @@ e_intl_input_method_config_free(E_Input_Method_Config *imc)
|
||||||
if (imc->gtk_im_module) eina_stringshare_del(imc->gtk_im_module);
|
if (imc->gtk_im_module) eina_stringshare_del(imc->gtk_im_module);
|
||||||
if (imc->qt_im_module) eina_stringshare_del(imc->qt_im_module);
|
if (imc->qt_im_module) eina_stringshare_del(imc->qt_im_module);
|
||||||
if (imc->xmodifiers) eina_stringshare_del(imc->xmodifiers);
|
if (imc->xmodifiers) eina_stringshare_del(imc->xmodifiers);
|
||||||
|
if (imc->ecore_imf_module) eina_stringshare_del(imc->ecore_imf_module);
|
||||||
if (imc->e_im_exec) eina_stringshare_del(imc->e_im_exec);
|
if (imc->e_im_exec) eina_stringshare_del(imc->e_im_exec);
|
||||||
if (imc->e_im_setup_exec) eina_stringshare_del(imc->e_im_setup_exec);
|
if (imc->e_im_setup_exec) eina_stringshare_del(imc->e_im_setup_exec);
|
||||||
E_FREE(imc);
|
E_FREE(imc);
|
||||||
|
|
|
@ -6,7 +6,7 @@ typedef struct _E_Input_Method_Config E_Input_Method_Config;
|
||||||
#ifndef E_INTL_DATA_H
|
#ifndef E_INTL_DATA_H
|
||||||
#define E_INTL_DATA_H
|
#define E_INTL_DATA_H
|
||||||
|
|
||||||
#define E_INTL_INPUT_METHOD_CONFIG_VERSION 2
|
#define E_INTL_INPUT_METHOD_CONFIG_VERSION 3
|
||||||
|
|
||||||
struct _E_Input_Method_Config
|
struct _E_Input_Method_Config
|
||||||
{
|
{
|
||||||
|
@ -15,14 +15,15 @@ struct _E_Input_Method_Config
|
||||||
const char *gtk_im_module;
|
const char *gtk_im_module;
|
||||||
const char *qt_im_module;
|
const char *qt_im_module;
|
||||||
const char *xmodifiers;
|
const char *xmodifiers;
|
||||||
|
const char *ecore_imf_module;
|
||||||
const char *e_im_exec;
|
const char *e_im_exec;
|
||||||
const char *e_im_setup_exec;
|
const char *e_im_setup_exec;
|
||||||
};
|
};
|
||||||
|
|
||||||
EINTERN int e_intl_data_init(void);
|
EINTERN int e_intl_data_init(void);
|
||||||
EINTERN int e_intl_data_shutdown(void);
|
EINTERN int e_intl_data_shutdown(void);
|
||||||
EAPI E_Input_Method_Config *e_intl_input_method_config_read (Eet_File *imc_file);
|
EAPI E_Input_Method_Config *e_intl_input_method_config_read(Eet_File *imc_file);
|
||||||
EAPI int e_intl_input_method_config_write (Eet_File *imc_file, E_Input_Method_Config *imc);
|
EAPI int e_intl_input_method_config_write(Eet_File *imc_file, E_Input_Method_Config *imc);
|
||||||
EAPI void e_intl_input_method_config_free (E_Input_Method_Config *imc);
|
EAPI void e_intl_input_method_config_free(E_Input_Method_Config *imc);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue