From e6f141db264c47731c0b2d1a242ccf73d93f5c1d Mon Sep 17 00:00:00 2001 From: raster Date: Mon, 5 Mar 2012 08:31:58 +0000 Subject: [PATCH] =?utf8?q?fix=20warnings=20from=20=20=EA=B9=80=EB=8C=80?= =?utf8?q?=EC=84=B1's=20patch.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@68680 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/elc_scrolled_entry.c | 4 ++-- src/lib/elm_entry.c | 15 ++++++--------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/lib/elc_scrolled_entry.c b/src/lib/elc_scrolled_entry.c index 18cc752..80bcc84 100644 --- a/src/lib/elc_scrolled_entry.c +++ b/src/lib/elc_scrolled_entry.c @@ -187,7 +187,7 @@ elm_scrolled_entry_autosave_get(const Evas_Object *obj) {return elm_entry_autosave_get(obj);} EINA_DEPRECATED EAPI void elm_scrolled_entry_cnp_textonly_set(Evas_Object *obj, Eina_Bool textonly) -{elm_entry_cnp_textonly_set(obj, textonly);} +{Elm_CNP_Mode cnp_mode = ELM_CNP_MODE_MARKUP;if (textonly) cnp_mode = ELM_CNP_MODE_NO_IMAGE;elm_entry_cnp_mode_set(obj, cnp_mode);} EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cnp_textonly_get(Evas_Object *obj) -{return elm_entry_cnp_textonly_get(obj);} +{return elm_entry_cnp_mode_get(obj) != ELM_CNP_MODE_MARKUP;} diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index f7aaeb3..30d8e02 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -1191,22 +1191,19 @@ void _elm_entry_entry_paste(Evas_Object *obj, const char *entry) { Widget_Data *wd = elm_widget_data_get(obj); - char *str = NULL; + if (wd->cnp_mode == ELM_CNP_MODE_NO_IMAGE) { str = _remove_item_tags(entry); - if (!str) - str = strdup(entry); + if (!str) str = strdup(entry); } else str = strdup(entry); - if (!str) - str = entry; + if (!str) str = (char *)entry; edje_object_part_text_user_insert(wd->ent, "elm.text", str); - if ( str != entry) - free(str); + if (str != entry) free(str); } static void @@ -3374,7 +3371,7 @@ elm_entry_autosave_get(const Evas_Object *obj) return wd->autosave; } -EAPI void +EINA_DEPRECATED EAPI void elm_entry_cnp_textonly_set(Evas_Object *obj, Eina_Bool textonly) { ELM_CHECK_WIDTYPE(obj, widtype); @@ -3384,7 +3381,7 @@ elm_entry_cnp_textonly_set(Evas_Object *obj, Eina_Bool textonly) elm_entry_cnp_mode_set(obj, cnp_mode); } -EAPI Eina_Bool +EINA_DEPRECATED EAPI Eina_Bool elm_entry_cnp_textonly_get(const Evas_Object *obj) { ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE; -- 2.7.4