From 8a5f40b9848defb52e50c4b0d5c0c45bb525a84c Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 20 Jul 2021 17:00:04 +0900 Subject: [PATCH] Remove unused predefined preprocessor Change-Id: I0c1588d014f77d53ee531812e4f6625e7bba9dfd Signed-off-by: Jihoon Kim --- CMakeLists.txt | 1 - src/include/ise-emoticon-group.h | 3 -- src/include/ise-emoticon-list.h | 3 -- src/include/ise-emoticon-mode.h | 3 -- src/ise-emoticon-list.cpp | 2 - src/ise-emoticon-mode.cpp | 98 ---------------------------------------- 6 files changed, 110 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b2449ee..42c2fb4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,7 +145,6 @@ ADD_DEFINITIONS("-DPACKAGE_NAME=\"${ISE_PKGNAME}\"") ADD_DEFINITIONS("-DRESDIR=\"${ISE_RESDIR}\"") ADD_DEFINITIONS("-DLAYOUTDIR=\"${ISE_LAYOUTDIR}\"") ADD_DEFINITIONS(-DISE_NAME=\"/ise-default\") -ADD_DEFINITIONS(-DSUPPORTS_EMOTICONS) IF(("${ARCH}" MATCHES "^arm.*") OR ("${ARCH}" MATCHES "^aarch64.*")) ADD_DEFINITIONS("-DSUPPORT_NMT") diff --git a/src/include/ise-emoticon-group.h b/src/include/ise-emoticon-group.h index fe0b2b8..9fc5547 100644 --- a/src/include/ise-emoticon-group.h +++ b/src/include/ise-emoticon-group.h @@ -18,8 +18,6 @@ #ifndef ISE_EMOTICON_GROUP_H_ #define ISE_EMOTICON_GROUP_H_ -#ifdef SUPPORTS_EMOTICONS - #ifdef _WEARABLE #define EMOTICON_GROUP_RECENTLY_USED_NUM 9 #define EMOTICON_GROUP_1_NUM 9 @@ -59,5 +57,4 @@ enum emoticon_group_t }; #endif -#endif /* SUPPORTS_EMOTICONS */ #endif /* ISE_EMOTICON_GROUP_H_ */ diff --git a/src/include/ise-emoticon-list.h b/src/include/ise-emoticon-list.h index 9cb00be..5c1f3d4 100644 --- a/src/include/ise-emoticon-list.h +++ b/src/include/ise-emoticon-list.h @@ -18,8 +18,6 @@ #ifndef ISE_EMOTICON_LIST_H_ #define ISE_EMOTICON_LIST_H_ -#ifdef SUPPORTS_EMOTICONS - #include "ise-emoticon-group.h" void ise_emoticon_init_list(void); @@ -28,5 +26,4 @@ emoticon_group_t ise_emoticon_get_group_id(const char *group_name); const char *ise_emoticon_get_group_name(int id); int ise_emoticon_get_code(unsigned int group, unsigned int index); -#endif /* SUPPORTS_EMOTICONS */ #endif /* ISE_EMOTICON_LIST_H_ */ diff --git a/src/include/ise-emoticon-mode.h b/src/include/ise-emoticon-mode.h index 1dcfb3b..e1c674b 100644 --- a/src/include/ise-emoticon-mode.h +++ b/src/include/ise-emoticon-mode.h @@ -18,8 +18,6 @@ #ifndef ISE_EMOTICON_MODE_H_ #define ISE_EMOTICON_MODE_H_ -#ifdef SUPPORTS_EMOTICONS - #include #include "ise-emoticon-group.h" @@ -33,5 +31,4 @@ size_t ise_emoticon_get_recent_list_size(); void ise_emoticon_set_current_group(emoticon_group_t emoticon_group); emoticon_group_t ise_emoticon_get_current_group(); -#endif /* SUPPORTS_EMOTICONS */ #endif /* ISE_EMOTICON_MODE_H_ */ diff --git a/src/ise-emoticon-list.cpp b/src/ise-emoticon-list.cpp index 6c8f61d..ec222d1 100644 --- a/src/ise-emoticon-list.cpp +++ b/src/ise-emoticon-list.cpp @@ -15,7 +15,6 @@ * */ -#ifdef SUPPORTS_EMOTICONS #include "ise-emoticon-mode.h" #include #ifdef _WEARABLE @@ -869,4 +868,3 @@ int ise_emoticon_get_code(unsigned int group, unsigned int index) { return emoticon_list[group][index]; } -#endif diff --git a/src/ise-emoticon-mode.cpp b/src/ise-emoticon-mode.cpp index 6a1af35..da7e64c 100644 --- a/src/ise-emoticon-mode.cpp +++ b/src/ise-emoticon-mode.cpp @@ -15,8 +15,6 @@ * */ -#ifdef SUPPORTS_EMOTICONS - #include #include #include @@ -178,12 +176,7 @@ static Elm_Gengrid_Item_Class *gic = NULL; static void __ise_emoticon_create_gengrid(unsigned short int screen_degree); static void __ise_emoticon_append_items_to_gengrid(emoticon_group_t emoticon_group); static void __ise_emoticon_create_item_class(unsigned short int screen_degree); -#if SUPPORTS_EMOTICONS_BY_IMAGE -static Evas_Object * grid_content_get(void *data, Evas_Object *obj, const char *part); -static void grid_content_del(void *data, Evas_Object *obj); -#else static char * grid_text_get(void *data, Evas_Object *obj, const char *part); -#endif static void _item_selected(void *data, Evas_Object *obj, void *event_info); static Eina_Bool _focus_done(void *data); static void _multi_down(void *data, Evas *e, Evas_Object *o, void *event_info); @@ -489,95 +482,6 @@ static void __ise_emoticon_create_gengrid(unsigned short int screen_degree) evas_object_event_callback_add(gengrid, EVAS_CALLBACK_MULTI_UP, _multi_up, NULL); } -#if SUPPORTS_EMOTICONS_BY_IMAGE -static void __ise_emoticon_append_items_to_gengrid(emoticon_group_t emoticon_group) -{ - char img_name[10]; - short int items = 0; - std::string file_path = ""; - - if (emoticon_group == EMOTICON_GROUP_RECENTLY_USED) { - items = emoticon_list_recent.size(); - - for (int i = 0; i < items; i++) { - snprintf(img_name, 10, "%x", emoticon_list_recent[i]); - emoticon_items[i].code = emoticon_list_recent[i]; - emoticon_items[i].keyevent = emoticon_list_recent[i]; - emoticon_items[i].path = (std::string)EMOTICON_DIR + (std::string)"u" + (std::string)img_name + (std::string)".png"; - emoticon_items[i].item = elm_gengrid_item_append(gengrid, gic, &(emoticon_items[i]), _item_selected, &(emoticon_items[i])); - } - } else { - if (emoticon_group != EMOTICON_GROUP_DESTROY) { - items = emoticon_group_items[emoticon_group]; - } - for (int i = 0; i < items; i++) { - snprintf(img_name, 10, "%x", ise_emoticon_get_code(emoticon_group-1, i)); - file_path = (std::string)EMOTICON_DIR + (std::string)"u" + (std::string)img_name + (std::string)".png"; - if (ise_util_does_file_exists(file_path)) { - emoticon_items[i].code = ise_emoticon_get_code(emoticon_group-1, i); - emoticon_items[i].keyevent = ise_emoticon_get_code(emoticon_group-1, i); - emoticon_items[i].path = file_path; - emoticon_items[i].item = elm_gengrid_item_append(gengrid, gic, &(emoticon_items[i]), _item_selected, &(emoticon_items[i])); -// PRINTFUNC(SECURE_DEBUG,"file_path = %s\n",file_path.c_str()); - } - } - } - Elm_Object_Item * it = elm_gengrid_first_item_get(gengrid); - elm_gengrid_item_show(it, ELM_GENGRID_ITEM_SCROLLTO_NONE); -} - -static void __ise_emoticon_create_item_class(unsigned short int screen_degree) -{ - if (!gic) - gic = elm_gengrid_item_class_new(); - - gic->item_style = get_item_style_for_degree(screen_degree); - - gic->func.text_get = NULL; - gic->func.content_get = grid_content_get; - gic->func.state_get = NULL; - gic->func.del = grid_content_del; -} - -static Evas_Object * grid_content_get(void *data, Evas_Object *obj, const char *part) -{ - emoticon_item_t *ti = (emoticon_item_t *)data; - if (ti == NULL) - return NULL; - - if (!strcmp(part, "elm.swallow.icon")) { - if (ti->path.c_str()) { - Eina_Bool is_image_file_set = false; - Evas_Object *icon = elm_image_add(obj); - is_image_file_set = elm_image_file_set(icon, ti->path.c_str(), NULL); - if (!is_image_file_set) { - //PRINTFUNC(SECURE_ERROR,"image \"%s\" not set",ti->path.c_str()); - } else { - elm_image_aspect_fixed_set(icon, EINA_FALSE); - elm_image_preload_disabled_set(icon, EINA_FALSE); - evas_object_show(icon); - } - evas_object_data_set(icon, "code", (void *)ti->code); - return icon; - } - } - - return NULL; -} - -static void grid_content_del(void *data, Evas_Object *obj) -{ - emoticon_item_t *ti = (emoticon_item_t *)data; - if (!ti) - return; - - Evas_Object *icon = elm_object_item_part_content_get(ti->item, "elm.swallow.icon"); - if (icon) { - evas_object_data_del(icon, "code"); - } - return; -} -#else //SUPPORTS_EMOTICONS_BY_IMAGE static void __ise_emoticon_append_items_to_gengrid(emoticon_group_t emoticon_group) { char img_name[10]; @@ -644,7 +548,6 @@ static char * grid_text_get(void *data, Evas_Object *obj, const char *part) return NULL; } -#endif //SUPPORTS_EMOTICONS_BY_IMAGE static void _item_selected(void *data, Evas_Object *obj, void *event_info) { @@ -731,4 +634,3 @@ void ise_emoticon_set_private_key_for_emoticon_mode(const emoticon_group_t emoti } } } -#endif -- 2.7.4