}
static void
-im_setting_list_app_control_reply_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *user_data)
-{
- if (!request || !reply) {
- LOGD("app_control handle is null");
- return;
- }
- if (result == APP_CONTROL_RESULT_SUCCEEDED) {
- im_setting_list_update_window(user_data);
- }
-}
-
-static void im_setting_list_show_ime_selector(void *data)
-{
- int ret;
- appdata *ad = (appdata *)data;
- app_control_h app_control;
- const char *app_id = "org.tizen.inputmethod-setting-selector";
-
- if (!ad)
- return;
-
- ret = app_control_create (&app_control);
- if (ret != APP_CONTROL_ERROR_NONE) {
- LOGD("app_control_create returned %d", ret);
- return;
- }
-
- ret = app_control_set_operation (app_control, APP_CONTROL_OPERATION_DEFAULT);
- if (ret != APP_CONTROL_ERROR_NONE) {
- LOGD("app_control_set_operation returned %d", ret);
- app_control_destroy(app_control);
- return;
- }
-
- ret = app_control_set_app_id (app_control, app_id);
- if (ret != APP_CONTROL_ERROR_NONE) {
- LOGD("app_control_set_app_id returned %d", ret);
- app_control_destroy(app_control);
- return;
- }
-
- if (ad->app_type == APP_TYPE_SETTING_NO_ROTATION)
- app_control_add_extra_data(app_control, "caller", "settings_no_rotation");
- else
- app_control_add_extra_data(app_control, "caller", "settings");
-
- ret = app_control_send_launch_request(app_control, im_setting_list_app_control_reply_cb, data);
- if (ret != APP_CONTROL_ERROR_NONE) {
- LOGD("app_control_send_launch_request returned %d, %s\n", ret, get_error_message(ret));
- app_control_destroy(app_control);
- return;
- }
- app_control_destroy(app_control);
-}
-
-static void
im_setting_list_check_popup_ok_cb(void *data, Evas_Object *obj, void *event_info)
{
popup_cb_data *cb_data = (popup_cb_data *)data;
appdata *ad = (appdata *)data;
Elm_Object_Item *item = (Elm_Object_Item *)event_info;
elm_genlist_item_selected_set (item, EINA_FALSE);
-// im_setting_list_show_ime_selector(data);
im_setting_list_popup_view_create(ad->win, data);
}
/* Handle the launch request. */
appdata *ad = (appdata *)data;
int res;
- char* type = NULL;
LOGD("");
return;
ad->app_type = APP_TYPE_NORMAL;
-
- res = app_control_get_extra_data(app_control, "caller", &type);
- if (APP_CONTROL_ERROR_NONE == res && NULL != type) {
- if (strcmp(type,"settings") == 0)
- {
- ad->app_type = APP_TYPE_SETTING;
- app_control_clone(&(ad->caller), app_control);
- }
- else if (strcmp(type, "settings_no_rotation") == 0)
- {
- ad->app_type = APP_TYPE_SETTING_NO_ROTATION;
- app_control_clone(&(ad->caller), app_control);
- }
- }
-
ad->app_state = APP_STATE_SERVICE;
im_setting_selector_app_create(ad);
- if (NULL != type)
- {
- free(type);
- }
}
static void
return;
ad->app_state = APP_STATE_TERMINATE;
im_setting_selector_app_terminate(ad);
- if (ad->caller)
- app_control_destroy(ad->caller);
}
static void
}
static Evas_Object *
-im_setting_selector_main_window_create(const char *name, int app_type)
+im_setting_selector_main_window_create(const char *name)
{
+ int rots[4] = {0, 90, 180, 270};
Evas_Object *eo = NULL;
eo = elm_win_add(NULL, name, ELM_WIN_BASIC);
elm_win_alpha_set(eo, EINA_TRUE);
elm_win_conformant_set(eo, EINA_TRUE);
elm_win_autodel_set(eo, EINA_TRUE);
-
- if (app_type != APP_TYPE_SETTING_NO_ROTATION) {
- int rots[4] = {0, 90, 180, 270};
- elm_win_wm_rotation_available_rotations_set(eo, rots, 4);
- }
+ elm_win_wm_rotation_available_rotations_set(eo, rots, 4);
}
return eo;
}
return;
im_setting_selector_update_radio_state(item, obj, index);
- if (ad->caller) {
- app_control_h reply;
- app_control_create(&reply);
- app_control_reply_to_launch_request(reply, ad->caller, APP_CONTROL_RESULT_SUCCEEDED);
- app_control_destroy(reply);
- }
delete cb_data;
ui_app_exit();
}
if (!ad)
return;
im_setting_selector_text_domain_set();
- ad->win = im_setting_selector_main_window_create(PACKAGE, ad->app_type);
+ ad->win = im_setting_selector_main_window_create(PACKAGE);
im_setting_selector_load_ime_info();
im_setting_selector_popup_create(ad);