From aab0668ec8ff977bff1348df8302b0a4e8e060fd Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Wed, 9 Dec 2020 19:04:38 +0900 Subject: [PATCH] Reduce the duplicated code to set edj path Change-Id: I270424691fae1367893be4266e07d6592bb222d2 Signed-off-by: Jihoon Kim --- src/include/ise.h | 19 +++++++++++-------- src/ise-language-change.cpp | 10 ---------- src/ise-stt-mode.cpp | 11 +---------- 3 files changed, 12 insertions(+), 28 deletions(-) diff --git a/src/include/ise.h b/src/include/ise.h index 0d1083d..7404bb5 100644 --- a/src/include/ise.h +++ b/src/include/ise.h @@ -29,17 +29,20 @@ #define LOCALEDIR RESDIR"/locale" #define PRIMARY_LATIN_LANGUAGE "English" -#undef MAIN_ENTRY_XML_PATH -#ifdef _TV -#define MAIN_ENTRY_XML_PATH LAYOUTDIR"/tv/main_entry.xml" -#elif _WEARABLE -#define MAIN_ENTRY_XML_PATH LAYOUTDIR"/wearable/main_entry.xml" -#elif _COMMON -#define MAIN_ENTRY_XML_PATH LAYOUTDIR"/common/main_entry.xml" + +#ifdef _WEARABLE +#define PROFILE_NAME "wearable" +#elif _TV +#define PROFILE_NAME "tv" +#elif _MOBILE +#define PROFILE_NAME "mobile" #else -#define MAIN_ENTRY_XML_PATH LAYOUTDIR"/mobile/main_entry.xml" +#define PROFILE_NAME "common" #endif +#undef MAIN_ENTRY_XML_PATH +#define MAIN_ENTRY_XML_PATH LAYOUTDIR "/" PROFILE_NAME"/main_entry.xml" + #define DEFAULT_KEYBOARD_ISE_UUID "org.tizen.ise-engine-default" #define DEFAULT_KEYBOARD_ISE_PKGID "ise-engine-default" diff --git a/src/ise-language-change.cpp b/src/ise-language-change.cpp index d884c48..bce1af7 100644 --- a/src/ise-language-change.cpp +++ b/src/ise-language-change.cpp @@ -45,16 +45,6 @@ extern CSCLUI *g_ui; #endif #ifdef _WEARABLE -#define PROFILE_NAME "wearable" -#elif _TV -#define PROFILE_NAME "tv" -#elif _MOBILE -#define PROFILE_NAME "mobile" -#else -#define PROFILE_NAME "common" -#endif - -#ifdef _WEARABLE #define IMG_ARROW_LEFT LAYOUTDIR"/wearable/image/button/B09_btn_arrow_left.png" #define IMG_ARROW_RIGHT LAYOUTDIR"/wearable/image/button/B09_btn_arrow_right.png" #define IMG_POPUP_FC_BG LAYOUTDIR"/wearable/image/button/language_change_popup_bg.png" diff --git a/src/ise-stt-mode.cpp b/src/ise-stt-mode.cpp index 71e74c8..03472e3 100644 --- a/src/ise-stt-mode.cpp +++ b/src/ise-stt-mode.cpp @@ -33,16 +33,9 @@ #define _EDJ(x) elm_layout_edje_get(x) -#ifdef _WEARABLE -#define STT_EDJ_FILE "edje/wearable/w-input-stt.edj" -#elif _TV -#define STT_EDJ_FILE "edje/tv/w-input-stt.edj" -#else -#define STT_EDJ_FILE "edje/mobile/w-input-stt.edj" -#endif +#define STT_EDJ_FILE "edje/" PROFILE_NAME"/w-input-stt.edj" VoiceData *my_voicedata = NULL; -static Evas_Object *win_main = NULL; extern CSCLUI *g_ui; extern Candidate *g_candidate; extern CONFIG_VALUES g_config_values; @@ -637,8 +630,6 @@ Evas_Object *create_fullview(Evas_Object *win, VoiceData *r_voicedata) int ret; init_customizing_theme(); - win_main = win; - Evas_Object *layout_main = elm_layout_add(win); evas_object_size_hint_weight_set(layout_main, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(layout_main, EVAS_HINT_FILL, EVAS_HINT_FILL); -- 2.7.4