/* FIXED : destroy only if it was created. */
if (setting_view_phone_region_format.is_create) {
- if (ad->gl_region!= NULL) {
- elm_genlist_clear(ad->gl_region);
- evas_object_del(ad->gl_region);
- ad->gl_region = NULL;
- }
if (ad->search_idler) {
ecore_idler_del(ad->search_idler);
ad->search_idler = NULL;
(Setting_GenGroupItem_Data *) elm_object_item_data_get(item);
SettingPhoneUG *ad = (SettingPhoneUG *) list_item->userdata;
- if (ad->popup) {
- return;
- }
-
SETTING_TRACE("region_keyStr = %s",
ad->region_keyStr[list_item->chk_status]);
/* if not change, return */
}
elm_radio_value_set(radio, list_item->chk_status);
- setting_phone_region_format_close_popup_ex(ad);
-}
-
-static void setting_phone_region_format_close_popup_ex(void *data)
-{
- SETTING_TRACE_BEGIN;
- setting_retm_if(data == NULL, "Data parameter is NULL");
- SettingPhoneUG *ad = (SettingPhoneUG *) data;
-
- char *msg =
- "IDS_ST_BODY_CHANGING_REGION_WILL_CLOSE_ALL_APPLICATIONS_AND_UNSAVED_DATA_WILL_BE_LOST_CONTINUE_Q";
- ad->popup_cb = setting_phone_region_format_exit_cb_ex;
- ad->popup = setting_create_popup_with_btn(ad, ad->win_get, NULL,
- _(msg), ad->popup_cb, 0, 2,
- _("IDS_COM_SK_YES"), _("IDS_COM_SK_NO"));
-}
-
-
-static void
-setting_phone_region_format_exit_cb_ex(void *data, Evas_Object *obj,
- void *event_info)
-{
- SETTING_TRACE_BEGIN;
- setting_retm_if(data == NULL, "Data parameter is NULL");
- SettingPhoneUG *ad = (SettingPhoneUG *) data;
-
- switch (btn_type(obj)) {
- case POPUP_RESPONSE_OK:
- {
- ad->prev_region = elm_radio_value_get(ad->chk_region);
- SETTING_TRACE("cur_chk_region = %d", ad->prev_region);
-
- char region[MAX_REGION_STRLEN];
- memset(region, 0x00, MAX_REGION_STRLEN);
- snprintf(region, MAX_REGION_STRLEN, "%s.UTF-8", ad->region_keyStr[ad->prev_region]);
-
- int ret =
- setting_phone_region_format_set_dateformat
- (ad->region_keyStr[ad->prev_region], ad);
- setting_retm_if(ret == SETTING_RETURN_FAIL,
- "[Error] set date format fail");
-
- ret =
- vconf_set_str(VCONFKEY_REGIONFORMAT,region);
- setting_retm_if(ret != 0,
- "[Error] set value of VCONFKEY_REGIONFORMAT fail");
-
- /* after lang-change, go back to the previous page*/
- setting_view_change(&setting_view_phone_region_format ,
- &setting_view_phone_language_region, ad);
-
- break;
- }
- case POPUP_RESPONSE_CANCEL:
- {
- elm_radio_value_set(ad->chk_region, ad->prev_region);
- if (ad->popup) {
- evas_object_del(ad->popup);
- ad->popup = NULL;
- }
- return;
- }
- default:
- {
- if (ad->popup) {
- evas_object_del(ad->popup);
- ad->popup = NULL;
- }
- return;
- }
- }
-
- if (ad->popup) {
- evas_object_del(ad->popup);
- ad->popup = NULL;
- }
- /* elm_exit(); */
+ ad->prev_region = list_item->chk_status;
+ SETTING_TRACE("cur_chk_region = %d", ad->prev_region);
+
+ char region[MAX_REGION_STRLEN] = {0,};
+ snprintf(region, MAX_REGION_STRLEN, "%s.UTF-8", ad->region_keyStr[ad->prev_region]);
+
+ int ret = setting_phone_region_format_set_dateformat(ad->region_keyStr[ad->prev_region], ad);
+ setting_retm_if(ret == SETTING_RETURN_FAIL, "[Error] set date format fail");
+
+ ret = vconf_set_str(VCONFKEY_REGIONFORMAT,region);
+ setting_retm_if(ret != 0, "[Error] set value of VCONFKEY_REGIONFORMAT fail");
+
+ /* after changed, go back to the previous page*/
+ setting_view_change(&setting_view_phone_region_format ,
+ &setting_view_phone_language_region, ad);
}
static int