[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
This commit is contained in:
Thiep Ha 2013-06-22 12:29:28 +09:00 committed by Carsten Haitzler (Rasterman)
parent 7c65f576df
commit 7767751c88
3 changed files with 10 additions and 1 deletions

View File

@ -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.

1
NEWS
View File

@ -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

View File

@ -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