Enlightenment CVS committal
Author : shorne
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_int_config_intl.c
Log Message:
Try to really first the NULL locale issue.
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_config_intl.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- e_int_config_intl.c 25 Sep 2006 15:35:38 -0000 1.5
+++ e_int_config_intl.c 26 Sep 2006 16:00:13 -0000 1.6
@@ -760,7 +760,7 @@
static int
_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
- if (cfdata->cur_language != NULL)
+ if (cfdata->cur_language)
{
e_config->language = evas_stringshare_add(cfdata->cur_language);
e_intl_language_set(e_config->language);
@@ -774,7 +774,7 @@
static int
_advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
- if (cfdata->cur_language != NULL)
+ if (cfdata->cur_language)
{
e_config->language = evas_stringshare_add(cfdata->cur_language);
e_intl_language_set(e_config->language);
@@ -803,8 +803,15 @@
e_widget_on_change_hook_set(ob, _ilist_basic_language_cb_change, cfdata);
cfdata->gui.blang_list = ob;
- cur_sig_loc = e_intl_locale_canonic_get(cfdata->cur_language,
- E_INTL_LOC_LANG | E_INTL_LOC_REGION);
+ if (cfdata->cur_language)
+ {
+ cur_sig_loc = e_intl_locale_canonic_get(cfdata->cur_language,
+ E_INTL_LOC_LANG | E_INTL_LOC_REGION);
+ }
+ else
+ {
+ cur_sig_loc = NULL;
+ }
i = 0;
while (basic_language_predefined_pairs[i].locale_key)
@@ -1176,22 +1183,31 @@
char *modifier;
E_FREE(cfdata->cur_lang);
- cfdata->cur_lang = NULL;
E_FREE(cfdata->cur_reg);
- cfdata->cur_reg = NULL;
E_FREE(cfdata->cur_cs);
- cfdata->cur_cs = NULL;
E_FREE(cfdata->cur_mod);
+
+ cfdata->cur_lang = NULL;
+ cfdata->cur_reg = NULL;
+ cfdata->cur_cs = NULL;
cfdata->cur_mod = NULL;
-
- language = e_intl_locale_canonic_get(cfdata->cur_language,
- E_INTL_LOC_LANG);
- region = e_intl_locale_canonic_get(cfdata->cur_language,
- E_INTL_LOC_REGION);
- codeset = e_intl_locale_canonic_get(cfdata->cur_language,
- E_INTL_LOC_CODESET);
- modifier = e_intl_locale_canonic_get(cfdata->cur_language,
- E_INTL_LOC_MODIFIER);
+
+ language = NULL;
+ region = NULL;
+ codeset = NULL;
+ modifier = NULL;
+
+ if (cfdata->cur_language)
+ {
+ language = e_intl_locale_canonic_get(cfdata->cur_language,
+ E_INTL_LOC_LANG);
+ region = e_intl_locale_canonic_get(cfdata->cur_language,
+ E_INTL_LOC_REGION);
+ codeset = e_intl_locale_canonic_get(cfdata->cur_language,
+ E_INTL_LOC_CODESET);
+ modifier = e_intl_locale_canonic_get(cfdata->cur_language,
+ E_INTL_LOC_MODIFIER);
+ }
if (language)
cfdata->cur_lang = strdup(language);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs