summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiep Ha <thiepha@gmail.com>2014-05-26 11:28:12 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-05-26 11:28:12 +0900
commit03d4c6be8cfcaf55a1a805d8dbb3c619cd919c77 (patch)
treeffa68f4cfd4b5d7a3b8ac35e616970ba9259608a
parent6b121ea2d783bf321d62d978ee74be3f20cbd2d5 (diff)
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
-rw-r--r--src/lib/elm_entry.c33
-rw-r--r--src/lib/elm_entry.eo2
2 files changed, 31 insertions, 4 deletions
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index f1eea246a..67dfa0bfd 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -384,10 +384,16 @@ _hide_selection_handler(Evas_Object *obj)
384 384
385 if (!sd->start_handler) return; 385 if (!sd->start_handler) return;
386 386
387 edje_object_signal_emit(sd->start_handler, "elm,handler,hide", "elm"); 387 if (sd->start_handler_shown)
388 sd->start_handler_shown = EINA_FALSE; 388 {
389 edje_object_signal_emit(sd->end_handler, "elm,handler,hide", "elm"); 389 edje_object_signal_emit(sd->start_handler, "elm,handler,hide", "elm");
390 sd->end_handler_shown = EINA_FALSE; 390 sd->start_handler_shown = EINA_FALSE;
391 }
392 if (sd->end_handler_shown)
393 {
394 edje_object_signal_emit(sd->end_handler, "elm,handler,hide", "elm");
395 sd->end_handler_shown = EINA_FALSE;
396 }
391} 397}
392 398
393static Eina_Rectangle * 399static Eina_Rectangle *
@@ -3562,6 +3568,25 @@ _elm_entry_evas_smart_resize(Eo *obj, Elm_Entry_Data *sd, Evas_Coord w, Evas_Coo
3562 eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h)); 3568 eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h));
3563 3569
3564 evas_object_resize(sd->hit_rect, w, h); 3570 evas_object_resize(sd->hit_rect, w, h);
3571
3572}
3573
3574EOLIAN static void
3575_elm_entry_evas_smart_show(Eo *obj, Elm_Entry_Data *sd)
3576{
3577 eo_do_super(obj, MY_CLASS, evas_obj_smart_show());
3578
3579 if (sd->have_selection)
3580 _update_selection_handler(obj);
3581}
3582
3583EOLIAN static void
3584_elm_entry_evas_smart_hide(Eo *obj, Elm_Entry_Data *sd)
3585{
3586 eo_do_super(obj, MY_CLASS, evas_obj_smart_hide());
3587
3588 if (sd->have_selection)
3589 _hide_selection_handler(obj);
3565} 3590}
3566 3591
3567EOLIAN static void 3592EOLIAN static void
diff --git a/src/lib/elm_entry.eo b/src/lib/elm_entry.eo
index 6cf05c776..e0eeefad0 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)
1163 Evas_Smart::add; 1163 Evas_Smart::add;
1164 Evas_Smart::resize; 1164 Evas_Smart::resize;
1165 Evas_Smart::del; 1165 Evas_Smart::del;
1166 Evas_Smart::show;
1167 Evas_Smart::hide;
1166 Elm_Widget::activate; 1168 Elm_Widget::activate;
1167 Elm_Widget::focus_direction_manager_is; 1169 Elm_Widget::focus_direction_manager_is;
1168 Elm_Widget::theme_apply; 1170 Elm_Widget::theme_apply;