From a479c55eaef71677c2296df53e6dc2a0d94a857d Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 23 May 2017 17:30:02 +0900 Subject: [PATCH] Support option in TV profile temporarily Change-Id: Ib4768126071a15ceec37ca3963bb5f4154f6353c Signed-off-by: Jihoon Kim --- data/layout/tv/LYT_LANDSCAPE_QTY_ENGLISH.xml | 2 +- data/layout/tv/LYT_LANDSCAPE_QTY_KOREAN.xml | 4 ++-- src/option.cpp | 25 +++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/data/layout/tv/LYT_LANDSCAPE_QTY_ENGLISH.xml b/data/layout/tv/LYT_LANDSCAPE_QTY_ENGLISH.xml index ffb74d8..6e22167 100644 --- a/data/layout/tv/LYT_LANDSCAPE_QTY_ENGLISH.xml +++ b/data/layout/tv/LYT_LANDSCAPE_QTY_ENGLISH.xml @@ -349,7 +349,7 @@ - + ic_keypad_setting_bl.png ic_keypad_setting_wh.png diff --git a/data/layout/tv/LYT_LANDSCAPE_QTY_KOREAN.xml b/data/layout/tv/LYT_LANDSCAPE_QTY_KOREAN.xml index 56571ec..5c227d9 100644 --- a/data/layout/tv/LYT_LANDSCAPE_QTY_KOREAN.xml +++ b/data/layout/tv/LYT_LANDSCAPE_QTY_KOREAN.xml @@ -441,7 +441,7 @@ - + ic_keypad_setting_bl.png ic_keypad_setting_wh.png @@ -559,4 +559,4 @@ - \ No newline at end of file + diff --git a/src/option.cpp b/src/option.cpp index 76e9835..c459447 100644 --- a/src/option.cpp +++ b/src/option.cpp @@ -267,6 +267,9 @@ static void reset_settings_popup(void *data, Evas_Object *obj, void *event_info) Evas_Object *popup = elm_popup_add(elm_object_top_widget_get(obj)); elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0); +#ifdef _TV + elm_popup_orient_set(popup, ELM_POPUP_ORIENT_CENTER); +#endif eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, eext_popup_back_cb, NULL); evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); @@ -292,6 +295,9 @@ static void reset_settings_popup(void *data, Evas_Object *obj, void *event_info) Evas_Object *btn_cancel = create_popup_button(popup, "popup/circle/left", icon_path, POPUP_CANCEL_BTN); elm_object_part_content_set(popup, "button1", btn_cancel); evas_object_smart_callback_add(btn_cancel, "clicked", reset_settings_popup_response_cancel_cb, popup); +#ifdef _TV + elm_object_focus_set(btn_cancel, EINA_TRUE); +#endif /* Ok button */ #ifdef _CIRCLE @@ -574,6 +580,7 @@ static Evas_Object *_create_check_button(Evas_Object *parent, sclboolean state) ck = elm_check_add(parent); elm_object_style_set(ck, "on&off"); elm_check_state_set(ck, state); + elm_object_focus_allow_set(ck, EINA_FALSE); evas_object_propagate_events_set(ck, EINA_FALSE); evas_object_show(ck); } @@ -661,6 +668,8 @@ static void create_genlist_item_classes(SCLOptionWindowType type) if (option_elements[type].itc_main_item) { #ifdef _WEARABLE option_elements[type].itc_main_item->item_style = "2text.1icon.1"; +#elif _TV + option_elements[type].itc_main_item->item_style = "default"; #else option_elements[type].itc_main_item->item_style = "type1"; #endif @@ -674,6 +683,8 @@ static void create_genlist_item_classes(SCLOptionWindowType type) if (option_elements[type].itc_multi_item) { #ifdef _WEARABLE option_elements[type].itc_multi_item->item_style = "2text.1icon.1"; +#elif _TV + option_elements[type].itc_multi_item->item_style = "default"; #else option_elements[type].itc_multi_item->item_style = "multiline"; #endif @@ -687,6 +698,8 @@ static void create_genlist_item_classes(SCLOptionWindowType type) if (option_elements[type].itc_1text_main_item) { #ifdef _WEARABLE option_elements[type].itc_1text_main_item->item_style = "1text.1icon.1"; +#elif _TV + option_elements[type].itc_1text_main_item->item_style = "default"; #else option_elements[type].itc_1text_main_item->item_style = "type1"; #endif @@ -700,6 +713,8 @@ static void create_genlist_item_classes(SCLOptionWindowType type) if (option_elements[type].itc_language_subitems) { #ifdef _WEARABLE option_elements[type].itc_language_subitems->item_style = "1text.1icon.1"; +#elif _TV + option_elements[type].itc_language_subitems->item_style = "default"; #else option_elements[type].itc_language_subitems->item_style = "type1"; #endif @@ -866,6 +881,7 @@ Evas_Object* create_option_main_view(Evas_Object *parent, Evas_Object *naviframe add_scrollable_title_area(genlist, OPTIONS, EINA_TRUE); #endif +#ifndef _TV /* Input languages */ append_item(genlist, SETTING_ITEM_ID_INPUT_LANGUAGE_TITLE, INPUT_LANGUAGE, NULL, NULL, option_elements[type].itc_group_title, ELM_GENLIST_ITEM_GROUP, EINA_TRUE); @@ -895,10 +911,13 @@ Evas_Object* create_option_main_view(Evas_Object *parent, Evas_Object *naviframe /* Select input languages */ option_elements[type].languages_item = append_item(genlist, SETTING_ITEM_ID_SELECT_INPUT_LANGUAGE, SELECT_LANGUAGES, NULL, (void *)SETTING_ITEM_ID_SELECT_INPUT_LANGUAGE, option_elements[type].itc_1text_main_item, ELM_GENLIST_ITEM_NONE, EINA_FALSE); } +#endif #ifndef _WEARABLE +#ifndef _TV /* Smart input functions */ append_item(genlist, SETTING_ITEM_ID_SMART_INPUT_TITLE, SMART_FUNCTIONS, NULL, NULL, option_elements[type].itc_group_title, ELM_GENLIST_ITEM_GROUP, EINA_TRUE); +#endif /* Auto capitalize */ append_item(genlist, SETTING_ITEM_ID_AUTO_CAPITALISE, AUTO_CAPITALISE, CAPITALISE_DESC, (void *)SETTING_ITEM_ID_AUTO_CAPITALISE, option_elements[type].itc_multi_item, ELM_GENLIST_ITEM_NONE, EINA_FALSE); @@ -906,16 +925,21 @@ Evas_Object* create_option_main_view(Evas_Object *parent, Evas_Object *naviframe /* Auto punctuate */ append_item(genlist, SETTING_ITEM_ID_AUTO_PUNCTUATE, AUTO_PUNCTUATE, PUNCTUATE_DESC, (void *)SETTING_ITEM_ID_AUTO_PUNCTUATE, option_elements[type].itc_multi_item, ELM_GENLIST_ITEM_NONE, EINA_FALSE); +#ifndef _TV /* Key-tap feedback */ append_item(genlist, SETTING_ITEM_ID_KEY_TAP_TITLE, KEY_FEEDBACK, NULL, NULL, option_elements[type].itc_group_title, ELM_GENLIST_ITEM_GROUP, EINA_TRUE); +#endif /* Sound */ append_item(genlist, SETTING_ITEM_ID_SOUND, SOUND, NULL, (void *)SETTING_ITEM_ID_SOUND, option_elements[type].itc_main_item, ELM_GENLIST_ITEM_NONE, EINA_FALSE); +#ifndef _TV /* Character preview */ append_item(genlist, SETTING_ITEM_ID_CHARACTER_PRE, CHARACTER_PREVIEW, PREVIEW_DESC, (void *)SETTING_ITEM_ID_CHARACTER_PRE, option_elements[type].itc_multi_item, ELM_GENLIST_ITEM_NONE, EINA_FALSE); #endif +#endif +#ifndef _TV const char *more_setting_text = NULL; #ifdef _WEARABLE @@ -927,6 +951,7 @@ Evas_Object* create_option_main_view(Evas_Object *parent, Evas_Object *naviframe #endif append_item(genlist, SETTING_ITEM_ID_MORE_SETTINGS_TITLE, more_setting_text, NULL, NULL, option_elements[type].itc_group_title, ELM_GENLIST_ITEM_GROUP, EINA_TRUE); +#endif #ifdef _WEARABLE /* Smart typing */ -- 2.7.4