From 7291e437d68d92a295bd63336d425895964ac1ef Mon Sep 17 00:00:00 2001 From: "sungwook79.park" Date: Wed, 3 Aug 2016 10:19:27 +0900 Subject: [PATCH 01/16] Update package version to 0.0.160803 Change-Id: I1d51e992a4b96f6ea9d4c19e63e4f7545c11fb67 Signed-off-by: sungwook79.park --- packaging/org.tizen.inputdelegator.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/org.tizen.inputdelegator.spec b/packaging/org.tizen.inputdelegator.spec index 2af5a00..fef6886 100755 --- a/packaging/org.tizen.inputdelegator.spec +++ b/packaging/org.tizen.inputdelegator.spec @@ -1,6 +1,6 @@ Name: org.tizen.inputdelegator Summary: Input Delegator Application -Version: 0.0.160712 +Version: 0.0.160803 Release: 1 Group: Applications License: Apache-2.0 -- 2.7.4 From 8a83b521aa0280e6a749237afbd29d76ae0e994d Mon Sep 17 00:00:00 2001 From: "sungwook79.park" Date: Fri, 5 Aug 2016 16:04:00 +0900 Subject: [PATCH 02/16] Remove build warning Change-Id: Ic6963cacae66f84adea5bcde843ebec3728bc531 Signed-off-by: sungwook79.park --- inc/w-input-stt-engine.h | 2 +- inc/w-input-stt-voice.h | 2 +- src/MoreOption.cpp | 3 +- src/w-input-emoticon.cpp | 22 +------------ src/w-input-keyboard.cpp | 20 ------------ src/w-input-selector.cpp | 47 +-------------------------- src/w-input-stt-engine.cpp | 39 ++-------------------- src/w-input-stt-tos.cpp | 81 +++++++--------------------------------------- src/w-input-stt-voice.cpp | 65 +++++++------------------------------ 9 files changed, 29 insertions(+), 252 deletions(-) diff --git a/inc/w-input-stt-engine.h b/inc/w-input-stt-engine.h index 2d392cb..8dbb1df 100755 --- a/inc/w-input-stt-engine.h +++ b/inc/w-input-stt-engine.h @@ -98,7 +98,7 @@ typedef enum _Feedback_Type{ void set_animation_state(VoiceData *ud); -char * error_string(int ecode); +const char * error_string(int ecode); // STT functions bool _app_stt_initialize(VoiceData *user_data); void on_feedback(stt_h handle); diff --git a/inc/w-input-stt-voice.h b/inc/w-input-stt-voice.h index 42b46e6..435b4f9 100755 --- a/inc/w-input-stt-voice.h +++ b/inc/w-input-stt-voice.h @@ -81,7 +81,7 @@ int is_lang_supported_by_stt(char lang[]); Evas_Object *show_voice_window(Evas_Object *parent, VoiceData *voicedata); void on_stt_pause(VoiceData *voicedata); void on_destroy(VoiceData *voicedata); -char* get_lang_label(char lang[]); +const char* get_lang_label(char lang[]); void _stt_lang_changed_cb(keynode_t *key, void* data); void start_by_press(VoiceData *voicedata); void voice_get_string(const char *keyValue, VoiceData *voicedata); diff --git a/src/MoreOption.cpp b/src/MoreOption.cpp index 41b6b26..63505ba 100755 --- a/src/MoreOption.cpp +++ b/src/MoreOption.cpp @@ -211,7 +211,7 @@ void MoreOption::Update() char lang[6] = {0, }; strncpy(lang, ((VoiceData *)voicedata)->kbd_lang , 5); - char* display_lang = get_lang_label(lang); + const char* display_lang = get_lang_label(lang); eext_more_option_item_part_text_set(item, "selector,sub_text", display_lang); } @@ -262,7 +262,6 @@ void MoreOption::AddMorePage() { [](void *data, Evas_Object *obj, void *event_info) { PRINTFUNC(DLOG_DEBUG, "item,selected"); - Eext_Object_Item *selected_item = (Eext_Object_Item *)event_info; }, NULL); } diff --git a/src/w-input-emoticon.cpp b/src/w-input-emoticon.cpp index 33be4de..d73b692 100755 --- a/src/w-input-emoticon.cpp +++ b/src/w-input-emoticon.cpp @@ -24,13 +24,11 @@ #define EMOTICON_CNT 27 -static int previous_icon = -1; - using namespace std; typedef struct { int code; - char* name; + const char* name; }Emoticon; Emoticon emoticon_info[EMOTICON_CNT] = { @@ -94,21 +92,6 @@ _rotary_selector_rotary_cb(void *data, Evas_Object *obj, Eext_Rotary_Event_Info return ECORE_CALLBACK_PASS_ON; } -static char *_access_info_prepend_cb(void *data, Evas_Object *obj) -{ - PRINTFUNC(DLOG_DEBUG, "%s", __func__); - - std::string text; - - if (previous_icon == 10 || previous_icon == 11){ - text = std::string("Page") + " " +std::string(dgettext(PACKAGE, emoticon_info[previous_icon].name)); - text = text + " " + gettext("WDS_TTS_TBBODY_DOUBLE_TAP_TO_SEND"); - } else { - text = std::string("Page"); - } - return strdup(text.c_str()); -} - static void _rotary_selector_item_clicked(void *data, Evas_Object *obj, void *event_info) { PRINTFUNC(DLOG_DEBUG, "%s", __func__); @@ -157,7 +140,6 @@ void ise_show_emoticon_popup_rotary(void *data) if (!ad) return; - Eext_Object_Item *first_it; Evas_Object *rotary_selector = eext_rotary_selector_add(ad->naviframe); // uxt_theme_object_replace_color(rotary_selector, "B01153", "AO0117"); @@ -167,8 +149,6 @@ void ise_show_emoticon_popup_rotary(void *data) Evas_Object *img = NULL; Eext_Object_Item *item = eext_rotary_selector_item_append(rotary_selector); - if (i == 0) first_it = item; - img = elm_image_add(rotary_selector); elm_image_file_set(img, get_emoticon_file_name(i), NULL); eext_rotary_selector_item_part_content_set(item, "item,bg_image", EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL, img); diff --git a/src/w-input-keyboard.cpp b/src/w-input-keyboard.cpp index ec6393d..943ab3b 100755 --- a/src/w-input-keyboard.cpp +++ b/src/w-input-keyboard.cpp @@ -29,26 +29,6 @@ extern App_Data* app_data; Evas_Object *entry; -static void input_keyboard_app_control_send_reply_cb(app_control_h request, app_control_h reply, - app_control_result_e result, void *user_data); - -static void input_keyboard_app_control_send_reply_cb(app_control_h request, app_control_h reply, - app_control_result_e result, void *user_data) -{ - char *feedback = NULL; - if (result == APP_CONTROL_RESULT_SUCCEEDED) { - if (reply) { - int ret; - ret = app_control_get_extra_data(reply, - "template_feedback", &feedback); - } - reply_to_sender_by_callback(feedback, "keyboard"); - free(feedback); - elm_exit(); - } -} - - bool input_keyboard_init(app_control_h app_control) { int ret = -1; diff --git a/src/w-input-selector.cpp b/src/w-input-selector.cpp index 021f6cd..4760a7a 100755 --- a/src/w-input-selector.cpp +++ b/src/w-input-selector.cpp @@ -43,15 +43,12 @@ InputTypeData g_input_type_data; static Elm_Object_Item *it_empty; static Elm_Object_Item *it_title; -static Elm_Object_Item *it_plus; Evas_Coord last_step; // 0 ~ 9 for gesture, 10~11 for rotary void _init_app_data(App_Data* app_data); static void _app_language_changed(app_event_info_h event_info, void *user_data); -static char *_genlist_text_set_theme_color(const char *str, const char *code); - Evas_Object* _create_genlist(Evas_Object* parent); void _create_genlist_items(void* user_data); static void _popup_close_cb(void *data, Evas_Object *obj, void *event_info); @@ -342,46 +339,6 @@ static void __ise_gl_lang_changed(void *data, Evas_Object *obj, void *event_info elm_genlist_realized_items_update(obj); } - -static char *_genlist_text_set_theme_color(const char *str, const char *code) -{ - int r, g, b, a; - Eina_Strbuf *buf = NULL; - char *colored = NULL; - - if (code == NULL) - return NULL; - - buf = eina_strbuf_new(); - if (buf == NULL) { - PRINTFUNC(DLOG_ERROR, "Can not get create strbuf"); - return NULL; - } - -// ea_theme_color_get(code, -// &r, &g, &b, &a, -// NULL, NULL, NULL, NULL, -// NULL, NULL, NULL, NULL); - - eina_strbuf_append_printf(buf, "%s", - r, g, b, a, str); - - colored = eina_strbuf_string_steal(buf); - - eina_strbuf_free(buf); - - return colored; -} - - -static void _app_control_send_reply_cb(app_control_h request, app_control_h reply, - app_control_result_e result, void *user_data) -{ - PRINTFUNC(DLOG_DEBUG, ""); - reply_to_sender_by_callback(NULL, NULL); - elm_exit(); -} - void set_source_caller_app_id(app_control_h app_control) { if(!app_control){ @@ -409,7 +366,7 @@ void reply_to_sender_by_callback(const char *value, const char *type) int ret; if (value) - app_control_add_extra_data(app_control, "selected_context", value); + app_control_add_extra_data(app_control, APP_CONTROL_DATA_TEXT, value); if (type) app_control_add_extra_data(app_control, "reply_type", type); @@ -554,7 +511,6 @@ Evas_Object* _create_genlist(Evas_Object* navi) return NULL; elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS); - elm_genlist_scroller_policy_set(genlist, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF); Evas_Object* circle_object_genlist = eext_circle_object_genlist_add(genlist, app_data->circle_surface); eext_circle_object_genlist_scroller_policy_set(circle_object_genlist, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF); @@ -757,7 +713,6 @@ bool _app_create(void* user_data) void _app_service(app_control_h service, void* user_data) { int ret; - bool b_ret; char *context = NULL; char **input_type_array = NULL; int input_type_array_len = -1; diff --git a/src/w-input-stt-engine.cpp b/src/w-input-stt-engine.cpp index e43a338..92075d5 100755 --- a/src/w-input-stt-engine.cpp +++ b/src/w-input-stt-engine.cpp @@ -38,47 +38,12 @@ } while (0); -static stt_state_e static_current_stt_state = STT_STATE_CREATED; static stt_h g_stt; -static void _on_state_change_cb(stt_h stt, stt_state_e previous, stt_state_e current, void* voice_data); -static void _on_error_cb(stt_h stt, stt_error_e reason, void *voice_data); -static void _on_result_cb(stt_h stt, stt_result_event_e event, const char** data, int data_count, const char* msg, void *voice_data); -static bool is_auto_spacing(void *voice_data) +const char * error_string(int ecode) { - VoiceData *voicedata = (VoiceData *)voice_data; - int lang = 0, ret = 0; -#if 0 - ret = preference_get_int(PREFERENCE_ISE_STT_LANGUAGE, &lang); - if(PREFERENCE_ERROR_NONE != ret){ - PRINTFUNC(DLOG_ERROR, "preference_get_int error!(%d)", ret); - } -#else - ret = vconf_get_int(VCONFKEY_ISE_STT_LANGUAGE, &lang); - if (ret !=0) { - PRINTFUNC(DLOG_ERROR, "Vconf_get_int error!(%d)", ret); - } -#endif - switch(lang) { - case 0 : - if((strcmp(voicedata->kbd_lang, "zh_CN") == 0) || (strcmp(voicedata->kbd_lang, "ja_JP") == 0)) - return false; - else - return true; - case 7: // Japanese - case 10: // Chinese - return false; - default : - return true; - } - - return true; -} - -char * error_string(int ecode) -{ - char *str = NULL; + const char *str = NULL; switch (ecode) { case STT_ERROR_OUT_OF_MEMORY: str = "STT_ERROR_OUT_OF_MEMORY"; diff --git a/src/w-input-stt-tos.cpp b/src/w-input-stt-tos.cpp index 0fc51fa..67359d3 100755 --- a/src/w-input-stt-tos.cpp +++ b/src/w-input-stt-tos.cpp @@ -46,7 +46,7 @@ static Evas_Object *g_circle_object_first = NULL; #define N66_URL "https://account.samsung.com/membership/pp" -char *nuance_support_language[12][2] = { +const char *nuance_support_language[12][2] = { {"en_GB", "en"}, // fallback {"de_DE", "de"}, {"en_US", "en"}, @@ -102,7 +102,6 @@ static void __bt_connection_result_cb(app_control_h request, app_control_h reply } void launch_bt_connection_popup(App_Data* data){ - App_Data* ad = (App_Data*)data; PRINTFUNC(DLOG_DEBUG, "Need to launch BT connection popup"); app_control_h app_control; @@ -207,8 +206,6 @@ static void show_terms(void *data, Evas_Object *obj, void *event_info) if (!data) return; if (!event_info) return; - Evas_Object *parent_win = (Evas_Object *)data; - int wms_connected = 0; vconf_get_int(VCONFKEY_WMS_WMANAGER_CONNECTED, &wms_connected); @@ -306,7 +303,7 @@ _naviframe_pop_cb(void *data , Elm_Object_Item *it) std::string getColorStyle(const char *code) { std::string strRet; - int r, g, b, a; + int r = 0xFF, g = 0xFF, b = 0xFF, a = 0xFF; char strColor[256]; // ea_theme_color_get(code, &r, &g, &b, &a, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); snprintf(strColor, 256, "", r, g, b, a); @@ -318,13 +315,13 @@ std::string getColorStyle(const char *code) std::string getFontStyle(const char *code) { std::string strRet; - int r, g, b, a; - char *fontStyle; - int fontSize; - char strColor[256]; - char strFont[256]; +// int r = 0xFF, g = 0xFF, b = 0xFF, a = 0xFF; +// char *fontStyle; +// int fontSize; +// char strColor[256]; +// char strFont[256]; // ea_theme_color_get(code, &r, &g, &b, &a, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - snprintf(strColor, 256, "", r, g, b, a); +// snprintf(strColor, 256, "", r, g, b, a); // ea_theme_font_get(code,&fontStyle,&fontSize); /* @@ -383,7 +380,6 @@ static void _language_changed_cb(void *_data, Evas_Object *_obj, void *_event_in int index = (int)_data; std::string terms = ""; - Elm_Object_Item *navi_it = NULL; char body_str[40000]; @@ -643,62 +639,7 @@ static void _response_n66_cb(void *data, Evas_Object *obj, void *event_info) static void _n66_language_changed_cb(void *_data, Evas_Object *_obj, void *_event_info) { - std::string terms = ""; - - Evas_Object* entry = elm_layout_content_get(_obj, "elm.swallow.content"); - - // 1. Get Country Code - char *country_code = NULL; -// country_code = vconf_get_str(VCONFKEY_CSC_COUNTRY_ISO); - - // 2. Set String ID depend on Count Code - char* popup_title_id = NULL; - char* popup_body_id = NULL; -// if (country_code) { -// if (!strcmp(country_code, "CN")) { -// popup_title_id = TOS_TITLE_CHN; -// popup_body_id = TOS_N66_BODY_CHN; -// } else { -// popup_title_id = TOS_TITLE; -// popup_body_id = TOS_N66_BODY; -// } -// } else { - PRINTFUNC(DLOG_ERROR, "Getting Count Code is Error!!! Set default TOS Text!"); - popup_title_id = TOS_TITLE; - popup_body_id = TOS_N66_BODY; -// } -// ea_cutlink_h cutlink; -// ea_cutlink_create(&cutlink, entry, EA_CUTLINK_USER); - - /* add a new scheme */ -// ea_cutlink_scheme_add(cutlink, "hello:", N66_URL); - - /* set prefix and postfix for a new scheme */ -// ea_cutlink_prefix_set(cutlink, "hello:", -// ""); -// ea_cutlink_postfix_set(cutlink, "hello:", ""); - - char *markup = NULL; - char *txt = NULL; - /* set text for parsing */ - markup = elm_entry_utf8_to_markup(gettext(popup_body_id)); -// ea_cutlink_markup_set(cutlink, markup); - -// ea_cutlink_markup_apply(cutlink, gettext(popup_body_id), &txt); - PRINTFUNC(DLOG_DEBUG, "%s", txt); - - terms = tagging(std::string(gettext(txt))); - elm_entry_entry_set(entry, terms.c_str()); - -// if (txt) -// free(txt); - - if (markup) - free(markup); - /* destroy cutlink object */ -// ea_cutlink_destroy(cutlink); } Evas_Object *create_tos_n66_popup(void *data) @@ -721,7 +662,7 @@ Evas_Object *create_tos_n66_popup(void *data) edj_path = edj_path + STT_EDJ_FILE; // 1. Get Country Code - char *country_code = NULL; +// char *country_code = NULL; // country_code = vconf_get_str(VCONFKEY_CSC_COUNTRY_ISO); // 2. Set String ID depend on Count Code @@ -737,8 +678,8 @@ Evas_Object *create_tos_n66_popup(void *data) // } // } else { PRINTFUNC(DLOG_ERROR, "Getting Count Code is Error!!! Set default TOS Text!"); - popup_title_id = TOS_TITLE; - popup_body_id = TOS_N66_BODY; +// popup_title_id = TOS_TITLE; +// popup_body_id = TOS_N66_BODY; // } diff --git a/src/w-input-stt-voice.cpp b/src/w-input-stt-voice.cpp index eefd3db..17abe66 100755 --- a/src/w-input-stt-voice.cpp +++ b/src/w-input-stt-voice.cpp @@ -67,7 +67,7 @@ static Elm_Genlist_Item_Class itc_2text; static void set_guide_text(VoiceData *vd, const char* text, bool translatable = false); -char *supported_language[7] = { +const char *supported_language[7] = { "auto", "en_US", "es_US", @@ -78,7 +78,7 @@ char *supported_language[7] = { }; -char *disp_lang_array[7] = { +const char *disp_lang_array[7] = { "", "English (United States)", "Español (América Latina)", @@ -110,9 +110,9 @@ typedef enum { static void get_stt_default_language(VoiceData *my_voicedata); -char* get_lang_label(char lang[]) +const char* get_lang_label(char lang[]) { - char *str = NULL; + const char *str = NULL; if (strcmp (lang, "en_US") == 0) str = disp_lang_array[1]; @@ -162,8 +162,6 @@ _bring_in_cb(void *data) static inline Evas_Coord get_text_block_size(Evas_Object *obj, std::string text) { - int calculated_height = 0; - int max_height = 1280; int unit_width = 282; @@ -208,7 +206,7 @@ static Eina_Bool _update_textblock_timer_cb(void *data) voicedata->textblock_timer = NULL; std::string result_text; - for(int i = 0; i < voicedata->stt_results.size(); i++){ + for(unsigned int i = 0; i < voicedata->stt_results.size(); i++){ if(i == voicedata->stt_results.size()-1){ result_text += voicedata->stt_results.at(i); } else { @@ -222,7 +220,6 @@ static Eina_Bool _update_textblock_timer_cb(void *data) Evas_Object *scroller = NULL; Evas_Object *box = NULL; Evas_Object *inner_layout = NULL; - char *strbuf = NULL; scroller = elm_layout_content_get((Evas_Object *)voicedata->layout_main, "text_area"); if(!scroller) @@ -441,7 +438,7 @@ static void on_confirm_button_clicked_cb(void *data, Evas_Object *obj, void *eve VoiceData* voicedata = (VoiceData*)data; std::string result_text; - for(int i = 0; i < voicedata->stt_results.size(); i++){ + for(unsigned int i = 0; i < voicedata->stt_results.size(); i++){ result_text += voicedata->stt_results.at(i); if(i != voicedata->stt_results.size()-1) result_text += " "; @@ -1113,7 +1110,6 @@ static void language_set_genlist_radio_cb(void *data, Evas_Object *obj, void *ev if(!data) return; int index = 0; - Evas_Object *genlist = (Evas_Object *) data; Elm_Object_Item * item = (Elm_Object_Item *) event_info; if (item) { @@ -1127,7 +1123,7 @@ static void language_set_genlist_radio_cb(void *data, Evas_Object *obj, void *ev ecore_timer_add(0.3, close_setting_window_idler_cb, NULL); } -static void language_changed_cb2(void *data, Evas_Object *obj, const char *emission, const char *source) +static void language_changed_cb(void *data, Evas_Object *obj, const char *emission, const char *source) { if(!obj) return; elm_genlist_realized_items_update(obj); @@ -1170,7 +1166,6 @@ static Evas_Object *create_language_list(Evas_Object *parent) int i = 0; int lang_val = 0; Elm_Object_Item * item = NULL; - Elm_Object_Item * item_title = NULL; evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL); @@ -1185,7 +1180,7 @@ static Evas_Object *create_language_list(Evas_Object *parent) itc_title.func.text_get = __get_genlist_title_label; itc_title.func.content_get = NULL; - item_title = elm_genlist_item_append(genlist, &itc_title, (void *)-1, NULL, ELM_GENLIST_ITEM_GROUP, NULL, genlist); + item = elm_genlist_item_append(genlist, &itc_title, (void *)-1, NULL, ELM_GENLIST_ITEM_GROUP, NULL, genlist); // 2 line text itc_2text.item_style = "2text.1icon.1/sub1.multiline"; @@ -1234,7 +1229,7 @@ static Evas_Object *create_language_list(Evas_Object *parent) elm_radio_value_set(radio_gp, lang_val); - elm_object_signal_callback_add(genlist, "elm,system,language,change", "elm", language_changed_cb2, NULL); + elm_object_signal_callback_add(genlist, "elm,system,language,change", "elm", language_changed_cb, NULL); // eext_rotary_event_callback_set(genlist, _language_list_rotary_cb, NULL); evas_object_smart_callback_add(genlist, "realized", _language_list_item_realized, NULL); @@ -1245,17 +1240,11 @@ static Evas_Object *create_language_list(Evas_Object *parent) void create_setting_window(Evas_Object *more_option_layout) { - Evas_Coord w, h; - Evas_Object *window = NULL; Evas_Object *layout = NULL; Evas_Object *genlist = NULL; Evas_Object *naviframe = NULL; - Elm_Object_Item *item = NULL; - - const char *str = "mobile"; - /** * Create full size window * @@ -1267,12 +1256,10 @@ void create_setting_window(Evas_Object *more_option_layout) } elm_win_title_set(window, "voice-input-setting"); -// ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h); elm_win_borderless_set(window, EINA_TRUE); - evas_object_resize(window, w, h); + elm_win_indicator_mode_set(window, ELM_WIN_INDICATOR_HIDE); - elm_win_profiles_set(window, &str, 1); /** * Set window theme @@ -1328,7 +1315,7 @@ void create_setting_window(Evas_Object *more_option_layout) genlist = create_language_list(naviframe); //item = elm_naviframe_item_push(naviframe, "IDS_VC_HEADER_VOICE_INPUT_LANGUAGE", NULL, NULL, genlist, NULL); - item = elm_naviframe_item_push(naviframe, NULL, NULL, NULL, genlist, "empty"); + elm_naviframe_item_push(naviframe, NULL, NULL, NULL, genlist, "empty"); //elm_object_item_domain_text_translatable_set(item, PACKAGE, EINA_TRUE); g_setting_window = window; @@ -1336,15 +1323,6 @@ void create_setting_window(Evas_Object *more_option_layout) g_more_option_layout = more_option_layout; } -static void language_changed_cb(void *data, Evas_Object * obj, void *event_info) -{ - PRINTFUNC(DLOG_DEBUG, ""); - - if(!obj) return; - if(!data) return; -} - - void _stt_lang_changed_cb(keynode_t *key, void* data) { PRINTFUNC(DLOG_DEBUG, ""); @@ -1428,14 +1406,6 @@ static Evas_Object *create_text_detiled_view(Evas_Object *parent) return layout; } -static Eina_Bool _idler_cb2(void *data) -{ - VoiceData *voicedata = (VoiceData *)data; - -// uxt_scroller_set_auto_scroll_enabled(voicedata->scroller, EINA_FALSE); - - return ECORE_CALLBACK_CANCEL; -} static Eina_Bool __stt_entry_detailed_view_pop_cb(void *data, Elm_Object_Item *it) { @@ -1470,8 +1440,6 @@ static Eina_Bool __stt_entry_detailed_view_pop_cb(void *data, Elm_Object_Item *i elm_scroller_region_bring_in(voicedata->scroller, 0, y+h, 300, 168); - ecore_idler_add(_idler_cb2, voicedata); - return EINA_TRUE; } @@ -1553,7 +1521,6 @@ static Evas_Object *create_textblock(void* data) Evas_Object *box = NULL; Evas_Object *inner_layout = NULL; Evas_Object *entry = NULL; - Evas_Object *tb = NULL; Evas_Object *circle_scroller = NULL; string edj_path = get_resource_path(); @@ -1639,16 +1606,8 @@ static Evas_Object *create_fullview(Evas_Object *parent, VoiceData *r_voicedata) { PRINTFUNC(NO_PRINT, ""); - Evas_Object *more_option_layout = NULL; Evas_Object *layout_main = NULL; - Evas_Object *lang_btn_box = NULL; - Evas_Object *lang_btn = NULL; - Evas_Object *to = NULL; - Evas_Object *ao = NULL; - char *lang_type_str = NULL; - - int lang_val = 0; int is_screen_reader_on = FALSE; VoiceData *voicedata = r_voicedata; @@ -1917,8 +1876,6 @@ void on_destroy(VoiceData *r_voicedata) VoiceData *voicedata = (VoiceData *)r_voicedata; - int result = STT_ERROR_NONE; - powerUnlock(); if (NULL != voicedata) { -- 2.7.4 From 13747374d04ec6809411b19536484753586a213e Mon Sep 17 00:00:00 2001 From: "sungwook79.park" Date: Fri, 5 Aug 2016 17:26:26 +0900 Subject: [PATCH 03/16] Change default attr to root Change-Id: I3bd1bfd10a8f0188e6755cbc958f31d40fcb9113 Signed-off-by: sungwook79.park --- packaging/org.tizen.inputdelegator.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/org.tizen.inputdelegator.spec b/packaging/org.tizen.inputdelegator.spec index fef6886..0e59ba6 100755 --- a/packaging/org.tizen.inputdelegator.spec +++ b/packaging/org.tizen.inputdelegator.spec @@ -100,7 +100,7 @@ cp -rf org.tizen.inputdelegator.xml %{buildroot}%{_datadir}/packages %files %manifest org.tizen.inputdelegator.manifest -%defattr(-,app,app,-) +%defattr(-,root,root,-) %license LICENSE %{_datadir}/packages/org.tizen.inputdelegator.xml %{_app_destdir}%{_app_prefix}/bin/inputdelegator -- 2.7.4 From b9965e640a46def51ad85a340f859e0e31076956 Mon Sep 17 00:00:00 2001 From: "sungwook79.park" Date: Fri, 5 Aug 2016 17:30:26 +0900 Subject: [PATCH 04/16] Update package version to 0.1.160805 Change-Id: I407cc271de5ac1350b88d01cf4604605c7e4cadb Signed-off-by: sungwook79.park --- org.tizen.inputdelegator.xml | 2 +- packaging/org.tizen.inputdelegator.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.tizen.inputdelegator.xml b/org.tizen.inputdelegator.xml index 8511202..316606f 100755 --- a/org.tizen.inputdelegator.xml +++ b/org.tizen.inputdelegator.xml @@ -1,5 +1,5 @@ - + diff --git a/packaging/org.tizen.inputdelegator.spec b/packaging/org.tizen.inputdelegator.spec index 0e59ba6..366ba6a 100755 --- a/packaging/org.tizen.inputdelegator.spec +++ b/packaging/org.tizen.inputdelegator.spec @@ -1,6 +1,6 @@ Name: org.tizen.inputdelegator Summary: Input Delegator Application -Version: 0.0.160803 +Version: 0.1.160805 Release: 1 Group: Applications License: Apache-2.0 -- 2.7.4 From 322ee6146c2c194766985391ffdfa52f9a87f04b Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Mon, 8 Aug 2016 11:26:39 +0900 Subject: [PATCH 05/16] Fix coding rule detected by coding rule checker Change-Id: I97425a1fd61292916c738d6c265ca8eafb874cd3 Signed-off-by: Jihoon Kim --- src/w-input-selector.cpp | 28 ++++++++++------------------ src/w-input-stt-tos.cpp | 8 +++----- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/src/w-input-selector.cpp b/src/w-input-selector.cpp index 4760a7a..f08b774 100755 --- a/src/w-input-selector.cpp +++ b/src/w-input-selector.cpp @@ -202,11 +202,9 @@ static Evas_Object * __ise_gl_2button_content_get(void *data, Evas_Object *obj, string path_ic; if(!strcmp(first_input_type, "input_voice")) { path_ic = path + "images/w_mode_stt_ic.png"; - } - else if(!strcmp(first_input_type, "input_emoticon")) { + } else if (!strcmp(first_input_type, "input_emoticon")) { path_ic = path + "images/Delta_w_mode_emoticon_ic.png"; - } - else if(!strcmp(first_input_type, "input_keyboard")) { + } else if (!strcmp(first_input_type, "input_keyboard")) { path_ic = path + "images/w_mode_keyboard_ic.png"; evas_object_propagate_events_set(btn, EINA_FALSE); } @@ -218,11 +216,9 @@ static Evas_Object * __ise_gl_2button_content_get(void *data, Evas_Object *obj, string path_ic; if(!strcmp(second_input_type, "input_voice")) { path_ic = path + "images/w_mode_stt_ic.png"; - } - else if(!strcmp(second_input_type, "input_emoticon")) { + } else if (!strcmp(second_input_type, "input_emoticon")) { path_ic = path + "images/Delta_w_mode_emoticon_ic.png"; - } - else if(!strcmp(second_input_type, "input_keyboard")) { + } else if (!strcmp(second_input_type, "input_keyboard")) { path_ic = path + "images/w_mode_keyboard_ic.png"; evas_object_propagate_events_set(btn, EINA_FALSE); } @@ -241,11 +237,9 @@ static Evas_Object * __ise_gl_2button_content_get(void *data, Evas_Object *obj, evas_object_layer_set(btn, 32000); if(!strcmp(first_input_type, "input_voice")) { evas_object_smart_callback_add(btn, "clicked", _stt_clicked_cb, app_data); - } - else if(!strcmp(first_input_type, "input_emoticon")) { + } else if (!strcmp(first_input_type, "input_emoticon")) { evas_object_smart_callback_add(btn, "clicked", _emoticon_clicked_cb, app_data); - } - else if(!strcmp(first_input_type, "input_keyboard")) { + } else if (!strcmp(first_input_type, "input_keyboard")) { evas_object_propagate_events_set(btn, EINA_FALSE); evas_object_smart_callback_add(btn, "clicked", _keyboard_clicked_cb, app_data); } @@ -253,11 +247,9 @@ static Evas_Object * __ise_gl_2button_content_get(void *data, Evas_Object *obj, evas_object_layer_set(btn, 32000); if(!strcmp(second_input_type, "input_voice")) { evas_object_smart_callback_add(btn, "clicked", _stt_clicked_cb, app_data); - } - else if(!strcmp(second_input_type, "input_emoticon")) { + } else if (!strcmp(second_input_type, "input_emoticon")) { evas_object_smart_callback_add(btn, "clicked", _emoticon_clicked_cb, app_data); - } - else if(!strcmp(second_input_type, "input_keyboard")) { + } else if (!strcmp(second_input_type, "input_keyboard")) { evas_object_propagate_events_set(btn, EINA_FALSE); evas_object_smart_callback_add(btn, "clicked", _keyboard_clicked_cb, app_data); } @@ -608,7 +600,7 @@ void _create_genlist_items(void* user_data) itc1->func.content_get = __ise_gl_2button_content_get; itc1->func.state_get = NULL; itc1->func.del = NULL; - }else{ + } else { itc1->item_style = "3button"; itc1->func.text_get = NULL; itc1->func.content_get = __ise_gl_3button_content_get; @@ -726,7 +718,7 @@ void _app_service(app_control_h service, void* user_data) ret = app_control_get_extra_data_array(service, APP_CONTROL_DATA_INPUT_TYPE, &input_type_array, &input_type_array_len); g_input_type_data.input_type_array = input_type_array; g_input_type_data.input_type_array_len = input_type_array_len; - }else{ + } else { ret = app_control_get_extra_data(service, APP_CONTROL_DATA_INPUT_TYPE, &context); if (ret == APP_CONTROL_ERROR_NONE) { if (!strcmp(context, "input_voice")) { diff --git a/src/w-input-stt-tos.cpp b/src/w-input-stt-tos.cpp index 67359d3..3ee5215 100755 --- a/src/w-input-stt-tos.cpp +++ b/src/w-input-stt-tos.cpp @@ -101,8 +101,8 @@ static void __bt_connection_result_cb(app_control_h request, app_control_h reply } } -void launch_bt_connection_popup(App_Data* data){ - +void launch_bt_connection_popup(App_Data* data) +{ PRINTFUNC(DLOG_DEBUG, "Need to launch BT connection popup"); app_control_h app_control; app_control_create(&app_control); @@ -114,7 +114,6 @@ void launch_bt_connection_popup(App_Data* data){ app_control_destroy(app_control); } - Eina_Bool set_tos_N66_agreed(Eina_Bool bSet) { int ret = vconf_set_bool(VCONFKEY_USER_AGREEMENT, bSet); @@ -385,7 +384,7 @@ static void _language_changed_cb(void *_data, Evas_Object *_obj, void *_event_in switch (index) { case 1: - snprintf(body_str, sizeof(body_str), gettext("LDS_IME_BODY_INFORMATION_PROVISION_AGREEMENT_P1_LEGALPHRASE_WC1"), " ","","",""); + snprintf(body_str, sizeof(body_str), gettext("LDS_IME_BODY_INFORMATION_PROVISION_AGREEMENT_P1_LEGALPHRASE_WC1"), " ", "", "", ""); terms = tagging(std::string(body_str)); terms = replaceAll(terms , std::string("\n"), std::string("
")); elm_entry_entry_set(elm_layout_content_get(_obj, "elm.swallow.content"), terms.c_str()); @@ -639,7 +638,6 @@ static void _response_n66_cb(void *data, Evas_Object *obj, void *event_info) static void _n66_language_changed_cb(void *_data, Evas_Object *_obj, void *_event_info) { - } Evas_Object *create_tos_n66_popup(void *data) -- 2.7.4 From d10bff62bbe2eff54ae5b99b69e2005d0d170ea1 Mon Sep 17 00:00:00 2001 From: "sungwook79.park" Date: Thu, 11 Aug 2016 14:18:11 +0900 Subject: [PATCH 06/16] Fix coding rule detected by coding rule checker Change-Id: I24ac53d4387835008aba2179f25aca6eb1a1d819 Signed-off-by: sungwook79.park --- src/w-input-selector.cpp | 28 ++++++++++------------------ src/w-input-stt-tos.cpp | 8 +++----- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/src/w-input-selector.cpp b/src/w-input-selector.cpp index 4760a7a..f08b774 100755 --- a/src/w-input-selector.cpp +++ b/src/w-input-selector.cpp @@ -202,11 +202,9 @@ static Evas_Object * __ise_gl_2button_content_get(void *data, Evas_Object *obj, string path_ic; if(!strcmp(first_input_type, "input_voice")) { path_ic = path + "images/w_mode_stt_ic.png"; - } - else if(!strcmp(first_input_type, "input_emoticon")) { + } else if (!strcmp(first_input_type, "input_emoticon")) { path_ic = path + "images/Delta_w_mode_emoticon_ic.png"; - } - else if(!strcmp(first_input_type, "input_keyboard")) { + } else if (!strcmp(first_input_type, "input_keyboard")) { path_ic = path + "images/w_mode_keyboard_ic.png"; evas_object_propagate_events_set(btn, EINA_FALSE); } @@ -218,11 +216,9 @@ static Evas_Object * __ise_gl_2button_content_get(void *data, Evas_Object *obj, string path_ic; if(!strcmp(second_input_type, "input_voice")) { path_ic = path + "images/w_mode_stt_ic.png"; - } - else if(!strcmp(second_input_type, "input_emoticon")) { + } else if (!strcmp(second_input_type, "input_emoticon")) { path_ic = path + "images/Delta_w_mode_emoticon_ic.png"; - } - else if(!strcmp(second_input_type, "input_keyboard")) { + } else if (!strcmp(second_input_type, "input_keyboard")) { path_ic = path + "images/w_mode_keyboard_ic.png"; evas_object_propagate_events_set(btn, EINA_FALSE); } @@ -241,11 +237,9 @@ static Evas_Object * __ise_gl_2button_content_get(void *data, Evas_Object *obj, evas_object_layer_set(btn, 32000); if(!strcmp(first_input_type, "input_voice")) { evas_object_smart_callback_add(btn, "clicked", _stt_clicked_cb, app_data); - } - else if(!strcmp(first_input_type, "input_emoticon")) { + } else if (!strcmp(first_input_type, "input_emoticon")) { evas_object_smart_callback_add(btn, "clicked", _emoticon_clicked_cb, app_data); - } - else if(!strcmp(first_input_type, "input_keyboard")) { + } else if (!strcmp(first_input_type, "input_keyboard")) { evas_object_propagate_events_set(btn, EINA_FALSE); evas_object_smart_callback_add(btn, "clicked", _keyboard_clicked_cb, app_data); } @@ -253,11 +247,9 @@ static Evas_Object * __ise_gl_2button_content_get(void *data, Evas_Object *obj, evas_object_layer_set(btn, 32000); if(!strcmp(second_input_type, "input_voice")) { evas_object_smart_callback_add(btn, "clicked", _stt_clicked_cb, app_data); - } - else if(!strcmp(second_input_type, "input_emoticon")) { + } else if (!strcmp(second_input_type, "input_emoticon")) { evas_object_smart_callback_add(btn, "clicked", _emoticon_clicked_cb, app_data); - } - else if(!strcmp(second_input_type, "input_keyboard")) { + } else if (!strcmp(second_input_type, "input_keyboard")) { evas_object_propagate_events_set(btn, EINA_FALSE); evas_object_smart_callback_add(btn, "clicked", _keyboard_clicked_cb, app_data); } @@ -608,7 +600,7 @@ void _create_genlist_items(void* user_data) itc1->func.content_get = __ise_gl_2button_content_get; itc1->func.state_get = NULL; itc1->func.del = NULL; - }else{ + } else { itc1->item_style = "3button"; itc1->func.text_get = NULL; itc1->func.content_get = __ise_gl_3button_content_get; @@ -726,7 +718,7 @@ void _app_service(app_control_h service, void* user_data) ret = app_control_get_extra_data_array(service, APP_CONTROL_DATA_INPUT_TYPE, &input_type_array, &input_type_array_len); g_input_type_data.input_type_array = input_type_array; g_input_type_data.input_type_array_len = input_type_array_len; - }else{ + } else { ret = app_control_get_extra_data(service, APP_CONTROL_DATA_INPUT_TYPE, &context); if (ret == APP_CONTROL_ERROR_NONE) { if (!strcmp(context, "input_voice")) { diff --git a/src/w-input-stt-tos.cpp b/src/w-input-stt-tos.cpp index 67359d3..3ee5215 100755 --- a/src/w-input-stt-tos.cpp +++ b/src/w-input-stt-tos.cpp @@ -101,8 +101,8 @@ static void __bt_connection_result_cb(app_control_h request, app_control_h reply } } -void launch_bt_connection_popup(App_Data* data){ - +void launch_bt_connection_popup(App_Data* data) +{ PRINTFUNC(DLOG_DEBUG, "Need to launch BT connection popup"); app_control_h app_control; app_control_create(&app_control); @@ -114,7 +114,6 @@ void launch_bt_connection_popup(App_Data* data){ app_control_destroy(app_control); } - Eina_Bool set_tos_N66_agreed(Eina_Bool bSet) { int ret = vconf_set_bool(VCONFKEY_USER_AGREEMENT, bSet); @@ -385,7 +384,7 @@ static void _language_changed_cb(void *_data, Evas_Object *_obj, void *_event_in switch (index) { case 1: - snprintf(body_str, sizeof(body_str), gettext("LDS_IME_BODY_INFORMATION_PROVISION_AGREEMENT_P1_LEGALPHRASE_WC1"), " ","","",""); + snprintf(body_str, sizeof(body_str), gettext("LDS_IME_BODY_INFORMATION_PROVISION_AGREEMENT_P1_LEGALPHRASE_WC1"), " ", "", "", ""); terms = tagging(std::string(body_str)); terms = replaceAll(terms , std::string("\n"), std::string("
")); elm_entry_entry_set(elm_layout_content_get(_obj, "elm.swallow.content"), terms.c_str()); @@ -639,7 +638,6 @@ static void _response_n66_cb(void *data, Evas_Object *obj, void *event_info) static void _n66_language_changed_cb(void *_data, Evas_Object *_obj, void *_event_info) { - } Evas_Object *create_tos_n66_popup(void *data) -- 2.7.4 From 124c61f0b0c71d2998439266064b2efb3c843b0d Mon Sep 17 00:00:00 2001 From: "sungwook79.park" Date: Thu, 11 Aug 2016 16:28:01 +0900 Subject: [PATCH 07/16] Remove build warning Change-Id: I5b0fa807916405bb9161343d6c165498be6e418f Signed-off-by: sungwook79.park --- src/MicEffector.cpp | 28 ++++++++++++++-------------- src/WInputSttMicEffect.cpp | 8 ++++---- src/w-input-selector.cpp | 22 +--------------------- src/w-input-stt-tos.cpp | 10 ++++------ src/w-input-stt-voice.cpp | 4 +++- 5 files changed, 26 insertions(+), 46 deletions(-) diff --git a/src/MicEffector.cpp b/src/MicEffector.cpp index f12d1ff..ab4de04 100755 --- a/src/MicEffector.cpp +++ b/src/MicEffector.cpp @@ -69,10 +69,10 @@ MicEffector::MicEffector(Evas_Object *canvas, Evas_Object *layout, IMicEffector& : drawcount(0) , forcestop(false) , started(false) + , fake(false) , timer(NULL) , layout(layout) , ieffect(effect) - , fake(false) { // path = ea_vector_path_create(); // paint = ea_vector_paint_create(); @@ -135,27 +135,27 @@ void MicEffector::DrawDummyFrame() */ void MicEffector::DrawQue(int idx, bool is_start) { - float margin = spectrum_posx; - float posx = 0.0; +// float margin = spectrum_posx; +// float posx = 0.0; double speed = cubic_easy_out(idx + 1.0, 0.0, 23.0, 23); unsigned int start = start_stop_anim_count - (int) speed; unsigned int end = start_stop_anim_count + (int) speed; - double opacity; +// double opacity; if (is_start) { - opacity = cubic_easy_out(idx, 0.0, 1.0, 26.0); +// opacity = cubic_easy_out(idx, 0.0, 1.0, 26.0); } else { - opacity = cubic_easy_out(idx, 0, 1.0, 26.0); +// opacity = cubic_easy_out(idx, 0, 1.0, 26.0); } // ea_vector_path_reset(path); for(unsigned int i = start; i < end; i++) { - posx = margin + (i * 5); +// posx = margin + (i * 5); // ea_vector_path_move_to(path, posx, 37.0f); // ea_vector_path_line_to(path, posx, 38.0f); @@ -223,17 +223,17 @@ float MicEffector::GetAmplifyValue(unsigned int idx) */ void MicEffector::DrawWave(unsigned int idx, int amount, int prev_amount, double opacity, bool is_lastcmd) { - float ratio = GetAmplifyValue(idx); +// float ratio = GetAmplifyValue(idx); - float am = ((float) amount) * ratio; - float pam = ((float) prev_amount) * ratio; - float cnt = (float) drawcount; +// float am = ((float) amount) * ratio; +// float pam = ((float) prev_amount) * ratio; +// float cnt = (float) drawcount; float posx = spectrum_posx; - float height = pam > am? - pam - cubic_easy_in_out(cnt + 1.0, am, pam, 7): - cubic_easy_in_out(cnt + 1.0, pam, am, 7); +// float height = pam > am? +// pam - cubic_easy_in_out(cnt + 1.0, am, pam, 7): +// cubic_easy_in_out(cnt + 1.0, pam, am, 7); posx += idx * 5; diff --git a/src/WInputSttMicEffect.cpp b/src/WInputSttMicEffect.cpp index cb128ee..5454f27 100755 --- a/src/WInputSttMicEffect.cpp +++ b/src/WInputSttMicEffect.cpp @@ -38,11 +38,11 @@ using namespace is::ui; WInputSttMicEffect::WInputSttMicEffect() - : processing_effect_timer(NULL) - , progressbar(NULL) + : square_sum(0) , count(5) - , square_sum(0) - , handle(NULL) { + , handle(NULL) + , processing_effect_timer(NULL) + , progressbar(NULL) { } WInputSttMicEffect::~WInputSttMicEffect() { diff --git a/src/w-input-selector.cpp b/src/w-input-selector.cpp index f08b774..542d2bb 100755 --- a/src/w-input-selector.cpp +++ b/src/w-input-selector.cpp @@ -164,26 +164,6 @@ static void _keyboard_clicked_cb(void *data, Evas_Object * obj, void *event_info input_keyboard_launch(ad->win_main, data); } -static void __bt_connection_result_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *user_data) -{ - char *val = NULL; - - if (reply == NULL) { - PRINTFUNC(DLOG_ERROR, "service_h is NULL"); - return; - } - - app_control_get_extra_data(reply, "__BT_CONNECTION__", &val); - if (val) { - if ( strcmp(val, "Connected") == 0 ) { - PRINTFUNC(DLOG_ERROR, "BT Connected"); - } else { - PRINTFUNC(DLOG_ERROR, "BT Not Connected"); - } - free(val); - } -} - static Evas_Object * __ise_gl_2button_content_get(void *data, Evas_Object *obj, const char *part) { char *first_input_type = *(g_input_type_data.input_type_array + 0); @@ -273,7 +253,7 @@ static Evas_Object * __ise_gl_3button_content_get(void *data, Evas_Object *obj, elm_image_resizable_set(ic, EINA_TRUE, EINA_TRUE); string path = get_resource_path(); if (!strcmp(part, "elm.icon.1")) { - elm_object_style_set(btn, "anchor"); + elm_object_style_set(btn, "anchor"); string path_ic = path + "images/w_mode_stt_ic.png"; elm_image_file_set(ic, path_ic.c_str(), NULL); elm_object_content_set(btn, ic); diff --git a/src/w-input-stt-tos.cpp b/src/w-input-stt-tos.cpp index 3ee5215..906b586 100755 --- a/src/w-input-stt-tos.cpp +++ b/src/w-input-stt-tos.cpp @@ -383,11 +383,13 @@ static void _language_changed_cb(void *_data, Evas_Object *_obj, void *_event_in char body_str[40000]; switch (index) { - case 1: - snprintf(body_str, sizeof(body_str), gettext("LDS_IME_BODY_INFORMATION_PROVISION_AGREEMENT_P1_LEGALPHRASE_WC1"), " ", "", "", ""); + case 1: { + const char *format = gettext("LDS_IME_BODY_INFORMATION_PROVISION_AGREEMENT_P1_LEGALPHRASE_WC1"); + snprintf(body_str, sizeof(body_str), format, " ", "", "", ""); terms = tagging(std::string(body_str)); terms = replaceAll(terms , std::string("\n"), std::string("
")); elm_entry_entry_set(elm_layout_content_get(_obj, "elm.swallow.content"), terms.c_str()); + } break; case 2: terms = tagging(std::string(gettext(TOS_BODY2))+ std::string("
") + std::string(gettext(TOS_BODY3))); @@ -496,16 +498,12 @@ static void _ise_voice_tos_anchor_clicked(void *data, Evas_Object *obj, void *ev if (!strncmp(ainfo->name, "\"http://", 8)) { show_terms(data, obj, ainfo); - } else if (!strncmp(ainfo->name, "\"file://", 8)) { -/* Evas_Object *senconds_layout = create_tos_second_page(ad); - Elm_Object_Item *nit = NULL; nit = elm_naviframe_item_push(ad->naviframe, NULL, NULL, NULL, senconds_layout, "empty"); elm_naviframe_item_pop_cb_set(nit, _naviframe_pop_cb2, NULL); elm_naviframe_item_title_enabled_set(nit, EINA_FALSE, EINA_FALSE); -*/ } } diff --git a/src/w-input-stt-voice.cpp b/src/w-input-stt-voice.cpp index 17abe66..642224b 100755 --- a/src/w-input-stt-voice.cpp +++ b/src/w-input-stt-voice.cpp @@ -727,7 +727,9 @@ void show_error_message(VoiceData *vd, stt_error_e reason) if (ancs_connected) { char text[512]; - snprintf(text, sizeof(text), _(SK_NETWORK_ERROR_FOR_IOS), _(SK_SAMSUNG_GEAR)); + const char *format1 = _(SK_NETWORK_ERROR_FOR_IOS); + const char *format2 = _(SK_SAMSUNG_GEAR); + snprintf(text, sizeof(text), format1, format2); show_popup_toast((const char*)text, false); } else { -- 2.7.4 From aae7e7068b22e5975d7182262b97c4538cdac25d Mon Sep 17 00:00:00 2001 From: "sungwook79.park" Date: Wed, 17 Aug 2016 20:27:51 +0900 Subject: [PATCH 08/16] Set app control launch mode to group Change-Id: Ic4a81c9c43dfaef47e195bb8f66ca05ca7caa116 Signed-off-by: sungwook79.park --- org.tizen.inputdelegator.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.tizen.inputdelegator.xml b/org.tizen.inputdelegator.xml index 316606f..bb81f27 100755 --- a/org.tizen.inputdelegator.xml +++ b/org.tizen.inputdelegator.xml @@ -2,7 +2,7 @@ - + w-input-selector.png -- 2.7.4 From 5391ab10176d04451edf0baf50573e1ec1e8d8bc Mon Sep 17 00:00:00 2001 From: "sungwook79.park" Date: Wed, 17 Aug 2016 22:13:51 +0900 Subject: [PATCH 09/16] Modify Selector Icon UI to circle Change-Id: I3827ea5155af799e1e6178812242bedcbdba07e8 Signed-off-by: sungwook79.park --- res/edje/w-input-selector.edc | 287 ++++++++++- res/edje/w-input-stt.edc | 1097 ++++++++++++++++++++--------------------- src/w-input-selector.cpp | 18 +- 3 files changed, 832 insertions(+), 570 deletions(-) diff --git a/res/edje/w-input-selector.edc b/res/edje/w-input-selector.edc index d9e9fd3..a436e58 100755 --- a/res/edje/w-input-selector.edc +++ b/res/edje/w-input-selector.edc @@ -580,7 +580,6 @@ collections { } ) } - //Gesture VI program { name: "do_start_expand_0.0"; action: STATE_SET "default" 0.0; @@ -672,13 +671,297 @@ collections { } +// 3 button + group { + name: "elm/genlist/item/3button_flat/default"; + alias: "elm/genlist/item/3button_flat_recent/default"; + data.item: "treesize" 0; + data.item: "flips" "elm.flip.icon elm.flip.content"; + data.item: "contents" "base elm.icon.1 elm.icon.2 elm.icon.3 elm.icon.1.touch_area elm.icon.2.touch_area elm.icon.3.touch_area"; + data.item: "vi_effect" "on"; + data.item: "dim" "off"; + data.item: "focus_bg" "off"; + + + parts { + PART_LIST_BG + PART_LIST_PADDINGS( + LIST_BUTTON_PADDING_LEFT_SIZE_INC, LIST_BUTTON_PADDING_RIGHT_SIZE_INC, + LIST_BUTTON_PADDING_2BUTTON_TOP_SIZE_INC, LIST_BUTTON_PADDING_BOTTOM_SIZE_INC + ) + + PART(SWALLOW, "base", + DESC_LRTB("elm.padding.left", "elm.padding.right", "elm.padding.top", "elm.padding.bottom", + min: 360 0; + fixed: 1 0; + visible: 1; + ) + ) + + part { + name: "elm.icon.1"; // left icon + type: SWALLOW; + description { + state: "default" 0.0; + visible: 1; + align: 0.5 0.5; + fixed: 1 1; + min: 100 100; + max: 100 100; + rel1 { relative: 60/360 0.5; to: "base"; offset: 0 0;} + rel2 { relative: 60/360 0.5; to: "base"; offset: 0 0;} + } + } + part { + name: "elm.icon.1.touch_area"; // left icon + type: SWALLOW; + description { + state: "default" 0.0; + visible: 1; + align: 0.5 0.5; + fixed: 1 1; + min: 120 120; + max: 120 120; + rel1 { relative: 60/360 0.5; to: "base"; offset: 0 0;} + rel2 { relative: 60/360 0.5; to: "base"; offset: 0 0;} + } + } + + part { + name: "elm.icon.2"; // center icon + type: SWALLOW; + description { + state: "default" 0.0; + visible: 1; + align: 0.5 0.5; + fixed: 1 1; + min: 100 100; + max: 100 100; + rel1 { relative: 180/360 0.5; to: "base"; offset: 0 0;} + rel2 { relative: 180/360 0.5; to: "base"; offset: 0 0;} + } + + } + part { + name: "elm.icon.2.touch_area"; // center icon + type: SWALLOW; + description { + state: "default" 0.0; + visible: 1; + align: 0.5 0.5; + fixed: 1 1; + min: 120 120; + max: 120 120; + rel1 { relative: 180/360 0.5; to: "base"; offset: 0 0;} + rel2 { relative: 180/360 0.5; to: "base"; offset: 0 0;} + } + + } + + + part { + name: "elm.icon.3"; // right icon + type: SWALLOW; + description { + state: "default" 0.0; + visible: 1; + align: 0.5 0.5; + fixed: 1 1; + min: 100 100; + max: 100 100; + rel1 { relative: 300/360 0.5; to: "base"; offset: 0 0;} + rel2 { relative: 300/360 0.5; to: "base"; offset: 0 0;} + } + } + part { + name: "elm.icon.3.touch_area"; // right icon + type: SWALLOW; + description { + state: "default" 0.0; + visible: 1; + align: 0.5 0.5; + fixed: 1 1; + min: 120 120; + max: 120 120; + rel1 { relative: 300/360 0.5; to: "base"; offset: 0 0;} + rel2 { relative: 300/360 0.5; to: "base"; offset: 0 0;} + } + } + + } + } + +//2button + group { + name: "elm/genlist/item/2button_flat/default"; + data.item: "treesize" 0; + data.item: "flips" "elm.flip.icon elm.flip.content"; + data.item: "contents" "base elm.icon.1 elm.icon.2 elm.icon.1.touch_area elm.icon.2.touch_area"; + data.item: "vi_effect" "on"; + data.item: "dim" "off"; + data.item: "focus_bg" "off"; + + + parts { + PART_LIST_BG + PART_LIST_PADDINGS( + LIST_BUTTON_PADDING_LEFT_SIZE_INC, LIST_BUTTON_PADDING_RIGHT_SIZE_INC, + LIST_BUTTON_PADDING_2BUTTON_TOP_SIZE_INC, LIST_BUTTON_PADDING_BOTTOM_SIZE_INC + ) + + PART(SWALLOW, "base", + DESC_LRTB("elm.padding.left", "elm.padding.right", "elm.padding.top", "elm.padding.bottom", + min: 360 0; + fixed: 1 0; + visible: 1; + ) + ) + + part { + name: "elm.icon.1"; // left icon + type: SWALLOW; + description { + state: "default" 0.0; + visible: 1; + align: 0.5 0.5; + fixed: 1 1; + min: 100 100; + max: 100 100; + rel1 { relative: 120/360 0.5; to: "base"; offset: 0 0;} + rel2 { relative: 120/360 0.5; to: "base"; offset: 0 0;} + } + } + part { + name: "elm.icon.1.touch_area"; // left icon + type: SWALLOW; + description { + state: "default" 0.0; + visible: 1; + align: 0.5 0.5; + fixed: 1 1; + min: 120 120; + max: 120 120; + rel1 { relative: 120/360 0.5; to: "base"; offset: 0 0;} + rel2 { relative: 120/360 0.5; to: "base"; offset: 0 0;} + } + } + + part { + name: "elm.icon.2"; // center icon + type: SWALLOW; + description { + state: "default" 0.0; + visible: 1; + align: 0.5 0.5; + fixed: 1 1; + min: 100 100; + max: 100 100; + rel1 { relative: 240/360 0.5; to: "base"; offset: 0 0;} + rel2 { relative: 240/360 0.5; to: "base"; offset: 0 0;} + } + + } + part { + name: "elm.icon.2.touch_area"; // center icon + type: SWALLOW; + description { + state: "default" 0.0; + visible: 1; + align: 0.5 0.5; + fixed: 1 1; + min: 120 120; + max: 120 120; + rel1 { relative: 240/360 0.5; to: "base"; offset: 0 0;} + rel2 { relative: 240/360 0.5; to: "base"; offset: 0 0;} + } + + } + } + } + + group { name: "elm/button/base/ime/transparent"; + parts { + part { + name: "bg"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + min: 0 130; + color_class: "AO015"; + visible: 0; + } + description { + state: "pressed" 0.0; + inherit: "default" 0.0; + color_class: "AO015P"; + } + description { + state: "disabled" 0.0; + inherit: "default" 0.0; + color_class: "AO015D"; + } + } + part { + name: "padding_left_top"; + type: SPACER; + scale: 1; + description { + state: "default" 0.0; + align: 0.0 0.0; + rel2.relative: 0.0 0.0; + min: 0 0; + fixed: 1 1; + } + } + part { + name: "padding_right_bottom"; + type: SPACER; + scale: 1; + description { + state: "default" 0.0; + align: 1.0 1.0; + rel1.relative: 1.0 1.0; + min: 0 0; + fixed: 1 1; + } + } + part { + name: "icon_rect"; + type: SPACER; + scale: 1; + description { + state: "default" 0.0; + align: 0.0 0.5; + rel1 { + relative: 1.0 1.0; + to: "padding_left_top"; + } + rel2 { + relative: 1.0 0.0; + to_x: "padding_left_top"; + to_y: "padding_right_bottom"; + } + min: 0 0; + fixed: 1 1; + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + min: 134 61; + max: 134 61; + fixed: 1 1; + } + } + } + } + group { name: "elm/genlist/item/2button/default"; data.item: "treesize" 0; data.item: "flips" "elm.flip.icon elm.flip.content"; data.item: "contents" "base elm.icon.1.touch_area elm.icon.2.touch_area elm.icon.1 elm.icon.2 elm.swallow.center_check"; data.item: "vi_effect" "off"; - parts { PART_LIST_BG PART_LIST_PADDINGS( diff --git a/res/edje/w-input-stt.edc b/res/edje/w-input-stt.edc index a7ea837..8eda165 100755 --- a/res/edje/w-input-stt.edc +++ b/res/edje/w-input-stt.edc @@ -149,7 +149,7 @@ collections color_class { name: "AO01153L1"; - color: 163 163 163 100; + color: 0 0 255 255; } color_class { @@ -164,7 +164,7 @@ collections color_class { name: "AO01154L1"; - color: 110 110 110 100; + color: 97 12 117 255; } color_class { @@ -179,7 +179,7 @@ collections color_class { name: "AO01155L1"; - color: 122 122 122 100; + color: 255 0 0 255; } color_class { @@ -1368,608 +1368,583 @@ collections #define BUTTON_PADDING_SIZE_INC 20 0 #define BUTTON_HEIGHT_INC 122 #define BUTTON_ICON_SIZE_INC 60 60 - group { name: "elm/button/base/default"; - script { - public mouse_down = 0; - public multi_down = 0; - } - parts { - part { name: "bg"; - type: RECT; - scale: 1; - description { state: "default" 0.0; - min: 0 BUTTON_HEIGHT_INC; - color: 128 128 128 128; - } - description { state: "pressed" 0.0; - inherit: "default" 0.0; - color: 128 128 128 128; - } - description { state: "disabled" 0.0; - inherit: "default" 0.0; - color: 128 128 128 128; - } - } - part { name: "padding_left_top"; - type: SPACER; - scale: 1; - description { state: "default" 0.0; - align: 0.0 0.0; - rel2.relative: 0.0 0.0; - min: BUTTON_PADDING_SIZE_INC; - fixed: 1 1; - } - } - part { name: "padding_right_bottom"; - type: SPACER; - scale: 1; - description { state: "default" 0.0; - align: 1.0 1.0; - rel1.relative: 1.0 1.0; - min: BUTTON_PADDING_SIZE_INC; - fixed: 1 1; - } - } - part { name: "icon_rect"; - type: SPACER; - scale: 1; - description { state: "default" 0.0; - align: 0.0 0.5; - rel1 { - relative: 1.0 1.0; - to: "padding_left_top"; - } - rel2 { - relative: 1.0 0.0; - to_x: "padding_left_top"; - to_y: "padding_right_bottom"; - } - min: 0 0; - fixed: 1 1; - } - description { state: "visible" 0.0; - inherit: "default" 0.0; - min: BUTTON_ICON_SIZE_INC; - max: BUTTON_ICON_SIZE_INC; - fixed: 1 1; - } - } - part { name: "elm.swallow.content"; - type: SWALLOW; - clip_to: "elm.swallow.content.clip"; - scale: 1; - description { state: "default" 0.0; - visible: 0; - align: 0.0 0.5; - rel1 { - relative: 1.0 1.0; - to: "padding_left_top"; - } - rel2 { - relative: 1.0 0.0; - to_x: "padding_left_top"; - to_y: "padding_right_bottom"; - } - fixed: 1 0; - } - description { state: "visible" 0.0; - fixed: 1 1; - min: BUTTON_ICON_SIZE_INC; - max: BUTTON_ICON_SIZE_INC; - align: 1.0 0.5; - rel1 { - relative: 0.0 1.0; - to_x: "elm.text"; - to_y: "padding_left_top"; - } - rel2 { - relative: 0.0 0.0; - to_x: "elm.text"; - to_y: "padding_right_bottom"; - } - } - description { state: "icononly" 0.0; - min: BUTTON_ICON_SIZE_INC; - max: BUTTON_ICON_SIZE_INC; - } - } - part { name: "elm.text"; - type: TEXTBLOCK; - mouse_events: 0; - scale: 1; - description { state: "default" 0.0; - fixed: 1 1; - rel1 { - relative: 1.0 1.0; - to_x: "icon_rect"; - to_y: "padding_left_top"; - } - rel2 { - relative: 0.0 0.0; - to: "padding_right_bottom"; - } - text { - max: 1 0; - style: "button_general_text_normal"; - } - } - description { state: "disabled" 0.0; - inherit: "default" 0.0; - text.style: "button_general_text_dim"; - } - description { state: "pressed" 0.0; - inherit: "default" 0.0; - text.style: "button_general_text_press"; - } - } - part { name: "elm.swallow.content.clip"; - type: RECT; - scale: 1; - description { state: "default" 0.0; - color: 128 128 128 128; - } - description { state: "disabled" 0.0; - inherit: "default" 0.0; - color: 128 128 128 128; - } - } - part { name: "event"; - type: RECT; - scale: 1; - description { state: "default" 0.0; - color: 0 0 0 0; - rel1.to: "bg"; - rel2.to: "bg"; - } - } - } - programs { - program { name: "pressed"; - signal: "mouse,down,1*"; - source: "event"; - script { - if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0)) - { - set_int(mouse_down, 1); - run_program(PROGRAM:"button_press1"); - } - } - } - program { name: "button_press1"; - script { - new st[31]; - new Float:vl; - get_state(PART:"bg", st, 30, vl); - if (strcmp(st, "disabled")) { - set_state(PART:"bg", "pressed", 0.0); - set_state(PART:"elm.text", "pressed", 0.0); - emit("elm,action,press", ""); - } - } - } - program { name: "unpressed"; - signal: "mouse,up,1"; - source: "event"; - script { - if (get_int(mouse_down) == 1) { - set_int(mouse_down, 0); - run_program(PROGRAM:"button_unpress1"); - } - } - } - program { name: "button_unpress1"; - script { - new st[31]; - new Float:vl; - get_state(PART:"bg", st, 30, vl); - if (strcmp(st, "disabled")) { - set_state(PART:"bg", "default", 0.0); - set_state(PART:"elm.text", "default", 0.0); - emit("elm,action,unpress", ""); - } - } - } - program { name: "touch_snd"; - signal: "mouse,clicked,1"; - source: "event"; - script { - new st[31]; - new Float:vl; - if (get_int(multi_down) == 0) { - get_state(PART:"bg", st, 30, vl); - if (strcmp(st, "disabled")) { - //run_program(PROGRAM:"play_sample"); - emit("elm,action,click", ""); - } - } - } - } - program { - name: "play_sample"; - action: RUN_PLUGIN "touch_sound"; - } - program { name: "text_show"; - signal: "elm,state,text,visible"; - source: "elm"; - script { - new st[31]; - new Float:vl; - get_state(PART:"elm.swallow.content", st, 30, vl); - if (!strcmp(st, "icononly")) - { - set_state(PART:"elm.swallow.content", "visible", 0.0); - set_state(PART:"icon_rect", "visible", 0.0); - } - get_state(PART:"bg", st, 30, vl); - if (strcmp(st, "disabled")) - set_state(PART:"elm.text", "default", 0.0); - else - set_state(PART:"elm.text", "disabled", 0.0); - } - } - program { name: "text_hide"; - signal: "elm,state,text,hidden"; - source: "elm"; - script { - new st[31]; - new Float:vl; - get_state(PART:"elm.swallow.content", st, 30, vl); - if (!strcmp(st, "visible")) - { - set_state(PART:"elm.swallow.content", "icononly", 0.0); - set_state(PART:"icon_rect", "default", 0.0); - } - set_state(PART:"elm.text", "default", 0.0); - } - } - program { name: "icon_show"; - signal: "elm,state,icon,visible"; - source: "elm"; - action: STATE_SET "visible" 0.0; - target: "elm.swallow.content"; - target: "icon_rect"; - } - program { name: "icon_hide"; - signal: "elm,state,icon,hidden"; - source: "elm"; - action: STATE_SET "default" 0.0; - target: "elm.swallow.content"; - target: "icon_rect"; - } - program { name: "disable"; - signal: "elm,state,disabled"; - source: "elm"; - action: STATE_SET "disabled" 0.0; - target: "bg"; - target: "elm.swallow.content.clip"; - target: "elm.text"; - } - program { name: "enable"; - signal: "elm,state,enabled"; - source: "elm"; - action: STATE_SET "default" 0.0; - target: "bg"; - target: "elm.swallow.content.clip"; - target: "elm.text"; - } - program { name: "multi_down"; - signal: "elm,action,multi,down"; - source: "elm"; - script { - set_int(multi_down, 1); - } - } - program { name: "multi_up"; - signal: "elm,action,multi,up"; - source: "elm"; - script { - set_int(multi_down, 0); - } - } - } - } - - group { name: "elm/button/base/ime_transparent"; - inherit: "elm/button/base/default"; - parts { - part { name: "bg"; - type: RECT; - scale: 1; - description { state: "default" 0.0; - min: 0 112; + group { name: "elm/button/base/default"; + script { + public mouse_down = 0; + public multi_down = 0; + } + parts { + part { name: "bg"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + min: 0 BUTTON_HEIGHT_INC; + color_class: "W011"; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + color_class: "W011P"; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + color_class: "W011D"; + } + } + part { name: "padding_left_top"; + type: SPACER; + scale: 1; + description { state: "default" 0.0; + align: 0.0 0.0; + rel2.relative: 0.0 0.0; + min: BUTTON_PADDING_SIZE_INC; + fixed: 1 1; + } + } + part { name: "padding_right_bottom"; + type: SPACER; + scale: 1; + description { state: "default" 0.0; + align: 1.0 1.0; + rel1.relative: 1.0 1.0; + min: BUTTON_PADDING_SIZE_INC; + fixed: 1 1; + } + } + part { name: "icon_rect"; + type: SPACER; + scale: 1; + description { state: "default" 0.0; + align: 0.0 0.5; + rel1 { + relative: 1.0 1.0; + to: "padding_left_top"; + } + rel2 { + relative: 1.0 0.0; + to_x: "padding_left_top"; + to_y: "padding_right_bottom"; + } + min: 0 0; + fixed: 1 1; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + min: BUTTON_ICON_SIZE_INC; + max: BUTTON_ICON_SIZE_INC; + fixed: 1 1; + } + } + part { name: "elm.swallow.content"; + type: SWALLOW; + clip_to: "elm.swallow.content.clip"; + scale: 1; + description { state: "default" 0.0; visible: 0; - } - description { state: "pressed" 0.0; + align: 0.0 0.5; + rel1 { + relative: 1.0 1.0; + to: "padding_left_top"; + } + rel2 { + relative: 1.0 0.0; + to_x: "padding_left_top"; + to_y: "padding_right_bottom"; + } + fixed: 1 0; + } + description { state: "visible" 0.0; + fixed: 1 1; + min: BUTTON_ICON_SIZE_INC; + max: BUTTON_ICON_SIZE_INC; + align: 1.0 0.5; + rel1 { + relative: 0.0 1.0; + to_x: "elm.text"; + to_y: "padding_left_top"; + } + rel2 { + relative: 0.0 0.0; + to_x: "elm.text"; + to_y: "padding_right_bottom"; + } + } + description { state: "icononly" 0.0; + min: BUTTON_ICON_SIZE_INC; + max: BUTTON_ICON_SIZE_INC; + } + } + part { name: "elm.text"; + type: TEXTBLOCK; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + fixed: 1 1; + rel1 { + relative: 1.0 1.0; + to_x: "icon_rect"; + to_y: "padding_left_top"; + } + rel2 { + relative: 0.0 0.0; + to: "padding_right_bottom"; + } + text { + max: 1 0; + style: "button_general_text_normal"; + } + } + description { state: "disabled" 0.0; inherit: "default" 0.0; - } - description { state: "disabled" 0.0; + text.style: "button_general_text_dim"; + } + description { state: "pressed" 0.0; inherit: "default" 0.0; + text.style: "button_general_text_press"; + } + } + part { name: "elm.swallow.content.clip"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + color_class: "F022L1i"; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + color_class: "F022L1iD"; + } + } + part { name: "event"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + color: 0 0 0 0; + rel1.to: "bg"; + rel2.to: "bg"; + } + } + } + programs { + program { name: "pressed"; + signal: "mouse,down,1*"; + source: "event"; + script { + if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0)) + { + set_int(mouse_down, 1); + run_program(PROGRAM:"button_press1"); + } + } + } + program { name: "button_press1"; + script { + new st[31]; + new Float:vl; + get_state(PART:"bg", st, 30, vl); + if (strcmp(st, "disabled")) { + set_state(PART:"bg", "pressed", 0.0); + set_state(PART:"elm.text", "pressed", 0.0); + emit("elm,action,press", ""); + } + } + } + program { name: "unpressed"; + signal: "mouse,up,1"; + source: "event"; + script { + if (get_int(mouse_down) == 1) { + set_int(mouse_down, 0); + run_program(PROGRAM:"button_unpress1"); + } + } + } + program { name: "button_unpress1"; + script { + new st[31]; + new Float:vl; + get_state(PART:"bg", st, 30, vl); + if (strcmp(st, "disabled")) { + set_state(PART:"bg", "default", 0.0); + set_state(PART:"elm.text", "default", 0.0); + emit("elm,action,unpress", ""); + } + } + } + program { name: "touch_snd"; + signal: "mouse,clicked,1"; + source: "event"; + script { + new st[31]; + new Float:vl; + if (get_int(multi_down) == 0) { + get_state(PART:"bg", st, 30, vl); + if (strcmp(st, "disabled")) { + //run_program(PROGRAM:"play_sample"); + emit("elm,action,click", ""); + } + } + } + } + program { + name: "play_sample"; + action: RUN_PLUGIN "touch_sound"; + } + program { name: "text_show"; + signal: "elm,state,text,visible"; + source: "elm"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.swallow.content", st, 30, vl); + if (!strcmp(st, "icononly")) + { + set_state(PART:"elm.swallow.content", "visible", 0.0); + set_state(PART:"icon_rect", "visible", 0.0); + } + get_state(PART:"bg", st, 30, vl); + if (strcmp(st, "disabled")) + set_state(PART:"elm.text", "default", 0.0); + else + set_state(PART:"elm.text", "disabled", 0.0); + } + } + program { name: "text_hide"; + signal: "elm,state,text,hidden"; + source: "elm"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.swallow.content", st, 30, vl); + if (!strcmp(st, "visible")) + { + set_state(PART:"elm.swallow.content", "icononly", 0.0); + set_state(PART:"icon_rect", "default", 0.0); + } + set_state(PART:"elm.text", "default", 0.0); + } + } + program { name: "icon_show"; + signal: "elm,state,icon,visible"; + source: "elm"; + action: STATE_SET "visible" 0.0; + target: "elm.swallow.content"; + target: "icon_rect"; + } + program { name: "icon_hide"; + signal: "elm,state,icon,hidden"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "elm.swallow.content"; + target: "icon_rect"; + } + program { name: "disable"; + signal: "elm,state,disabled"; + source: "elm"; + action: STATE_SET "disabled" 0.0; + target: "bg"; + target: "elm.swallow.content.clip"; + target: "elm.text"; + } + program { name: "enable"; + signal: "elm,state,enabled"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "bg"; + target: "elm.swallow.content.clip"; + target: "elm.text"; + } + program { name: "multi_down"; + signal: "elm,action,multi,down"; + source: "elm"; + script { + set_int(multi_down, 1); + } + } + program { name: "multi_up"; + signal: "elm,action,multi,up"; + source: "elm"; + script { + set_int(multi_down, 0); + } + } + } +} + + group { name: "elm/button/base/ime_transparent"; + inherit: "elm/button/base/default"; + parts { + part { name: "bg"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + min: 0 112; + visible: 0; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; } } } } group { name: "elm/button/base/ime_button"; - alias: "elm/button/base/ime_button_stt"; - inherit: "elm/button/base/default"; - parts { - part { name: "bg"; - type: IMAGE; - scale: 1; - description { state: "default" 0.0; - min: 0 0; - color_class: "AO01153L1"; - visible: 1; - image.normal: "./w_mode_ic_bg.png"; - } - description { state: "pressed" 0.0; - inherit: "default" 0.0; - color_class: "AO01153L1P"; - } - description { state: "disabled" 0.0; - inherit: "default" 0.0; - color: 128 128 128 128; + alias: "elm/button/base/ime_button_stt"; + inherit: "elm/button/base/default"; + parts { + part { name: "bg"; + type: IMAGE; + scale: 1; + description { state: "default" 0.0; + min: 0 0; + color_class: "AO01153L1"; + visible: 1; + image.normal: "./w_mode_ic_bg.png"; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + color_class: "AO01153L1P"; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + color_class: "W011D"; } } - part { name: "elm.swallow.content"; - type: SWALLOW; - scale: 1; - clip_to: "elm.swallow.content.clip"; - description { state: "default" 0.0; - visible: 1; - align: 0.5 0.5; - rel1 { relative: 0.0 0.0; to: "bg";} - rel2 { relative: 1.0 1.0; to: "bg";} - fixed: 1 1; - } - description { state: "visible" 0.0; - inherit: "default" 0.0; - visible: 1; - } - description { state: "icononly" 0.0; - inherit: "default" 0.0; - visible: 1; - } - } - part { name: "elm.swallow.content.clip"; - type: RECT; - scale: 1; - description { state: "default" 0.0; - color_class: "AO01153L3"; - } - description { state: "pressed" 0.0; - inherit: "default" 0.0; - color_class: "AO01153L3P"; + part { name: "elm.swallow.content"; + type: SWALLOW; + scale: 1; + clip_to: "elm.swallow.content.clip"; + description { state: "default" 0.0; + visible: 1; + align: 0.5 0.5; + rel1 { relative: 0.0 0.0; to: "bg";} + rel2 { relative: 1.0 1.0; to: "bg";} + fixed: 1 1; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { state: "icononly" 0.0; + inherit: "default" 0.0; + visible: 1; + } } - description { state: "disabled" 0.0; - inherit: "default" 0.0; - color: 128 128 128 128; - } - } - part { name: "elm.swallow.content_ef"; - type: SWALLOW; - scale: 1; - description { state: "default" 0.0; - visible: 1; - align: 0.5 0.5; - rel1 { relative: 0.0 0.0; to: "bg";} - rel2 { relative: 1.0 1.0; to: "bg";} - fixed: 1 1; - } - } - } - programs { - program { name: "pressed"; - signal: "mouse,down,1*"; - source: "event"; - script { - if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0)) - { - set_int(mouse_down, 1); - run_program(PROGRAM:"button_press1"); - } - } - } - program { name: "button_press1"; - script { - new st[31]; - new Float:vl; - get_state(PART:"bg", st, 30, vl); - if (strcmp(st, "disabled")) { - set_state(PART:"bg", "pressed", 0.0); - set_state(PART:"elm.swallow.content.clip", "pressed", 0.0); - emit("elm,action,press", ""); - } - } - } - program { name: "unpressed"; - signal: "mouse,up,1"; - source: "event"; - script { - if (get_int(mouse_down) == 1) { - set_int(mouse_down, 0); - run_program(PROGRAM:"button_unpress1"); - } - } - } - program { name: "button_unpress1"; - script { - new st[31]; - new Float:vl; - get_state(PART:"bg", st, 30, vl); - if (strcmp(st, "disabled")) { - set_state(PART:"bg", "default", 0.0); - set_state(PART:"elm.swallow.content.clip", "default", 0.0); - emit("elm,action,unpress", ""); - } - } - } - } + + } + programs { + program { name: "pressed"; + signal: "mouse,down,1*"; + source: "event"; + script { + if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0)) + { + set_int(mouse_down, 1); + run_program(PROGRAM:"button_press1"); + } + } + } + program { name: "button_press1"; + script { + new st[31]; + new Float:vl; + get_state(PART:"bg", st, 30, vl); + if (strcmp(st, "disabled")) { + set_state(PART:"bg", "pressed", 0.0); + set_state(PART:"elm.swallow.content.clip", "pressed", 0.0); + emit("elm,action,press", ""); + } + } + } + program { name: "unpressed"; + signal: "mouse,up,1"; + source: "event"; + script { + if (get_int(mouse_down) == 1) { + set_int(mouse_down, 0); + run_program(PROGRAM:"button_unpress1"); + } + } + } + program { name: "button_unpress1"; + script { + new st[31]; + new Float:vl; + get_state(PART:"bg", st, 30, vl); + if (strcmp(st, "disabled")) { + set_state(PART:"bg", "default", 0.0); + set_state(PART:"elm.swallow.content.clip", "default", 0.0); + emit("elm,action,unpress", ""); + } + } + } + } } group { name: "elm/button/base/ime_button_emoticon"; - inherit: "elm/button/base/ime_button"; - parts { - part { name: "bg"; - type: IMAGE; - scale: 1; - description { state: "default" 0.0; - min: 0 0; - color_class: "AO01154L1"; - visible: 1; - image.normal: "./w_mode_ic_bg.png"; - } - description { state: "pressed" 0.0; - inherit: "default" 0.0; - color_class: "AO01154L1P"; - } - description { state: "disabled" 0.0; - inherit: "default" 0.0; - color: 128 128 128 128; + inherit: "elm/button/base/ime_button"; + parts { + part { name: "bg"; + type: IMAGE; + scale: 1; + description { state: "default" 0.0; + min: 0 0; + color_class: "AO01154L1"; + visible: 1; + image.normal: "./w_mode_ic_bg.png"; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + color_class: "AO01154L1P"; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + color_class: "W011D"; + } } } } - } group { name: "elm/button/base/ime_button_keyboard"; - inherit: "elm/button/base/ime_button"; - parts { - part { name: "bg"; - type: IMAGE; - scale: 1; - description { state: "default" 0.0; - min: 0 0; - color_class: "AO01155L1"; - visible: 1; - image.normal: "./w_mode_ic_bg.png"; - } - description { state: "pressed" 0.0; - inherit: "default" 0.0; - color_class: "AO01155L1P"; - } - description { state: "disabled" 0.0; - inherit: "default" 0.0; - color: 128 128 128 128; + inherit: "elm/button/base/ime_button"; + parts { + part { name: "bg"; + type: IMAGE; + scale: 1; + description { state: "default" 0.0; + min: 0 0; + color_class: "AO01155L1"; + visible: 1; + image.normal: "./w_mode_ic_bg.png"; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + color_class: "AO01155L1P"; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + color_class: "W011D"; } } } } group { name: "elm/button/base/ime_button_template"; - inherit: "elm/button/base/ime_button"; - parts { - part { name: "bg"; - type: IMAGE; - scale: 1; - description { state: "default" 0.0; - min: 76 76; - max: 76 76; - color_class: "AO01161"; - visible: 1; - image.normal: "./w_mode_ic_bg.png"; - } - description { state: "pressed" 0.0; - inherit: "default" 0.0; - color_class: "AO01161P"; - } - description { state: "disabled" 0.0; - inherit: "default" 0.0; - color_class: "AO01161D"; + inherit: "elm/button/base/ime_button"; + parts { + part { name: "bg"; + type: IMAGE; + scale: 1; + description { state: "default" 0.0; + min: 76 76; + max: 76 76; + color_class: "AO01161"; + visible: 1; + image.normal: "./w_mode_ic_bg.png"; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + color_class: "AO01161P"; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + color_class: "AO01161D"; } } - part { name: "elm.swallow.content.clip"; - type: RECT; - scale: 1; - description { state: "default" 0.0; - color_class: "AO0116"; - } - description { state: "pressed" 0.0; - inherit: "default" 0.0; - color_class: "AO0116P"; + part { name: "elm.swallow.content.clip"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + color_class: "AO01153L3"; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + color_class: "AO01153L3P"; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + color_class: "AO01153L3D"; + } } - description { state: "disabled" 0.0; - inherit: "default" 0.0; - color_class: "AO0116D"; - } - } } } group { name: "elm/button/base/ime_button_stt_confirm"; - inherit: "elm/button/base/ime_button"; - parts { - part { name: "bg"; - type: IMAGE; - scale: 1; - description { state: "default" 0.0; - min: 0 0; - color_class: "AO015L2"; - visible: 0; - image.normal: "./b_stt_icon_btn.png"; - } - description { state: "pressed" 0.0; - inherit: "default" 0.0; - color_class: "AO015L2P"; - } - description { state: "disabled" 0.0; - inherit: "default" 0.0; - color_class: "AO015L2D"; + inherit: "elm/button/base/ime_button"; + parts { + part { name: "bg"; + type: IMAGE; + scale: 1; + description { state: "default" 0.0; + min: 0 0; + color_class: "AO015L2"; + visible: 0; + image.normal: "./b_stt_icon_btn.png"; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + color_class: "AO015L2P"; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + color_class: "AO015L2D"; } } - part { name: "elm.swallow.content.clip"; - type: RECT; - scale: 1; - description { state: "default" 0.0; - color_class: "AO015L2"; - } - description { state: "pressed" 0.0; - inherit: "default" 0.0; - color_class: "AO015L2P"; + part { name: "elm.swallow.content.clip"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + color_class: "AO015L2"; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + color_class: "AO015L2P"; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; + color_class: "AO015L2D"; + } } - description { state: "disabled" 0.0; - inherit: "default" 0.0; - color_class: "AO015L2D"; - } - } } } group { name: "elm/button/base/touch_area"; - inherit: "elm/button/base/default"; - parts { - part { name: "bg"; - type: RECT; - scale: 1; - description { state: "default" 0.0; - min: 0 0; - color: 0 0 0 0; - visible: 1; - } - description { state: "pressed" 0.0; - inherit: "default" 0.0; - } - description { state: "disabled" 0.0; - inherit: "default" 0.0; + inherit: "elm/button/base/default"; + parts { + part { name: "bg"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + min: 0 0; + color: 0 0 0 0; + visible: 1; + } + description { state: "pressed" 0.0; + inherit: "default" 0.0; + } + description { state: "disabled" 0.0; + inherit: "default" 0.0; } } } - programs { - program { name: "touch_snd"; - signal: "mouse,clicked,1"; - source: "event"; - script { - new st[31]; - new Float:vl; - if (get_int(multi_down) == 0) { - get_state(PART:"bg", st, 30, vl); - if (strcmp(st, "disabled")) { - run_program(PROGRAM:"play_sample"); - emit("elm,action,click", ""); - } + programs { + program { name: "touch_snd"; + signal: "mouse,clicked,1"; + source: "event"; + script { + new st[31]; + new Float:vl; + if (get_int(multi_down) == 0) { + get_state(PART:"bg", st, 30, vl); + if (strcmp(st, "disabled")) { + run_program(PROGRAM:"play_sample"); + emit("elm,action,click", ""); + } + } } - } - } - } + } + } } #define NAVIFRAME_VIEW_TRANS_TIME 0.4 //time for push and pop diff --git a/src/w-input-selector.cpp b/src/w-input-selector.cpp index 542d2bb..4156397 100755 --- a/src/w-input-selector.cpp +++ b/src/w-input-selector.cpp @@ -178,13 +178,15 @@ static Evas_Object * __ise_gl_2button_content_get(void *data, Evas_Object *obj, elm_image_resizable_set(ic, EINA_TRUE, EINA_TRUE); string path = get_resource_path(); if (!strcmp(part, "elm.icon.1")) { - elm_object_style_set(btn, "anchor"); string path_ic; if(!strcmp(first_input_type, "input_voice")) { + elm_object_style_set(btn, "ime_button_stt"); path_ic = path + "images/w_mode_stt_ic.png"; } else if (!strcmp(first_input_type, "input_emoticon")) { + elm_object_style_set(btn, "ime_button_emoticon"); path_ic = path + "images/Delta_w_mode_emoticon_ic.png"; } else if (!strcmp(first_input_type, "input_keyboard")) { + elm_object_style_set(btn, "ime_button_keyboard"); path_ic = path + "images/w_mode_keyboard_ic.png"; evas_object_propagate_events_set(btn, EINA_FALSE); } @@ -192,13 +194,15 @@ static Evas_Object * __ise_gl_2button_content_get(void *data, Evas_Object *obj, elm_object_content_set(btn, ic); evas_object_layer_set(btn, 32000); } else if (!strcmp(part, "elm.icon.2")){ - elm_object_style_set(btn, "anchor"); string path_ic; if(!strcmp(second_input_type, "input_voice")) { + elm_object_style_set(btn, "ime_button_stt"); path_ic = path + "images/w_mode_stt_ic.png"; } else if (!strcmp(second_input_type, "input_emoticon")) { + elm_object_style_set(btn, "ime_button_emoticon"); path_ic = path + "images/Delta_w_mode_emoticon_ic.png"; } else if (!strcmp(second_input_type, "input_keyboard")) { + elm_object_style_set(btn, "ime_button_keyboard"); path_ic = path + "images/w_mode_keyboard_ic.png"; evas_object_propagate_events_set(btn, EINA_FALSE); } @@ -253,21 +257,21 @@ static Evas_Object * __ise_gl_3button_content_get(void *data, Evas_Object *obj, elm_image_resizable_set(ic, EINA_TRUE, EINA_TRUE); string path = get_resource_path(); if (!strcmp(part, "elm.icon.1")) { - elm_object_style_set(btn, "anchor"); + elm_object_style_set(btn, "ime_button_stt"); string path_ic = path + "images/w_mode_stt_ic.png"; elm_image_file_set(ic, path_ic.c_str(), NULL); elm_object_content_set(btn, ic); evas_object_layer_set(btn, 32000); } else if (!strcmp(part, "elm.icon.2")){ - elm_object_style_set(btn, "anchor"); + elm_object_style_set(btn, "ime_button_emoticon"); string path_ic = path + "images/Delta_w_mode_emoticon_ic.png"; elm_image_file_set(ic, path_ic.c_str(), NULL); elm_object_content_set(btn, ic); evas_object_layer_set(btn, 32000); } else if (!strcmp(part, "elm.icon.3")){ - elm_object_style_set(btn, "anchor"); + elm_object_style_set(btn, "ime_button_keyboard"); string path_ic = path + "images/w_mode_keyboard_ic.png"; elm_image_file_set(ic, path_ic.c_str(), NULL); elm_object_content_set(btn, ic); @@ -575,13 +579,13 @@ void _create_genlist_items(void* user_data) Elm_Genlist_Item_Class * itc1 = elm_genlist_item_class_new(); if(g_input_type_data.input_type_array_len == 2){ - itc1->item_style = "2button"; + itc1->item_style = "2button_flat"; itc1->func.text_get = NULL; itc1->func.content_get = __ise_gl_2button_content_get; itc1->func.state_get = NULL; itc1->func.del = NULL; } else { - itc1->item_style = "3button"; + itc1->item_style = "3button_flat"; itc1->func.text_get = NULL; itc1->func.content_get = __ise_gl_3button_content_get; itc1->func.state_get = NULL; -- 2.7.4 From fa5bb60a494e54eb7eab30dc911d7f59feedf340 Mon Sep 17 00:00:00 2001 From: "sungwook79.park" Date: Thu, 18 Aug 2016 10:47:22 +0900 Subject: [PATCH 10/16] Update package version to 0.1.160818 Change-Id: I83fa3c08c252826fc7aad7bbd46303bae8944064 Signed-off-by: sungwook79.park --- org.tizen.inputdelegator.xml | 2 +- packaging/org.tizen.inputdelegator.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.tizen.inputdelegator.xml b/org.tizen.inputdelegator.xml index bb81f27..e001d06 100755 --- a/org.tizen.inputdelegator.xml +++ b/org.tizen.inputdelegator.xml @@ -1,5 +1,5 @@ - + diff --git a/packaging/org.tizen.inputdelegator.spec b/packaging/org.tizen.inputdelegator.spec index 366ba6a..b0a7532 100755 --- a/packaging/org.tizen.inputdelegator.spec +++ b/packaging/org.tizen.inputdelegator.spec @@ -1,6 +1,6 @@ Name: org.tizen.inputdelegator Summary: Input Delegator Application -Version: 0.1.160805 +Version: 0.1.160818 Release: 1 Group: Applications License: Apache-2.0 -- 2.7.4 From 72a64ab999a139cd46a9e9f9f07fb213e83a8b54 Mon Sep 17 00:00:00 2001 From: "sungwook79.park" Date: Thu, 18 Aug 2016 14:59:17 +0900 Subject: [PATCH 11/16] remove dependency about efl-assist package Change-Id: I5724d6e44068f4d8a5868bf499c65af502cfb95e Signed-off-by: sungwook79.park --- inc/MicEffector.h | 3 +-- packaging/org.tizen.inputdelegator.spec | 1 - src/CMakeLists.txt | 1 - src/MicEffector.cpp | 1 - src/w-input-emoticon.cpp | 1 - src/w-input-selector.cpp | 1 - src/w-input-stt-tos.cpp | 2 -- src/w-input-stt-voice.cpp | 1 - 8 files changed, 1 insertion(+), 10 deletions(-) diff --git a/inc/MicEffector.h b/inc/MicEffector.h index df34494..8284f1c 100755 --- a/inc/MicEffector.h +++ b/inc/MicEffector.h @@ -17,8 +17,7 @@ #pragma once #include -#include - +#include #include "Debug.h" #define SAMPLE_COUNT 59 diff --git a/packaging/org.tizen.inputdelegator.spec b/packaging/org.tizen.inputdelegator.spec index b0a7532..c68b3de 100755 --- a/packaging/org.tizen.inputdelegator.spec +++ b/packaging/org.tizen.inputdelegator.spec @@ -24,7 +24,6 @@ BuildRequires: pkgconfig(capi-media-wav-player) BuildRequires: pkgconfig(capi-system-device) BuildRequires: pkgconfig(eina) BuildRequires: pkgconfig(elementary) -BuildRequires: pkgconfig(efl-assist) BuildRequires: pkgconfig(efl-extension) BuildRequires: pkgconfig(feedback) BuildRequires: pkgconfig(stt) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5e39c91..01749a5 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,7 +5,6 @@ PKG_CHECK_MODULES(CAPI_MEDIA_WAV_PLAYER REQUIRED capi-media-wav-player) PKG_CHECK_MODULES(CAPI_SYSTEM_DEVICE REQUIRED capi-system-device) PKG_CHECK_MODULES(EINA REQUIRED eina) PKG_CHECK_MODULES(ELEMENTARY REQUIRED elementary) -PKG_CHECK_MODULES(EFL_ASSIST REQUIRED efl-assist) PKG_CHECK_MODULES(EFL_EXTENSION REQUIRED efl-extension) PKG_CHECK_MODULES(FEEDBACK REQUIRED feedback) PKG_CHECK_MODULES(STT REQUIRED stt) diff --git a/src/MicEffector.cpp b/src/MicEffector.cpp index ab4de04..f2602d1 100755 --- a/src/MicEffector.cpp +++ b/src/MicEffector.cpp @@ -15,7 +15,6 @@ */ #include -#include #include "MicEffector.h" using namespace is::ui; diff --git a/src/w-input-emoticon.cpp b/src/w-input-emoticon.cpp index d73b692..7f96a37 100755 --- a/src/w-input-emoticon.cpp +++ b/src/w-input-emoticon.cpp @@ -17,7 +17,6 @@ #include #include #include -#include #include "Debug.h" #include "w-input-selector.h" diff --git a/src/w-input-selector.cpp b/src/w-input-selector.cpp index 4156397..8eb09bd 100755 --- a/src/w-input-selector.cpp +++ b/src/w-input-selector.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/src/w-input-stt-tos.cpp b/src/w-input-stt-tos.cpp index 906b586..2084348 100755 --- a/src/w-input-stt-tos.cpp +++ b/src/w-input-stt-tos.cpp @@ -17,12 +17,10 @@ #include #include #include -#include #include #include #include #include -//#include #include diff --git a/src/w-input-stt-voice.cpp b/src/w-input-stt-voice.cpp index 642224b..40dab3e 100755 --- a/src/w-input-stt-voice.cpp +++ b/src/w-input-stt-voice.cpp @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include -- 2.7.4 From 7a95a8f1458712f72d18589dc4414db26256e13a Mon Sep 17 00:00:00 2001 From: Jiwoong Im Date: Mon, 29 Aug 2016 18:16:57 +0900 Subject: [PATCH 12/16] include app_preference.h to fix build break Change-Id: Ibf925dec4a45e970f57455c6c0c73024fa9c3307 Signed-off-by: Jiwoong Im --- src/w-input-stt-voice.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/w-input-stt-voice.cpp b/src/w-input-stt-voice.cpp index 40dab3e..0f14f77 100755 --- a/src/w-input-stt-voice.cpp +++ b/src/w-input-stt-voice.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include -- 2.7.4 From 71cb4fbf92107088a3c677a9700aed39a9c05290 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Wed, 31 Aug 2016 13:25:48 +0900 Subject: [PATCH 13/16] Update package version to 0.1.160831 Change-Id: I27f9e652291890f65ba3ce25b9ee35dfed8deaa5 Signed-off-by: Jihoon Kim --- org.tizen.inputdelegator.xml | 2 +- packaging/org.tizen.inputdelegator.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.tizen.inputdelegator.xml b/org.tizen.inputdelegator.xml index e001d06..dd5485e 100755 --- a/org.tizen.inputdelegator.xml +++ b/org.tizen.inputdelegator.xml @@ -1,5 +1,5 @@ - + diff --git a/packaging/org.tizen.inputdelegator.spec b/packaging/org.tizen.inputdelegator.spec index c68b3de..77c1575 100755 --- a/packaging/org.tizen.inputdelegator.spec +++ b/packaging/org.tizen.inputdelegator.spec @@ -1,6 +1,6 @@ Name: org.tizen.inputdelegator Summary: Input Delegator Application -Version: 0.1.160818 +Version: 0.1.160831 Release: 1 Group: Applications License: Apache-2.0 -- 2.7.4 From 75c40942e44c112450d943b0a61aae6ff8414af6 Mon Sep 17 00:00:00 2001 From: "sungwook79.park" Date: Wed, 7 Sep 2016 19:26:31 +0900 Subject: [PATCH 14/16] Remove unused code Change-Id: I44d6b7578cfb32c118bbe2bc704c465cf331b49b Signed-off-by: sungwook79.park --- inc/w-input-stt-engine.h | 2 -- src/w-input-stt-engine.cpp | 87 ---------------------------------------------- 2 files changed, 89 deletions(-) diff --git a/inc/w-input-stt-engine.h b/inc/w-input-stt-engine.h index 8dbb1df..0cf85e1 100755 --- a/inc/w-input-stt-engine.h +++ b/inc/w-input-stt-engine.h @@ -98,10 +98,8 @@ typedef enum _Feedback_Type{ void set_animation_state(VoiceData *ud); -const char * error_string(int ecode); // STT functions bool _app_stt_initialize(VoiceData *user_data); -void on_feedback(stt_h handle); #if 0 diff --git a/src/w-input-stt-engine.cpp b/src/w-input-stt-engine.cpp index 92075d5..be508bf 100755 --- a/src/w-input-stt-engine.cpp +++ b/src/w-input-stt-engine.cpp @@ -41,93 +41,6 @@ static stt_h g_stt; -const char * error_string(int ecode) -{ - const char *str = NULL; - switch (ecode) { - case STT_ERROR_OUT_OF_MEMORY: - str = "STT_ERROR_OUT_OF_MEMORY"; - break; - case STT_ERROR_IO_ERROR: - str = "STT_ERROR_IO_ERROR"; - break; - case STT_ERROR_INVALID_PARAMETER: - str = "STT_ERROR_INVALID_PARAMETER"; - break; - case STT_ERROR_TIMED_OUT: - str = "STT_ERROR_TIMED_OUT"; - break; - case STT_ERROR_RECORDER_BUSY: - str = "STT_ERROR_RECORDER_BUSY"; - break; - case STT_ERROR_OUT_OF_NETWORK: - str = "STT_ERROR_OUT_OF_NETWORK"; - break; - case STT_ERROR_INVALID_STATE: - str = " STT_ERROR_INVALID_STATE"; - break; - case STT_ERROR_INVALID_LANGUAGE: - str = "STT_ERROR_INVALID_LANGUAGE"; - break; - case STT_ERROR_ENGINE_NOT_FOUND: - str = "STT_ERROR_ENGINE_NOT_FOUND"; - break; - case STT_ERROR_OPERATION_FAILED: - str = "STT_ERROR_OPERATION_FAILED"; - break; - case STT_ERROR_NOT_SUPPORTED_FEATURE: - str = "STT_ERROR_NOT_SUPPORTED_FEATURE"; - break; - } - return str; -} - -void voice_stt_set_silence_detection_func(bool bEnable) -{ - int ret = STT_ERROR_NONE; - - stt_option_silence_detection_e s_option; - - if(bEnable) - s_option = STT_OPTION_SILENCE_DETECTION_TRUE; - else - s_option = STT_OPTION_SILENCE_DETECTION_FALSE; - - ret = stt_set_silence_detection(g_stt, s_option); - if (STT_ERROR_NONE != ret) { - PRINTFUNC(DLOG_ERROR, "stt_set_silence_detection Failed : error(%d) = %s", ret, error_string((stt_error_e)ret)); - } else { - PRINTFUNC(NO_PRINT, "stt_set_silence_detection Successful"); - } -} - - -//////////////////////////////////////////////////////////////////////////////// -// STT Callback functions -//////////////////////////////////////////////////////////////////////////////// - -void on_feedback(stt_h handle) -{ - int is_sound = 0; - int is_sound_vibe = 0; - - if(vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &is_sound)) { - PRINTFUNC(DLOG_ERROR, "get sound status failed."); - } - - if(vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &is_sound_vibe)) { - PRINTFUNC(DLOG_ERROR, "get vibe status failed."); - } - - if (is_sound || is_sound_vibe) { - stt_set_start_sound(handle, "/usr/share/ise-voice-input/audio/voice_start.wav"); - stt_set_stop_sound(handle, "/usr/share/ise-voice-input/audio/voice_stop.wav"); - } else { - stt_unset_start_sound(handle); - stt_unset_stop_sound(handle); - } -} - //////////////////////////////////////////////////////////////////////////////// // STT APIs callers //////////////////////////////////////////////////////////////////////////////// -- 2.7.4 From 410e0b28138643ae6e7024eead5ef301581fcca4 Mon Sep 17 00:00:00 2001 From: "sungwook79.park" Date: Thu, 8 Sep 2016 14:59:38 +0900 Subject: [PATCH 15/16] Fix wrong display issue of radio button group in language selection Change-Id: I5445b67d6c4a35dcefe6e9c03eeae6a6a06c7568 Signed-off-by: sungwook79.park --- src/w-input-stt-voice.cpp | 107 +++++++++++++++++++++++----------------------- 1 file changed, 54 insertions(+), 53 deletions(-) diff --git a/src/w-input-stt-voice.cpp b/src/w-input-stt-voice.cpp index 0f14f77..72b7792 100755 --- a/src/w-input-stt-voice.cpp +++ b/src/w-input-stt-voice.cpp @@ -67,7 +67,7 @@ static Elm_Genlist_Item_Class itc_2text; static void set_guide_text(VoiceData *vd, const char* text, bool translatable = false); -const char *supported_language[7] = { +const char *supported_language[] = { "auto", "en_US", "es_US", @@ -78,7 +78,7 @@ const char *supported_language[7] = { }; -const char *disp_lang_array[7] = { +const char *disp_lang_array[] = { "", "English (United States)", "Español (América Latina)", @@ -961,47 +961,38 @@ char *__get_genlist_item_label(void *data, Evas_Object *obj, const char *part) static Evas_Object *__get_genlist_item_content(void *data, Evas_Object *obj, const char *part) { - int index = (int)data; + int index = (intptr_t)data; Evas_Object * content = NULL; - if (!strcmp(part, "elm.icon")) { + if (!strcmp(part, "elm.icon") || + !strcmp(part, "elm.swallow.end")) { content = elm_radio_add(obj); + elm_object_style_set(content, "list"); elm_radio_state_value_set(content, index); elm_radio_group_add(content, radio_gp); evas_object_size_hint_weight_set(content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_propagate_events_set(content, EINA_TRUE); evas_object_size_hint_align_set(content, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_style_set(content, "list"); } return content; } static int get_language_value() { -#if 1 int lang = 0, ret = 0; ret = preference_get_int(PREFERENCE_ISE_STT_LANGUAGE, &lang); - if(PREFERENCE_ERROR_NONE != ret){ + if (PREFERENCE_ERROR_NONE != ret) { PRINTFUNC(DLOG_ERROR, "preference_get_int error!(%d)", ret); - preference_set_int(PREFERENCE_ISE_STT_LANGUAGE, (int)2); //auto - lang = 2; + preference_set_int(PREFERENCE_ISE_STT_LANGUAGE, STT_VOICE_N66_AUTO); //auto + lang = STT_VOICE_N66_AUTO; } -#else - int lang = 0, ret = 0; - ret = vconf_get_int(VCONFKEY_ISE_STT_LANGUAGE, &lang); - if (ret !=0) { - PRINTFUNC(DLOG_ERROR, "Vconf_get_int error!(%d)", ret); - } -#endif - if(g_is_n66) { - if(lang < 0 || lang > 6) { - PRINTFUNC(DLOG_WARN, "vconf lang orig(%d) to be 0", lang); - lang = 0; - } - PRINTFUNC(DLOG_DEBUG, "n66 current language value for stt (%s).", disp_lang_array[lang]); + if (lang < 0 || lang > (int)(sizeof(supported_language)/sizeof(supported_language[0])-1)) { + PRINTFUNC(DLOG_WARN, "vconf lang orig(%d) to be 0", lang); + lang = 0; } + PRINTFUNC(DLOG_DEBUG, "n66 current language value for stt (%s).", disp_lang_array[lang]); return lang; } @@ -1011,19 +1002,11 @@ static void set_language_value(int type) // Add implementation to store language type. int ret = 0; -#if 1 ret = preference_set_int(PREFERENCE_ISE_STT_LANGUAGE, (int)type); if(PREFERENCE_ERROR_NONE != ret){ PRINTFUNC(DLOG_ERROR, "preference_set_int error!(%d)", ret); } -#else - ret = vconf_set_int(VCONFKEY_ISE_STT_LANGUAGE, (int) type); - if (ret != 0) { - PRINTFUNC(DLOG_ERROR, "Vconf_set_int error!(%d)", ret); - return; - } -#endif PRINTFUNC(DLOG_DEBUG, "language type (%d)", type); // Update string @@ -1157,14 +1140,15 @@ static Evas_Object *create_language_list(Evas_Object *parent) elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS); elm_genlist_homogeneous_set(genlist, EINA_TRUE); -// uxt_genlist_set_bottom_margin_enabled(genlist, EINA_TRUE); - +#ifdef _CIRCLE Evas_Object *circle_language_genlist = eext_circle_object_genlist_add(genlist, NULL); eext_circle_object_genlist_scroller_policy_set(circle_language_genlist, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO); evas_object_resize(circle_language_genlist, 360, 360); evas_object_show(circle_language_genlist); eext_rotary_object_event_activated_set(circle_language_genlist, EINA_TRUE); - +#else + evas_object_show(genlist); +#endif int i = 0; int lang_val = 0; Elm_Object_Item * item = NULL; @@ -1176,16 +1160,21 @@ static Evas_Object *create_language_list(Evas_Object *parent) elm_radio_state_value_set(radio_gp, -1); lang_val = get_language_value(); - +#ifdef _WEARABLE //Title itc_title.item_style = "title"; itc_title.func.text_get = __get_genlist_title_label; itc_title.func.content_get = NULL; item = elm_genlist_item_append(genlist, &itc_title, (void *)-1, NULL, ELM_GENLIST_ITEM_GROUP, NULL, genlist); +#endif // 2 line text +#ifdef _WEARABLE itc_2text.item_style = "2text.1icon.1/sub1.multiline"; +#else + itc_2text.item_style = "type1"; +#endif itc_2text.func.text_get = __get_genlist_item_label; itc_2text.func.content_get = __get_genlist_item_content; @@ -1202,40 +1191,52 @@ static Evas_Object *create_language_list(Evas_Object *parent) } // 1 line text +#ifdef _WEARABLE itc_1text.item_style = "1text.1icon.1"; +#else + itc_1text.item_style = "type1"; +#endif itc_1text.func.text_get = __get_genlist_item_label; itc_1text.func.content_get = __get_genlist_item_content; - if(g_is_n66) { - for (i = 1; i < 7; i++) - { - char *s = (char *)disp_lang_array[i]; + for (i = 1; i < (long)(sizeof(disp_lang_array)/sizeof(disp_lang_array[0])); i++) + { + char *s = (char *)disp_lang_array[i]; - if(strchr(s, '(')){ - item = item_append(genlist, itc_2text, i, language_set_genlist_radio_cb, genlist); - } else { - item = item_append(genlist, itc_1text, i, language_set_genlist_radio_cb, genlist); - } + if(strchr(s, '(')){ + item = item_append(genlist, itc_2text, i, language_set_genlist_radio_cb, genlist); + } else { + item = item_append(genlist, itc_1text, i, language_set_genlist_radio_cb, genlist); + } - if(lang_val == i) { - PRINTFUNC(DLOG_DEBUG, "%d item is choiced.", i); - elm_genlist_item_show(item, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE); - } + if(lang_val == i) { + PRINTFUNC(DLOG_DEBUG, "%d item is choiced.", i); + elm_genlist_item_show(item, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE); + } - if ( item == NULL ) { - PRINTFUNC(DLOG_DEBUG, "elm_genlist_item_append was failed"); - break; - } + if ( item == NULL ) { + PRINTFUNC(DLOG_DEBUG, "elm_genlist_item_append was failed"); + break; } } + Elm_Object_Item *dummy; + Elm_Genlist_Item_Class *itc_dummy = elm_genlist_item_class_new(); + if (itc_dummy) { + itc_dummy->item_style = "title"; + itc_dummy->func.text_get = NULL; + itc_dummy->func.content_get = NULL; + } + dummy = elm_genlist_item_append(genlist, itc_dummy, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(dummy, ELM_OBJECT_SELECT_MODE_NONE); + LOGD("before elm_radio_value_set > lang_val = %d", lang_val); + radio_gp = elm_radio_add(genlist); + elm_radio_state_value_set(radio_gp, lang_val); elm_radio_value_set(radio_gp, lang_val); elm_object_signal_callback_add(genlist, "elm,system,language,change", "elm", language_changed_cb, NULL); -// eext_rotary_event_callback_set(genlist, _language_list_rotary_cb, NULL); evas_object_smart_callback_add(genlist, "realized", _language_list_item_realized, NULL); - g_evt_key_down = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _ise_keydown_cb, NULL); return genlist; } -- 2.7.4 From 5afadd075dcbf4ea93b09075c41d8bb20d4e1147 Mon Sep 17 00:00:00 2001 From: "sungwook79.park" Date: Fri, 9 Sep 2016 13:45:08 +0900 Subject: [PATCH 16/16] Fix build warning Change-Id: I63d2d4fd6257b504b47f911b9f71b2cb77278a59 Signed-off-by: sungwook79.park --- inc/Debug.h | 4 ++-- src/w-input-emoticon.cpp | 2 +- src/w-input-stt-engine.cpp | 1 - src/w-input-stt-voice.cpp | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/inc/Debug.h b/inc/Debug.h index 393f5a3..d7759ed 100755 --- a/inc/Debug.h +++ b/inc/Debug.h @@ -17,10 +17,10 @@ #ifndef __DEBUG_HEAD__ #define __DEBUG_HEAD__ -#define LOG_TAG "INPUT_DELEGATOR" - #include +#undef LOG_TAG +#define LOG_TAG "INPUT_DELEGATOR" /*************************************************************************************************** diff --git a/src/w-input-emoticon.cpp b/src/w-input-emoticon.cpp index 7f96a37..aec6abf 100755 --- a/src/w-input-emoticon.cpp +++ b/src/w-input-emoticon.cpp @@ -114,7 +114,7 @@ static void _rotary_selector_item_clicked(void *data, Evas_Object *obj, void *ev } int length; - const Eina_Unicode unicode_event[2] = { emoticon_info[i].code, 0 }; + const Eina_Unicode unicode_event[2] = { (unsigned int)emoticon_info[i].code, 0 }; char* utf_8 = eina_unicode_unicode_to_utf8(unicode_event, &length); reply_to_sender_by_callback((const char*)utf_8, "emoticon"); diff --git a/src/w-input-stt-engine.cpp b/src/w-input-stt-engine.cpp index be508bf..1a69ad7 100755 --- a/src/w-input-stt-engine.cpp +++ b/src/w-input-stt-engine.cpp @@ -38,7 +38,6 @@ } while (0); -static stt_h g_stt; //////////////////////////////////////////////////////////////////////////////// diff --git a/src/w-input-stt-voice.cpp b/src/w-input-stt-voice.cpp index 72b7792..bac5865 100755 --- a/src/w-input-stt-voice.cpp +++ b/src/w-input-stt-voice.cpp @@ -1160,12 +1160,12 @@ static Evas_Object *create_language_list(Evas_Object *parent) elm_radio_state_value_set(radio_gp, -1); lang_val = get_language_value(); -#ifdef _WEARABLE + //Title itc_title.item_style = "title"; itc_title.func.text_get = __get_genlist_title_label; itc_title.func.content_get = NULL; - +#ifdef _WEARABLE item = elm_genlist_item_append(genlist, &itc_title, (void *)-1, NULL, ELM_GENLIST_ITEM_GROUP, NULL, genlist); #endif -- 2.7.4