From: sungwook79.park Date: Mon, 28 Nov 2016 08:44:28 +0000 (+0900) Subject: Show message Tab mic to speak when pause status in voice mode X-Git-Tag: accepted/tizen/3.0/common/20161130.065044~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6dadcf05c53f1219a25a23db4889fc46c5fba252;p=platform%2Fcore%2Fuifw%2Fise-default.git Show message Tab mic to speak when pause status in voice mode Change-Id: Ie345da18235d1b54150934d22bdc112b5d7c81f8 Signed-off-by: sungwook79.park --- diff --git a/src/ise-stt-mode.cpp b/src/ise-stt-mode.cpp index b7cd20e..8ca87cb 100644 --- a/src/ise-stt-mode.cpp +++ b/src/ise-stt-mode.cpp @@ -113,6 +113,17 @@ static Eina_Bool _recognition_failure_cb(void *data) return ECORE_CALLBACK_CANCEL; } +static Eina_Bool change_guide_text(void *data){ + + VoiceData *voicedata = (VoiceData *) data; + if (!voicedata) return ECORE_CALLBACK_CANCEL; + + if (voicedata->sttmanager->GetCurrent() == STT_STATE_RECORDING || voicedata->sttmanager->GetCurrent() == STT_STATE_PROCESSING) + elm_object_domain_translatable_part_text_set(voicedata->layout_main, "elm.text", PACKAGE, SK_TAP_TO_PAUSE); + + return ECORE_CALLBACK_CANCEL; +} + static void set_guide_text(VoiceData *vd, const char* text, bool translatable) { #ifdef _WEARABLE @@ -125,6 +136,11 @@ static void set_guide_text(VoiceData *vd, const char* text, bool translatable) elm_object_domain_translatable_part_text_set(vd->layout_main, "elm.text", PACKAGE, text); else elm_object_part_text_set(vd->layout_main, "elm.text", text); + + if (!strcmp(text, SK_SPEAK_NOW)) { + if (vd->guide_text_timer == NULL) + vd->guide_text_timer = ecore_timer_add(1.0, change_guide_text, vd); + } } void start_by_press(VoiceData *voicedata) @@ -168,7 +184,6 @@ static void on_mic_button_press_cb(void *data, Evas_Object *obj, void *event_inf ecore_timer_del(voicedata->refresh_timer); voicedata->refresh_timer = NULL; } - set_guide_text(voicedata, SK_SPEAK_NOW, true); } else { if (NULL != voicedata->guide_text_timer) { ecore_timer_del(voicedata->guide_text_timer); @@ -294,7 +309,7 @@ void set_animation_state(VoiceData *voicedata) if (voicedata->effector) voicedata->effector->Stop(true); - set_guide_text(voicedata, ""); + set_guide_text(voicedata, "Tap mic to speak"); } else if (voicedata->state == STT_STATE_VAL_LISTENING) { set_guide_text(voicedata, SK_SPEAK_NOW, true);