From 014fd5c8630d59b3d996743739c5b97e18ae6c01 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Wed, 26 Jun 2013 11:42:43 +0900 Subject: [PATCH] Modified to play tts with substitute strings Change-Id: I312236e276ae2ae081101a6c2dd404b00d85bef0 --- packaging/libscl-ui.spec | 2 +- scl/include/sclversion.h | 2 +- scl/sclcontroller.cpp | 12 +++++------- scl/sclresourcecache.cpp | 2 +- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/packaging/libscl-ui.spec b/packaging/libscl-ui.spec index 08c1007..eb92596 100644 --- a/packaging/libscl-ui.spec +++ b/packaging/libscl-ui.spec @@ -3,7 +3,7 @@ Name: libscl-ui Summary: A library for developing XML-based software keyboards -Version: 0.3.5 +Version: 0.3.6 Release: 1 Group: TO BE / FILLED IN License: TO BE / FILLED IN diff --git a/scl/include/sclversion.h b/scl/include/sclversion.h index 2a319f3..24b4d8a 100644 --- a/scl/include/sclversion.h +++ b/scl/include/sclversion.h @@ -18,7 +18,7 @@ #ifndef __SCL_VERSION_H__ #define __SCL_VERSION_H__ -#define SCL_VERSION "0.3.5-1" +#define SCL_VERSION "0.3.6-1" #endif //__SCL_VERSION_H diff --git a/scl/sclcontroller.cpp b/scl/sclcontroller.cpp index 2776ebb..f1340cb 100644 --- a/scl/sclcontroller.cpp +++ b/scl/sclcontroller.cpp @@ -1346,21 +1346,19 @@ CSCLController::process_button_over_event(sclwindow window, sclint x, sclint y, if (coordinate->key_type != KEY_TYPE_NONE) { if (context->get_tts_enabled()) { - const char *targetstr = coordinate->hint_string[shiftidx][btncontext->multikeyIdx]; - printf("coordinate->hint_string[%d][%d] : %p\n", shiftidx, btncontext->multikeyIdx, targetstr); + const sclchar *targetstr = coordinate->hint_string[shiftidx][btncontext->multikeyIdx]; if (targetstr == NULL) { - targetstr = coordinate->key_value[shiftidx][btncontext->multikeyIdx]; + targetstr = coordinate->label[shiftidx][0]; } - printf("coordinate->key_value[%d][%d] : %p\n", shiftidx, btncontext->multikeyIdx, targetstr); if (targetstr == NULL) { - targetstr = coordinate->label[shiftidx][0]; + targetstr = coordinate->key_value[shiftidx][btncontext->multikeyIdx]; } - printf("coordinate->label[%d][0] : %p\n", shiftidx, targetstr); /*if(state->get_cur_action_state() == ACTION_STATE_BASE_LONGKEY || state->get_cur_action_state() == ACTION_STATE_POPUP_LONGKEY ) { targetstr = coordinate->long_key_value; }*/ - utils->play_tts(targetstr); + const sclchar *sayit = cache->find_substituted_string(targetstr); + utils->play_tts(sayit); } } } diff --git a/scl/sclresourcecache.cpp b/scl/sclresourcecache.cpp index 94b4b14..23514a1 100644 --- a/scl/sclresourcecache.cpp +++ b/scl/sclresourcecache.cpp @@ -1028,7 +1028,7 @@ CSCLResourceCache::get_label_properties(sclchar *label_type, sclbyte index) cons } CSCLUtils *utils = CSCLUtils::get_instance(); - if (utils) { + if (utils && label_type) { utils->log("WARNINNG!!!!!!!!!!!!!!!!!! LABEL NAME %s COULD NOT BE FOUND!!!!!\n", label_type); } -- 2.7.4