fiX a bug on Display Language Setting 82/179882/1 submit/tizen/20180523.072330 submit/tizen/20180523.072459
authorKiseok Chang <kiso.chang@samsung.com>
Wed, 23 May 2018 07:14:46 +0000 (16:14 +0900)
committerKiseok Chang <kiso.chang@samsung.com>
Wed, 23 May 2018 07:17:59 +0000 (16:17 +0900)
- problem : handle wrong string with ".UTF-8" when set a key, SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY

Change-Id: I7837e56d78298723f49cf76238ff29e59a86bd6c
Signed-off-by: Kiseok Chang <kiso.chang@samsung.com>
setting-language-and-input/src/setting-display-language-view.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 361c5a0..5a962ed
@@ -208,7 +208,6 @@ static void _close_popup_ex(void *data)
                                        system_settings_set_value_string(
                                                        SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY,
                                                        pnode->locale);
-
                                        int ret = __set_dateformat(
                                                        pnode->locale, ad);
                                        if (ret == SETTING_RETURN_FAIL) {
@@ -244,9 +243,14 @@ static void _close_popup_ex(void *data)
                        ad);
        if (ret == SETTING_RETURN_FAIL)
                SETTING_TRACE_ERROR("[Error] set date format fail");
+       FREE(pa_lang);
 
        char *lang = vconf_get_str(VCONFKEY_LANGSET);
        if (lang) {
+               char *q = strchr(lang, '.');
+               if (q)
+                       *q = '\0';
+
                ret = system_settings_set_value_string(
                                SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, lang);
                if (ret != 0) {
@@ -260,7 +264,6 @@ static void _close_popup_ex(void *data)
        add_app_reply(&ad->md, "result", "rbutton_click");
        ui_app_exit();
 
-       FREE(pa_lang);
 }
 
 /**