From f5955dae22b7c09de850893ae4ed2b0361d727eb Mon Sep 17 00:00:00 2001 From: "sungwook79.park" Date: Wed, 5 Oct 2016 15:49:31 +0900 Subject: [PATCH] Fix issue that change voice layout to normal layout after change language Change-Id: I462b36e2c07c74d17a3bb13b0c7821d2681b1e74 Signed-off-by: sungwook79.park --- src/ise-stt-mode.cpp | 6 +++--- src/ise-stt-option.cpp | 3 +++ src/ise.cpp | 12 ++++++++++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/ise-stt-mode.cpp b/src/ise-stt-mode.cpp index 98c977c..c6f59d6 100644 --- a/src/ise-stt-mode.cpp +++ b/src/ise-stt-mode.cpp @@ -36,7 +36,7 @@ #endif -VoiceData *my_voicedata; +VoiceData *my_voicedata = NULL; static Evas_Object *win_main = NULL; @@ -46,8 +46,8 @@ static void _popup_back_cb(void *data, Evas_Object *obj, void *event_info); void voice_result_string_flush() { - LOGD("***** result_text : %s *******", my_voicedata->partial_result); - if (my_voicedata->partial_result) { + if (my_voicedata && my_voicedata->partial_result) { + LOGD("***** result_text : %s *******", my_voicedata->partial_result); char *retStr = (char *)calloc(strlen(my_voicedata->partial_result) + 1, sizeof(char)); strncpy(retStr, my_voicedata->partial_result, strlen(my_voicedata->partial_result)); ise_send_string(retStr); diff --git a/src/ise-stt-option.cpp b/src/ise-stt-option.cpp index 3571254..f24712d 100644 --- a/src/ise-stt-option.cpp +++ b/src/ise-stt-option.cpp @@ -32,6 +32,8 @@ #define item_append(obj, style, index, cb, udata) \ elm_genlist_item_append(obj, &(style), (void *)index, NULL, ELM_GENLIST_ITEM_NONE, cb, udata) +sclboolean g_setting_window_open_status = FALSE; + extern stt_h g_stt; static Evas_Object *radio_gp = NULL; Evas_Object *g_setting_naviframe = NULL; @@ -487,6 +489,7 @@ static Evas_Object *create_language_list(Evas_Object *parent) void create_setting_window() { + g_setting_window_open_status = TRUE; ise_hide_stt_mode(); Evas_Object *window = NULL; diff --git a/src/ise.cpp b/src/ise.cpp index 8819bff..0ace520 100644 --- a/src/ise.cpp +++ b/src/ise.cpp @@ -75,6 +75,8 @@ static bool g_softcandidate_show = false; #define SOFT_CANDIDATE_DELETE_TIME (1.0/100) static Ecore_Timer *g_softcandidate_hide_timer = NULL; +extern sclboolean g_setting_window_open_status; + KEYBOARD_STATE g_keyboard_state = { 0, 0, @@ -1202,9 +1204,10 @@ ise_show(int ic) } /* Reset input mode if the input context value has changed */ - if (ic != g_keyboard_state.ic) { + if (ic != g_keyboard_state.ic && !g_setting_window_open_status) { reset_inputmode = TRUE; } + g_keyboard_state.ic = ic; /* Reset input mode if the current language is not the selected language */ const sclchar * cur_lang = _language_manager.get_current_language(); @@ -1215,7 +1218,7 @@ ise_show(int ic) } /* No matter what, just reset the inputmode if it needs to */ - if (g_keyboard_state.need_reset) { + if (g_keyboard_state.need_reset && !g_setting_window_open_status) { reset_inputmode = TRUE; } g_keyboard_state.need_reset = FALSE; @@ -1411,6 +1414,11 @@ ise_show(int ic) hide_indicator_window(); } #endif + + if (g_setting_window_open_status) { + ise_show_stt_mode(NATIVE_WINDOW_CAST(g_core.get_main_window())); + } + g_setting_window_open_status = FALSE; } /** -- 2.7.4