forked from enlightenment/enlightenment
you can change language on the fly by enlightenment_remote and it saves the
settings etc. lists available languages etc. etc. works nicely here... SVN revision: 14566
This commit is contained in:
parent
9b245b4a65
commit
e13f386abf
1
TODO
1
TODO
|
@ -55,6 +55,7 @@ Also look at all the .c files - they have their own localized TODO lists
|
|||
|
||||
These are in no particular order:
|
||||
|
||||
* if module can't load (error) u cant unload... save module list if any module doesnt load proprly so it wont be there next time.
|
||||
* dropshadow screws up when shadow becomes too thin (and transitions to different mode) and back.
|
||||
* mplayer fullscreen screws up (reparenting issues)
|
||||
* check window max size. if < size of zone (or maximisation area) disallow maximising and tell border edje object (via signals) to somehow disable the maximise buttons :) (and remove from the menu)
|
||||
|
|
|
@ -199,7 +199,10 @@ e_config_init(void)
|
|||
/* apply config */
|
||||
|
||||
if ((e_config->language) && (strlen(e_config->language) > 0))
|
||||
e_intl_language_set(e_config->language);
|
||||
{
|
||||
printf("SET LANG %s\n", e_config->language);
|
||||
e_intl_language_set(e_config->language);
|
||||
}
|
||||
|
||||
{
|
||||
Evas_List *l;
|
||||
|
|
|
@ -38,21 +38,21 @@ e_intl_init(void)
|
|||
* vs. traditional chinese) we may refer to them as separate languages
|
||||
* entirely.
|
||||
*/
|
||||
ADD_LANG("C");
|
||||
ADD_LANG("en");
|
||||
ADD_LANG("ja");
|
||||
ADD_LANG("fr");
|
||||
ADD_LANG("es");
|
||||
ADD_LANG("pt");
|
||||
ADD_LANG("fi");
|
||||
ADD_LANG("ru");
|
||||
ADD_LANG("bg");
|
||||
ADD_LANG("de");
|
||||
ADD_LANG("pl");
|
||||
ADD_LANG("zh_CN");
|
||||
ADD_LANG("hu");
|
||||
ADD_LANG("sl");
|
||||
ADD_LANG("it");
|
||||
ADD_LANG("");
|
||||
ADD_LANG("en_US.UTF-8");
|
||||
ADD_LANG("ja_JP.UTF-8");
|
||||
ADD_LANG("fr_FR.UTF-8");
|
||||
ADD_LANG("es_AR.UTF-8");
|
||||
ADD_LANG("pt_BR.UTF-8");
|
||||
ADD_LANG("fi_FI.UTF-8");
|
||||
ADD_LANG("ru_RU.UTF-8");
|
||||
ADD_LANG("bg_BG.UTF-8");
|
||||
ADD_LANG("de_DE.UTF-8");
|
||||
ADD_LANG("pl_PL.UTF-8");
|
||||
ADD_LANG("zh_CN.UTF-8");
|
||||
ADD_LANG("hu_HU.UTF-8");
|
||||
ADD_LANG("sl_SI.UTF-8");
|
||||
ADD_LANG("it_IT.UTF-8");
|
||||
|
||||
/* FIXME: NULL == use LANG. make this read a config value if it exists */
|
||||
e_intl_language_set(getenv("LANG"));
|
||||
|
@ -82,7 +82,15 @@ e_intl_language_set(const char *lang)
|
|||
{
|
||||
_e_intl_language = NULL;
|
||||
}
|
||||
setlocale(LC_ALL, "");
|
||||
if (setlocale(LC_ALL, "") == NULL)
|
||||
{
|
||||
perror("setlocale() :");
|
||||
if (_e_intl_language)
|
||||
printf("An error occured when trying to use the locale: %s\nDetails:\n",
|
||||
_e_intl_language);
|
||||
else
|
||||
printf("An error occured trying to use the default locale\n");
|
||||
}
|
||||
bindtextdomain(PACKAGE, LOCALE_DIR);
|
||||
textdomain(PACKAGE);
|
||||
// XSetLocaleModifiers("");
|
||||
|
|
|
@ -15,7 +15,6 @@ ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_font_available_list_enc);
|
|||
ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_font_fallback_list_enc);
|
||||
ECORE_IPC_ENC_EVAS_LIST_PROTO(_e_ipc_font_default_list_enc);
|
||||
ECORE_IPC_ENC_STRUCT_PROTO(_e_ipc_font_default_enc);
|
||||
//ECORE_IPC_ENC_STRUCT_PROTO(_e_ipc_string_list_enc);
|
||||
|
||||
/* local subsystem globals */
|
||||
static Ecore_Ipc_Server *_e_ipc_server = NULL;
|
||||
|
@ -416,6 +415,7 @@ _e_ipc_cb_client_data(void *data __UNUSED__, int type __UNUSED__, void *event)
|
|||
data, bytes);
|
||||
free(data);
|
||||
}
|
||||
break;
|
||||
case E_IPC_OP_LANG_SET:
|
||||
{
|
||||
char *lang;
|
||||
|
@ -426,6 +426,7 @@ _e_ipc_cb_client_data(void *data __UNUSED__, int type __UNUSED__, void *event)
|
|||
e_intl_language_set(e_config->language);
|
||||
e_config_save_queue();
|
||||
}
|
||||
break;
|
||||
case E_IPC_OP_LANG_GET:
|
||||
{
|
||||
char *lang;
|
||||
|
@ -485,6 +486,10 @@ _e_ipc_path_str_get(char **paths, int *bytes)
|
|||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode a list of strings into a flattened data block that looks like
|
||||
* <str>0<str>0... (ie string chars - nul byte in between until the end)
|
||||
*/
|
||||
static char *
|
||||
_e_ipc_str_list_get(Evas_List *strs, int *bytes)
|
||||
{
|
||||
|
@ -620,16 +625,3 @@ ECORE_IPC_ENC_STRUCT_PROTO(_e_ipc_font_default_enc)
|
|||
ECORE_IPC_PUT32(size);
|
||||
ECORE_IPC_ENC_STRUCT_FOOT();
|
||||
}
|
||||
|
||||
/*
|
||||
ECORE_IPC_ENC_STRUCT_PROTO(_e_ipc_string_list_enc)
|
||||
{
|
||||
ECORE_IPC_ENC_EVAS_LIST_HEAD_START(E_String);
|
||||
ECORE_IPC_CNTS(str);
|
||||
ECORE_IPC_ENC_EVAS_LIST_HEAD_FINISH();
|
||||
int l1;
|
||||
ECORE_IPC_SLEN(l1, str);
|
||||
ECORE_IPC_PUTS(str, l1);
|
||||
ECORE_IPC_ENC_EVAS_LIST_FOOT();
|
||||
}
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
*/
|
||||
#ifdef E_TYPEDEFS
|
||||
|
||||
typedef enum _E_Ipc_Domain {
|
||||
typedef enum _E_Ipc_Domain
|
||||
{
|
||||
E_IPC_DOMAIN_NONE,
|
||||
E_IPC_DOMAIN_SETUP,
|
||||
E_IPC_DOMAIN_REQUEST,
|
||||
|
@ -12,7 +13,8 @@ typedef enum _E_Ipc_Domain {
|
|||
E_IPC_DOMAIN_LAST
|
||||
} E_Ipc_Domain;
|
||||
|
||||
typedef enum _E_Ipc_Op {
|
||||
typedef enum _E_Ipc_Op
|
||||
{
|
||||
E_IPC_OP_NONE,
|
||||
E_IPC_OP_MODULE_LOAD,
|
||||
E_IPC_OP_MODULE_UNLOAD,
|
||||
|
|
|
@ -27,6 +27,8 @@ static int _e_ipc_cb_server_data(void *data, int type, void *event);
|
|||
|
||||
static void _e_help(void);
|
||||
|
||||
static Evas_List *_e_ipc_str_list_dec(char *data, int bytes);
|
||||
|
||||
ECORE_IPC_DEC_EVAS_LIST_PROTO(_e_ipc_module_list_dec);
|
||||
ECORE_IPC_DEC_EVAS_LIST_PROTO(_e_ipc_font_available_list_dec);
|
||||
ECORE_IPC_DEC_EVAS_LIST_PROTO(_e_ipc_font_fallback_list_dec);
|
||||
|
@ -433,7 +435,7 @@ _e_ipc_cb_server_data(void *data, int type, void *event)
|
|||
E_Font_Default *efd;
|
||||
|
||||
defaults = _e_ipc_font_default_list_dec(e->data, e->size);
|
||||
while(defaults)
|
||||
while (defaults)
|
||||
{
|
||||
efd = defaults->data;
|
||||
printf("REPLY: DEFAULT TEXT_CLASS=\"%s\" NAME=\"%s\" SIZE=%d\n",
|
||||
|
@ -448,10 +450,27 @@ _e_ipc_cb_server_data(void *data, int type, void *event)
|
|||
case E_IPC_OP_LANG_LIST_REPLY:
|
||||
if (e->data)
|
||||
{
|
||||
Evas_List *langs;
|
||||
|
||||
langs = _e_ipc_str_list_dec(e->data, e->size);
|
||||
if (langs)
|
||||
{
|
||||
Evas_List *l;
|
||||
|
||||
for (l = langs; l; l = l->next)
|
||||
printf("REPLY: LANG=\"%s\"\n", l->data);
|
||||
evas_list_free(langs);
|
||||
}
|
||||
}
|
||||
else
|
||||
printf("REPLY: AVAILABLE NONE\n");
|
||||
break;
|
||||
case E_IPC_OP_LANG_GET_REPLY:
|
||||
if (e->data)
|
||||
{
|
||||
printf("REPLY: %s\n", e->data);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -504,6 +523,23 @@ _e_help(void)
|
|||
}
|
||||
}
|
||||
|
||||
/* generic encoding functions */
|
||||
static Evas_List *
|
||||
_e_ipc_str_list_dec(char *data, int bytes)
|
||||
{
|
||||
Evas_List *strs = NULL;
|
||||
char *p;
|
||||
|
||||
/* malformed list? */
|
||||
if (data[bytes - 1] != 0) return NULL;
|
||||
p = data;
|
||||
while (p < (data + bytes))
|
||||
{
|
||||
strs = evas_list_append(strs, p);
|
||||
p += strlen(p) + 1;
|
||||
}
|
||||
return strs;
|
||||
}
|
||||
|
||||
/* list/struct encoding functions */
|
||||
ECORE_IPC_DEC_EVAS_LIST_PROTO(_e_ipc_module_list_dec)
|
||||
|
|
Loading…
Reference in New Issue