raster pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=03d4c6be8cfcaf55a1a805d8dbb3c619cd919c77
commit 03d4c6be8cfcaf55a1a805d8dbb3c619cd919c77 Author: Thiep Ha <thie...@gmail.com> Date: Mon May 26 11:28:12 2014 +0900 entry: update selection handlers' visibility when entry is hidden or shown Summary: Selection handlers' visibility should be updated when entry is hidden or shown When entry has selection and hidden, the selection handlers should be hidden also. This fix T1175. @fix Reviewers: seoz, woohyun, raster Reviewed By: raster Maniphest Tasks: T1175 Differential Revision: https://phab.enlightenment.org/D877 --- src/lib/elm_entry.c | 33 +++++++++++++++++++++++++++++---- src/lib/elm_entry.eo | 2 ++ 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index f1eea24..67dfa0b 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -384,10 +384,16 @@ _hide_selection_handler(Evas_Object *obj) if (!sd->start_handler) return; - edje_object_signal_emit(sd->start_handler, "elm,handler,hide", "elm"); - sd->start_handler_shown = EINA_FALSE; - edje_object_signal_emit(sd->end_handler, "elm,handler,hide", "elm"); - sd->end_handler_shown = EINA_FALSE; + if (sd->start_handler_shown) + { + edje_object_signal_emit(sd->start_handler, "elm,handler,hide", "elm"); + sd->start_handler_shown = EINA_FALSE; + } + if (sd->end_handler_shown) + { + edje_object_signal_emit(sd->end_handler, "elm,handler,hide", "elm"); + sd->end_handler_shown = EINA_FALSE; + } } static Eina_Rectangle * @@ -3562,6 +3568,25 @@ _elm_entry_evas_smart_resize(Eo *obj, Elm_Entry_Data *sd, Evas_Coord w, Evas_Coo eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h)); evas_object_resize(sd->hit_rect, w, h); + +} + +EOLIAN static void +_elm_entry_evas_smart_show(Eo *obj, Elm_Entry_Data *sd) +{ + eo_do_super(obj, MY_CLASS, evas_obj_smart_show()); + + if (sd->have_selection) + _update_selection_handler(obj); +} + +EOLIAN static void +_elm_entry_evas_smart_hide(Eo *obj, Elm_Entry_Data *sd) +{ + eo_do_super(obj, MY_CLASS, evas_obj_smart_hide()); + + if (sd->have_selection) + _hide_selection_handler(obj); } EOLIAN static void diff --git a/src/lib/elm_entry.eo b/src/lib/elm_entry.eo index 6cf05c7..e0eeefa 100644 --- a/src/lib/elm_entry.eo +++ b/src/lib/elm_entry.eo @@ -1163,6 +1163,8 @@ class Elm_Entry (Elm_Layout, Elm_Interface_Scrollable, Evas_Clickable_Interface) Evas_Smart::add; Evas_Smart::resize; Evas_Smart::del; + Evas_Smart::show; + Evas_Smart::hide; Elm_Widget::activate; Elm_Widget::focus_direction_manager_is; Elm_Widget::theme_apply; --