From 2e68debe7b6853dff2d58e1fa89ba7939708871f Mon Sep 17 00:00:00 2001 From: Thiep Ha Date: Tue, 3 May 2016 15:05:42 +0000 Subject: [PATCH] elm entry: remove unused funtions The _elm_entry_entry_paste is removed from elm_cnp.c. It is unused now. We can remove it and related function. --- src/lib/elementary/elm_entry.c | 74 ---------------------------------- src/lib/elementary/elm_priv.h | 3 -- 2 files changed, 77 deletions(-) diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c index 6a31b5ddb4..d193a533c6 100644 --- a/src/lib/elementary/elm_entry.c +++ b/src/lib/elementary/elm_entry.c @@ -1358,80 +1358,6 @@ _hover_selected_cb(void *data, elm_widget_scroll_hold_push(data); } -static char * -_item_tags_remove(const char *str) -{ - char *ret; - Eina_Strbuf *buf; - - if (!str) - return NULL; - - buf = eina_strbuf_new(); - if (!buf) - return NULL; - - if (!eina_strbuf_append(buf, str)) - { - eina_strbuf_free(buf); - return NULL; - } - - while (EINA_TRUE) - { - const char *temp = eina_strbuf_string_get(buf); - char *start_tag = NULL; - char *end_tag = NULL; - size_t sindex; - size_t eindex; - - start_tag = strstr(temp, ""); - else - break; - if (!end_tag || start_tag > end_tag) - break; - - sindex = start_tag - temp; - eindex = end_tag - temp + 1; - if (!eina_strbuf_remove(buf, sindex, eindex)) - break; - } - - ret = eina_strbuf_string_steal(buf); - eina_strbuf_free(buf); - - return ret; -} - -void -_elm_entry_entry_paste(Evas_Object *obj, - const char *entry) -{ - char *str = NULL; - - if (!entry) return; - - ELM_ENTRY_CHECK(obj); - ELM_ENTRY_DATA_GET(obj, sd); - - if (sd->cnp_mode == ELM_CNP_MODE_NO_IMAGE) - { - str = _item_tags_remove(entry); - if (!str) str = strdup(entry); - } - else - str = strdup(entry); - if (!str) str = (char *)entry; - - _edje_entry_user_insert(obj, str); - - if (str != entry) free(str); -} - static void _paste_cb(void *data, Evas_Object *obj EINA_UNUSED, diff --git a/src/lib/elementary/elm_priv.h b/src/lib/elementary/elm_priv.h index d307983607..101f398b14 100644 --- a/src/lib/elementary/elm_priv.h +++ b/src/lib/elementary/elm_priv.h @@ -604,9 +604,6 @@ _elm_dgettext(const char *string) #endif -/* Used by the paste handler */ -void _elm_entry_entry_paste(Evas_Object *obj, const char *entry); - double _elm_atof(const char *s); #endif