Modified to play tts with substitute strings 72/16772/2
authorJi-hoon Lee <dalton.lee@samsung.com>
Wed, 26 Jun 2013 02:42:43 +0000 (11:42 +0900)
committerSehwan Park <sehwan@tizen.org>
Wed, 5 Mar 2014 02:09:27 +0000 (18:09 -0800)
Change-Id: I312236e276ae2ae081101a6c2dd404b00d85bef0

packaging/libscl-ui.spec
scl/include/sclversion.h
scl/sclcontroller.cpp
scl/sclresourcecache.cpp

index 08c1007..eb92596 100644 (file)
@@ -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
index 2a319f3..24b4d8a 100644 (file)
@@ -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
 
index 2776ebb..f1340cb 100644 (file)
@@ -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);
                         }
                     }
                 }
index 94b4b14..23514a1 100644 (file)
@@ -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);
     }