From: Ji-hoon Lee Date: Thu, 4 Jan 2018 10:35:49 +0000 (+0900) Subject: Acquire language locale string from ISE X-Git-Tag: accepted/tizen/unified/20180109.172752~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=af480b7b72002e798d42aa5f1871357ed03aafb7;p=platform%2Fcore%2Fuifw%2Fisf.git Acquire language locale string from ISE Change-Id: I4e6d60997631a7aa345f0f97b711953ef4fd5f9b --- diff --git a/ism/modules/panelagent/wayland/isf_wsc_control_ui.cpp b/ism/modules/panelagent/wayland/isf_wsc_control_ui.cpp index 83c3a5c..b64ace9 100644 --- a/ism/modules/panelagent/wayland/isf_wsc_control_ui.cpp +++ b/ism/modules/panelagent/wayland/isf_wsc_control_ui.cpp @@ -316,3 +316,8 @@ void isf_wsc_context_input_hint_set (WSCContextISF *ctx, Ecore_IMF_Input_Hints i SECURE_LOGD("input hint : %d\n", input_hint); _isf_wsc_context_input_hint_set (_get_context_id(ctx), input_hint); } + +void isf_wsc_context_input_panel_language_locale_get (WSCContextISF *ctx, char **locale) +{ + _isf_wsc_context_input_panel_language_locale_get (_get_context_id(ctx), locale); +} \ No newline at end of file diff --git a/ism/modules/panelagent/wayland/isf_wsc_control_ui.h b/ism/modules/panelagent/wayland/isf_wsc_control_ui.h index 0df5bfe..472b269 100644 --- a/ism/modules/panelagent/wayland/isf_wsc_control_ui.h +++ b/ism/modules/panelagent/wayland/isf_wsc_control_ui.h @@ -59,6 +59,7 @@ extern "C" void isf_wsc_context_input_panel_finalize_content (WSCContextISF *ctx, const char *text, int cursor_pos); void isf_wsc_context_input_panel_prediction_hint_data_set (WSCContextISF *ctx, const char *key, const char *value); void isf_wsc_context_input_hint_set (WSCContextISF *ctx, Ecore_IMF_Input_Hints input_hint); + void isf_wsc_context_input_panel_language_locale_get (WSCContextISF *ctx, char **locale); #ifdef __cplusplus } diff --git a/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp b/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp index 8138a6f..454fdfa 100644 --- a/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp +++ b/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp @@ -3013,6 +3013,14 @@ public: if (!_focused_ic || !_focused_ic->im_ctx) return; + if (type == ECORE_IMF_INPUT_PANEL_LANGUAGE_EVENT) { + WSCContextISF* ic = find_ic (context); + if (ic) { + isf_wsc_context_input_panel_language_locale_get (_focused_ic, &(ic->language)); + if (ic->language) + wl_input_method_context_language (_focused_ic->im_ctx, _focused_ic->serial, ic->language); + } + } wl_input_method_context_input_panel_event (_focused_ic->im_ctx, _focused_ic->serial, type, value); }