Change select method of language in setup wizard
[apps/core/preloaded/settings.git] / setting-phone / src / setting-phone-display-language.c
index d24395c..d873f9a 100755 (executable)
@@ -42,7 +42,9 @@ static void setting_phone_display_language_caller_exist_right_cb(void *data,
 {
        SETTING_TRACE_BEGIN;
        setting_retm_if(data == NULL, "Data parameter is NULL");
+
        SettingPhoneUG *ad = (SettingPhoneUG *) data;
+#if 0
        int ret, err;
 
        int cur_chk_lang = (int)elm_radio_value_get(ad->chk_lang);
@@ -74,6 +76,7 @@ static void setting_phone_display_language_caller_exist_right_cb(void *data,
        } else {
                SETTING_TRACE_ERROR("get vconf failed");
        }
+#endif
 
        /*  Create Bundle and send message */
        service_h svc;
@@ -117,12 +120,12 @@ static int setting_phone_display_language_create(void *cb)
                if(caller)
                {
                        ad->ly_language = setting_create_layout_navi_bar_genlist(ad->win_main_layout,
-                                                                                                                                       ad->win_get,
-                                                                                                                                       title,
-                                                                                                                                       _("IDS_COM_BODY_BACK"), NULL,
-                                                                                                                                       setting_phone_display_language_caller_exist_right_cb, NULL,
-                                                                                                                                       ad, &scroller, &ad->navi_bar);
-                       gl_sel_cb = setting_mouse_up_Gendial_list_radio_cb;
+                                       ad->win_get,
+                                       title,
+                                       _("IDS_COM_BODY_BACK"), NULL,
+                                       setting_phone_display_language_caller_exist_right_cb, NULL,
+                                       ad, &scroller, &ad->navi_bar);
+                       gl_sel_cb = setting_phone_display_language_mouse_up_Gendial_list_radio_cb;
                }
                else
                {
@@ -334,7 +337,27 @@ static void setting_phone_display_language_close_popup_ex(void *data)
        }
        FREE(pa_lang);
 
-       /* after lang-change, go back to the previous page*/
-       elm_naviframe_item_pop(ad->navi_bar);
+       char *caller = NULL;
+       service_h service = ad->bundle_data;
+
+       service_get_extra_data(service, "caller", &caller);
+
+       if(caller) {
+               /*  Create Bundle and send message */
+               service_h svc;
+               if(service_create(&svc))
+                       return;
+
+               service_add_extra_data(svc, "result", "rbutton_click");
+               ug_send_result(ad->ug, svc);
+
+               service_destroy(svc);
+
+               ug_destroy_me(ad->ug);
+
+       } else {
+               /* after lang-change, go back to the previous page*/
+               elm_naviframe_item_pop(ad->navi_bar);
                setting_view_phone_display_language.is_create = 0;
+       }
 }