Fix issue that change voice layout to normal layout after change language 55/90955/3
authorsungwook79.park <sungwook79.park@samsung.com>
Wed, 5 Oct 2016 06:49:31 +0000 (15:49 +0900)
committersungwook79.park <sungwook79.park@samsung.com>
Wed, 5 Oct 2016 08:02:58 +0000 (17:02 +0900)
Change-Id: I462b36e2c07c74d17a3bb13b0c7821d2681b1e74
Signed-off-by: sungwook79.park <sungwook79.park@samsung.com>
src/ise-stt-mode.cpp
src/ise-stt-option.cpp
src/ise.cpp

index 98c977c..c6f59d6 100644 (file)
@@ -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);
index 3571254..f24712d 100644 (file)
@@ -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;
index 8819bff..0ace520 100644 (file)
@@ -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;
 }
 
 /**