summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiep Ha <thiepha@gmail.com>2013-06-22 12:29:28 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-06-22 12:30:50 +0900
commit7767751c883f70e39da5233fff74b9e51574abb2 (patch)
treeceffda1551e9c5947495025a5fb63f0279a4749e
parent7c65f576df5e67a616e939371d8dda661ae7d7f0 (diff)
downloadefl-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--ChangeLog4
-rw-r--r--NEWS1
-rw-r--r--src/lib/edje/edje_entry.c6
3 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1cebaa0e3d..783c42eea8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/NEWS b/NEWS
index 6386316ffd..9da46409a0 100644
--- a/NEWS
+++ b/NEWS
@@ -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