From 8c43c57d8c9e91391feef04d16d51094c58b0ad6 Mon Sep 17 00:00:00 2001 From: Thiep Ha Date: Fri, 19 Apr 2013 21:01:12 +0900 Subject: [PATCH] [Copy&Paste] Implement UI v1.3: Does not show cnp popup when click on entry; Show cnp popup when click on cursor handler instead of select word Change-Id: I5b0af52b436482a245482c13f44d0a3a1561613d --- src/lib/elm_entry.c | 47 ++-------------------------------------------- src/lib/elm_widget_entry.h | 1 - 2 files changed, 2 insertions(+), 46 deletions(-) diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index fa9e44c..3c6c389 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -494,7 +494,8 @@ _signal_handler_moving_cb(void *data, Evas_Object *obj __UNUSED__, const char *e static void _signal_handler_click_cb(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__) { - _select_word(data, NULL, NULL); + _magnifier_hide(data); + _menu_call(data); elm_widget_scroll_freeze_pop(data); } @@ -1999,21 +2000,6 @@ _long_press_cb(void *data) return ECORE_CALLBACK_CANCEL; } -// TIZEN ONLY - START -static Eina_Bool -_click_cb(void *data) -{ - ELM_ENTRY_DATA_GET(data, sd); - - sd->click_timer = NULL; - if ((!_elm_config->desktop_entry) && sd->mouse_upped && sd->editable) - { - _menu_call(data); - } - return ECORE_CALLBACK_CANCEL; -} -// TIZEN ONLY - END - static void _mouse_down_cb(void *data, Evas *evas __UNUSED__, @@ -2034,20 +2020,6 @@ _mouse_down_cb(void *data, if (sd->longpress_timer) ecore_timer_del(sd->longpress_timer); sd->longpress_timer = ecore_timer_add (_elm_config->longpress_timeout, _long_press_cb, data); - - // TIZEN ONLY - START - if (sd->click_timer) - { - ecore_timer_del(sd->click_timer); // avoid double click - sd->click_timer = NULL; - } - else - { - if (!sd->have_selection) - sd->click_timer = ecore_timer_add (0.2, _click_cb, data); //FIXME: time out - } - sd->mouse_upped = EINA_FALSE; - // TIZEN ONLY - END } else if (ev->button == 3) { @@ -2088,14 +2060,6 @@ _mouse_up_cb(void *data, _magnifier_hide(data); if (sd->long_pressed) _menu_call(data); } - if (sd->click_timer) - { - if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) - { - ecore_timer_del(sd->click_timer); - sd->click_timer = NULL; - } - } sd->mouse_upped = EINA_TRUE; ///// if (sd->longpress_timer) @@ -2817,12 +2781,6 @@ _entry_mouse_double_signal_cb(void *data, sd->double_clicked = EINA_TRUE; if (!sd->sel_allow) return; - if (sd->click_timer) - { - ecore_timer_del(sd->click_timer); - sd->click_timer = NULL; - } - edje_object_part_text_select_word(sd->entry_edje, "elm.text"); if (!_elm_config->desktop_entry) edje_object_part_text_select_allow_set @@ -3948,7 +3906,6 @@ _elm_entry_smart_del(Evas_Object *obj) if (sd->mgf_proxy) evas_object_del(sd->mgf_proxy); if (sd->mgf_bg) evas_object_del(sd->mgf_bg); if (sd->mgf_clip) evas_object_del(sd->mgf_clip); - if (sd->click_timer) ecore_timer_del(sd->click_timer); // evas_event_thaw(evas_object_evas_get(obj)); evas_event_thaw_eval(evas_object_evas_get(obj)); diff --git a/src/lib/elm_widget_entry.h b/src/lib/elm_widget_entry.h index 7c4bf35..da778dd 100644 --- a/src/lib/elm_widget_entry.h +++ b/src/lib/elm_widget_entry.h @@ -138,7 +138,6 @@ struct _Elm_Entry_Smart_Data Ecore_Event_Handler *client_msg_handler; // TIZEN ONLY Ecore_Timer *longpress_timer; Ecore_Timer *delay_write; - Ecore_Timer *click_timer; // TIZEN ONLY /* for deferred appending */ Ecore_Idler *append_text_idler; char *append_text_left; -- 2.7.4