From: sungwook79.park Date: Mon, 8 May 2017 02:15:29 +0000 (+0900) Subject: Fix macro usage for profile in Unified build system X-Git-Tag: accepted/tizen/unified/20170518.184014~9 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Finputdelegator.git;a=commitdiff_plain;h=f7b74cc1d99f7058628ec5b4b02ce6ff67d4a76d Fix macro usage for profile in Unified build system Change-Id: I579c4592ba537df5f9c02615416dac8b38fc060e Signed-off-by: sungwook79.park --- diff --git a/src/w-input-emoticon.cpp b/src/w-input-emoticon.cpp index 42bd53b..b7afb02 100755 --- a/src/w-input-emoticon.cpp +++ b/src/w-input-emoticon.cpp @@ -757,11 +757,12 @@ Evas_Object* _create_emoticon_genlist(void* data) if (NULL == genlist) return NULL; - Evas_Object* circle_object_genlist = eext_circle_object_genlist_add(genlist, ad->circle_surface); - eext_circle_object_genlist_scroller_policy_set(circle_object_genlist, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO); - evas_object_data_set(genlist, "circle", (void *) circle_object_genlist); - eext_rotary_object_event_activated_set(circle_object_genlist, EINA_TRUE); - + if (_WEARABLE) { + Evas_Object* circle_object_genlist = eext_circle_object_genlist_add(genlist, ad->circle_surface); + eext_circle_object_genlist_scroller_policy_set(circle_object_genlist, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO); + evas_object_data_set(genlist, "circle", (void *) circle_object_genlist); + eext_rotary_object_event_activated_set(circle_object_genlist, EINA_TRUE); + } 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); evas_object_show(genlist); diff --git a/src/w-input-selector.cpp b/src/w-input-selector.cpp index 7b08443..92bf854 100755 --- a/src/w-input-selector.cpp +++ b/src/w-input-selector.cpp @@ -566,10 +566,10 @@ void _back_to_genlist_for_selector() reply_to_sender_by_callback(NULL, NULL); elm_exit(); } -#ifdef _WEARABLE - Evas_Object *circle_genlist = (Evas_Object *) evas_object_data_get(app_data->genlist, "circle"); - eext_rotary_object_event_activated_set(circle_genlist, EINA_TRUE); -#endif + if (_WEARABLE) { + Evas_Object *circle_genlist = (Evas_Object *) evas_object_data_get(app_data->genlist, "circle"); + eext_rotary_object_event_activated_set(circle_genlist, EINA_TRUE); + } } static void _item_realized(void *data, Evas_Object *obj, void *event_info) //called when list scrolled @@ -584,12 +584,12 @@ Evas_Object* _create_genlist(Evas_Object* navi) return NULL; elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS); -#ifdef _WEARABLE - 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); - evas_object_data_set(genlist, "circle", (void *) circle_object_genlist); - eext_rotary_object_event_activated_set(circle_object_genlist, EINA_TRUE); -#endif + if (_WEARABLE) { + 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); + evas_object_data_set(genlist, "circle", (void *) circle_object_genlist); + eext_rotary_object_event_activated_set(circle_object_genlist, EINA_TRUE); + } 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); @@ -832,9 +832,8 @@ bool _app_create(void* user_data) Evas_Object* conform = NULL; Evas_Object* bg = NULL; Evas_Object* window = NULL; -#ifdef _WEARABLE Eext_Circle_Surface *surface; -#endif + if (!user_data) { return false; } @@ -869,11 +868,10 @@ bool _app_create(void* user_data) evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); conform = elm_conformant_add(window); -#ifdef _WEARABLE - surface = eext_circle_surface_conformant_add(conform); -#endif - evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + if (_WEARABLE) + surface = eext_circle_surface_conformant_add(conform); + evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_win_resize_object_add(window, conform); elm_object_content_set(conform, layout); @@ -884,9 +882,7 @@ bool _app_create(void* user_data) app_data->win_main = window; app_data->conform = conform; app_data->layout_main = layout; -#ifdef _WEARABLE app_data->circle_surface = surface; -#endif app_data->app_type = APP_TYPE_SELECT_MODE; Evas_Object *naviframe = elm_naviframe_add(layout); diff --git a/src/w-input-stt-voice.cpp b/src/w-input-stt-voice.cpp index 925cd14..4595593 100755 --- a/src/w-input-stt-voice.cpp +++ b/src/w-input-stt-voice.cpp @@ -887,14 +887,14 @@ static inline void ea_naviframe_back(void *data, Evas_Object *obj, void *event_i ecore_event_handler_del(g_evt_key_down); g_evt_key_down = NULL; -#ifdef _WEARABLE - //Hide more option - if(g_more_option_layout){ - if(eext_more_option_opened_get(g_more_option_layout) == EINA_TRUE) { - eext_more_option_opened_set(g_more_option_layout, EINA_FALSE); + if (_WEARABLE) { + //Hide more option + if(g_more_option_layout){ + if(eext_more_option_opened_get(g_more_option_layout) == EINA_TRUE) { + eext_more_option_opened_set(g_more_option_layout, EINA_FALSE); + } } } -#endif } static char *__get_genlist_title_label(void *data, Evas_Object *obj, const char *part) @@ -1172,16 +1172,16 @@ static Evas_Object *create_language_list(Evas_Object *parent) 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 + if (_WEARABLE) { + item = elm_genlist_item_append(genlist, &itc_title, (void *)-1, NULL, ELM_GENLIST_ITEM_GROUP, NULL, genlist); + } // 2 line text -#ifdef _WEARABLE - itc_2text.item_style = "2text.1icon.1/sub1.multiline"; -#else - itc_2text.item_style = "type1"; -#endif + if (_WEARABLE) { + itc_2text.item_style = "2text.1icon.1/sub1.multiline"; + } else { + itc_2text.item_style = "type1"; + } itc_2text.func.text_get = __get_genlist_item_label; itc_2text.func.content_get = __get_genlist_item_content; @@ -1198,11 +1198,11 @@ 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 + if (_WEARABLE) { + itc_1text.item_style = "1text.1icon.1"; + } else { + itc_1text.item_style = "type1"; + } itc_1text.func.text_get = __get_genlist_item_label; itc_1text.func.content_get = __get_genlist_item_content; @@ -1517,11 +1517,11 @@ void activate_circle_scroller_for_stt_textbox(void* data, Eina_Bool bActivate) Evas_Object *scroller = NULL; scroller = elm_layout_content_get((Evas_Object *)voicedata->layout_main, "text_area"); -#ifdef _WEARABLE - Evas_Object *circle_scroller = NULL; - circle_scroller = (Evas_Object *) evas_object_data_get(scroller, "circle"); - eext_rotary_object_event_activated_set(circle_scroller, bActivate); -#endif + if (_WEARABLE) { + Evas_Object *circle_scroller = NULL; + circle_scroller = (Evas_Object *) evas_object_data_get(scroller, "circle"); + eext_rotary_object_event_activated_set(circle_scroller, bActivate); + } } static Evas_Object *create_textblock(void* data) @@ -1553,11 +1553,11 @@ static Evas_Object *create_textblock(void* data) elm_scroller_page_scroll_limit_set(scroller, 0, 1); elm_object_scroll_lock_x_set(scroller, EINA_TRUE); -#ifdef _WEARABLE - circle_scroller = eext_circle_object_scroller_add(scroller, app_data->circle_surface); - eext_circle_object_scroller_policy_set(circle_scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO); - eext_rotary_object_event_activated_set(circle_scroller, EINA_TRUE); -#endif + if (_WEARABLE) { + circle_scroller = eext_circle_object_scroller_add(scroller, app_data->circle_surface); + eext_circle_object_scroller_policy_set(circle_scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO); + eext_rotary_object_event_activated_set(circle_scroller, EINA_TRUE); + } box = elm_box_add(scroller); inner_layout = elm_layout_add(scroller); @@ -1879,13 +1879,13 @@ void on_stt_pause(VoiceData *r_voicedata){ //Hide more option and language settings by interrupt scenario. close_setting_window_idler_cb(NULL); Evas_Object *mo_layout = voicedata->mo->getMoreOptionLayout(); -#ifdef _WEARABLE - if(mo_layout){ - if(eext_more_option_opened_get(mo_layout) == EINA_TRUE) { - eext_more_option_opened_set(mo_layout, EINA_FALSE); + if (_WEARABLE) { + if(mo_layout){ + if(eext_more_option_opened_get(mo_layout) == EINA_TRUE) { + eext_more_option_opened_set(mo_layout, EINA_FALSE); + } } } -#endif } }