diff options
author | Thiep Ha <thiepha@gmail.com> | 2013-06-22 12:29:28 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2013-06-22 12:30:50 +0900 |
commit | 7767751c883f70e39da5233fff74b9e51574abb2 (patch) | |
tree | ceffda1551e9c5947495025a5fb63f0279a4749e | |
parent | 7c65f576df5e67a616e939371d8dda661ae7d7f0 (diff) | |
download | efl-7767751c883f70e39da5233fff74b9e51574abb2.tar.gz |
[Edje_Entry] Move cursor to correct position when selection handlers are pressed.
+ Main cursor should be moved to selection start or selection end
cursor's position when selection handlers are pressed.
+ Fix my mistake in signal emit for end handler mouse down event.
Conflicts:
ChangeLog
NEWS
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/lib/edje/edje_entry.c | 6 |
3 files changed, 10 insertions, 1 deletions
@@ -1,3 +1,7 @@ +2013-06-22 Thiep Ha + + * Edje: Move cursor to correct position when selection handlers are pressed. + 2013-06-19 Cedric Bail * Evas: optimized path for when map use the same color for all corner. @@ -191,6 +191,7 @@ Improvements: * edje: use eo array of callbacks to reduce callbacks memory footprint. * evas: use eo array of callbacks to reduce callbacks memory footprint of Evas_Object_Box and Evas_Object_Table. * evas: optimized path for when map use the same color for all corner. + * Edje entry: Move cursor to correct position when selection handlers are pressed. Fixes: * Fix a memory leak in ecore_con_dns when using ecore_con_server_connect diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c index eab36233cc..f82cccf414 100644 --- a/src/lib/edje/edje_entry.c +++ b/src/lib/edje/edje_entry.c @@ -756,6 +756,8 @@ _edje_start_handler_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object * (!rp->typedata.text)) return; en = rp->typedata.text->entry_data; + _edje_entry_cursor_copy(rp, EDJE_CURSOR_SELECTION_BEGIN, EDJE_CURSOR_MAIN); + evas_object_geometry_get(rp->object, &ex, &ey, NULL, NULL); switch (rp->part->cursor_mode) { @@ -837,6 +839,8 @@ _edje_end_handler_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *ob (!rp->typedata.text)) return; en = rp->typedata.text->entry_data; + _edje_entry_cursor_copy(rp, EDJE_CURSOR_SELECTION_END, EDJE_CURSOR_MAIN); + evas_object_geometry_get(rp->object, &ex, &ey, NULL, NULL); switch (rp->part->cursor_mode) { @@ -855,7 +859,7 @@ _edje_end_handler_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *ob en->select_mod_end = EINA_TRUE; en->selecting = EINA_TRUE; - _edje_emit(en->ed, "handler,move,end", rp->part->name); + _edje_emit(en->ed, "handler,move,start", rp->part->name); } static void |